Affects: All versions. Not tested with sty+ct-console-spawned zones but the code itself is the same.
Description: It's related to fortress_collapse_speed; if you set it to a number smaller than 0.4 then that zone does not trigger OnVanish() (for killing players etc.). The border case of 0.4 works. Bigger values work as expected.
To reproduce: Set fortress_collapse_speed to a number smaller than 0.4; and fortress_conquered_kill_ratio to 1.
Expected: Enemies get killed on conquering the zone.
What happens: They don't.
Why it happens: Apparently a fort zone that does not rotate anymore does not trigger OnVanish(). I remember that we had that determined as a cause.
Why it'd be nice to have it fixed: I've had the idea of a fortress variant where the team that just lost its zone has some time to retaliate. Because of this bug it doesn't work.
To fix: edit gWinZone.cpp -> gBaseZoneHack::Timestep -> following part: Current:
Code: Select all
SetExpansionSpeed( -GetRadius()*sg_collapseSpeed );
SetRotationAcceleration( -GetRotationSpeed()*.4 );
RequestSync();
currentState_ = State_Conquered;
}
else if ( currentState_ == State_Conquered && GetRotationSpeed() < 0 )
Changing it like this will change the rotation "stop" from a constant "2.5 seconds after conquest" to "when it collapses anyways" but fix this bug. I don't know of any server or other feature that depends on the constant delay. Fixed this way:
Code: Select all
SetExpansionSpeed( -GetRadius()*sg_collapseSpeed );
SetRotationAcceleration( -GetRotationSpeed()*sg_collapseSpeed );
RequestSync();
currentState_ = State_Conquered;
}
else if ( currentState_ == State_Conquered && GetRotationSpeed() < 0 )
Code: Select all
SetExpansionSpeed( -GetRadius()*sg_collapseSpeed );
SetRotationAcceleration( -GetRotationSpeed()*.4 );
RequestSync();
currentState_ = State_Conquered;
}
else if ( currentState_ == State_Conquered && GetRotationSpeed() <= 0 )