Skip to content
Permalink
Browse files

Fix scoreboard not updating relaunches #1947

  • Loading branch information...
Martin Strohmeier
Martin Strohmeier committed Oct 15, 2017
1 parent b94c375 commit a0b131cefde643a80499db407b8c1e8e0b0537c1
@@ -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);
}

0 comments on commit a0b131c

Please sign in to comment.
You can’t perform that action at this time.