forked from Mirrors/openclonk
Fix scoreboard not updating relaunches #1947
parent
b94c3757a6
commit
a0b131cefd
|
@ -38,6 +38,14 @@ protected func RelaunchPlayer(int plr, int killer)
|
|||
return _inherited(plr, killer, ...);
|
||||
}
|
||||
|
||||
protected func OnPlayerRelaunch(int plr)
|
||||
{
|
||||
if (GetRelaunchRule()->HasUnlimitedRelaunches()) return;
|
||||
Scoreboard->SetPlayerData(plr, "relaunches", GetRelaunchRule()->GetPlayerRelaunchCount(plr));
|
||||
return _inherited(plr, ...);
|
||||
}
|
||||
|
||||
|
||||
protected func RemovePlayer(int plr)
|
||||
{
|
||||
return _inherited(plr, ...);
|
||||
|
|
|
@ -220,7 +220,7 @@ public func InitializePlayer(int plr)
|
|||
if (!initial_relaunch || !perform_restart)
|
||||
return;
|
||||
// Scenario script callback.
|
||||
if (GameCall("OnPlayerRelaunch", plr, false))
|
||||
if (GameCallEx("OnPlayerRelaunch", plr, false))
|
||||
return;
|
||||
return DoRelaunch(plr, nil, nil, true);
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ public func OnClonkDeath(object clonk, int killer)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (GameCall("OnPlayerRelaunch", plr, true))
|
||||
if (GameCallEx("OnPlayerRelaunch", plr, true))
|
||||
return;
|
||||
return DoRelaunch(plr, clonk, nil);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue