MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setAltitude

Method setAltitude

src/Savegame/Ufo.cpp:364–375  ·  view source on GitHub ↗

* Changes the current altitude of the UFO. * @param altitude Altitude. */

Source from the content-addressed store, hash-verified

362 * @param altitude Altitude.
363 */
364void Ufo::setAltitude(const std::string &altitude)
365{
366 _altitude = altitude;
367 if (_altitude != "STR_GROUND")
368 {
369 _status = FLYING;
370 }
371 else
372 {
373 _status = isCrashed() ? CRASHED : LANDED;
374 }
375}
376
377/**
378 * Returns if this UFO took enough damage

Callers 4

spawnUfoMethod · 0.80
ufoReachedWaypointMethod · 0.80
ufoLiftingMethod · 0.80
moveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected