sources » InfantryClass » Update
// As far as I understand it, this is the reason of the ridiculous "undying Rocketeer" bug.
// This is called each frame to update state of each InfantryClass object every frame.
// It does call TechnoClass::Update (not shown below, will be updated later).
void InfantryClass::Update() {
// code snipped...
if ( this->Health <= 0 ) {
seq = this->currentSequence;
if ( seq != Die1 ) {
if ( seq != Die2 ) {
if ( seq != Die3 ) {
if ( seq != Die4 ) {
if ( seq != Die5 ) {
if ( seq != AirDeathFinish ) {
if ( seq != Panic ) {
if ( seq != Shovel ) {
if ( seq != WetAttack ) {
if ( seq != Hover )
this->Health = 1;
}
}
}
}
}
}
}
}
}
// code snipped...
}