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

Method keepFalling

src/Savegame/BattleUnit.cpp:1057–1075  ·  view source on GitHub ↗

* Advances the phase of falling sequence. */

Source from the content-addressed store, hash-verified

1055 * Advances the phase of falling sequence.
1056 */
1057void BattleUnit::keepFalling()
1058{
1059 _fallPhase++;
1060 int endFrame = 3;
1061 if (_spawnUnit != "" && _specab != SPECAB_RESPAWN)
1062 {
1063 endFrame = 18;
1064 }
1065 if (_fallPhase == endFrame)
1066 {
1067 _fallPhase--;
1068 if (_health == 0)
1069 _status = STATUS_DEAD;
1070 else
1071 _status = STATUS_UNCONSCIOUS;
1072 }
1073
1074 _cacheInvalid = true;
1075}
1076
1077
1078/**

Callers 2

UnitDieBStateMethod · 0.80
thinkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected