MantisBT - Soldat
View Issue Details
0000649SoldatGameplaypublic2016-03-22 00:172020-08-27 11:20
Savage 
 
highmajoralways
newopen 
1.7.0 
 
0000649: Survival - Dead Players After Restart/Map Change
In survival mode when at least 1 alpha and bravo player are alive(there's no countdown for next fight) and rest of the players are dead then after map change (restart command, votemap etc. But when map is changed due to score limit reached everything is ok - not tested other events) these players aren't respawned until alive players from previous map are dead.
No tags attached.
zip RestartFIX.zip (1,838) 2016-03-22 11:22
https://bugs.soldat.pl/file_download.php?file_id=658&type=bug
Issue History
2016-03-22 00:17SavageNew Issue
2016-03-22 11:22SavageFile Added: RestartFIX.zip
2016-03-22 11:29SavageNote Added: 0002541

Notes
(0002541)
Savage   
2016-03-22 11:29   
I couldn't find out how to modify description but it should be:

In survival mode when at least 1 alpha and bravo player are alive(there's no countdown for next fight) and rest of the players are dead then after map change these players aren't respawned until alive players from previous map are dead.

Also I've made small script to fix it:(RestartFIX.zip under description)

var
    Resurrect: array[1..32] of Boolean;
    
function OnDamage(Shooter, Victim: TActivePlayer; Damage: Integer; BulletId: Byte): Integer;
begin
    if Resurrect[Victim.ID] then
        Result := 0
    else
        Result := Damage;
end;

procedure OnAfterMapChange(Next: string);
var
    i: Byte;
begin
    for i := 1 to 32 do
        if (Players[i].Active) and (Players[i].Alive=false) and (Players[i].Team<>5) then begin
                Resurrect[i] := true;
                Players[i].Team := Players[i].Team;
                Resurrect[i] := false;
            end;
end;

procedure Init;
var
    i: Byte;
begin
    for i := 1 to 32 do
        Players[i].OnDamage := @OnDamage;
    
    Map.OnAfterMapChange := @OnAfterMapChange;
end;

begin
    Init;
end.