diff --git a/addons/sourcemod/scripting/shavit-misc.sp b/addons/sourcemod/scripting/shavit-misc.sp index c2f8c5b3..d601a0fd 100644 --- a/addons/sourcemod/scripting/shavit-misc.sp +++ b/addons/sourcemod/scripting/shavit-misc.sp @@ -2047,18 +2047,34 @@ public void Shavit_OnRestart(int client, int track) } } - DataPack pack = null; - CreateDataTimer(0.1, Respawn, pack, TIMER_FLAG_NO_MAPCHANGE); + DataPack pack = new DataPack(); pack.WriteCell(GetClientSerial(client)); pack.WriteCell(track); + view_as(pack) |= (1 << 24); + + CreateTimer(0.1, Respawn, pack, TIMER_FLAG_NO_MAPCHANGE); } } -public Action Respawn(Handle Timer, DataPack pack) +public Action Respawn(Handle Timer, any data) { - pack.Reset(); - int client = GetClientFromSerial(pack.ReadCell()); - int track = pack.ReadCell(); + int track = Track_Main; + int client = 0; + + if(data & (1 << 24) > 0) + { + data &= ~(1 << 24); + DataPack pack = data; + pack.Reset(); + client = GetClientFromSerial(pack.ReadCell()); + track = pack.ReadCell(); + delete pack; + } + + else + { + client = GetClientFromSerial(data); + } if(IsValidClient(client) && !IsPlayerAlive(client) && GetClientTeam(client) >= 2) { diff --git a/addons/sourcemod/scripting/shavit-rankings.sp b/addons/sourcemod/scripting/shavit-rankings.sp index 618d1134..d7fed7d3 100644 --- a/addons/sourcemod/scripting/shavit-rankings.sp +++ b/addons/sourcemod/scripting/shavit-rankings.sp @@ -20,7 +20,7 @@ // Design idea: // Rank 1 per map/style/track gets ((points per tier * tier) * 1.5) + (rank 1 time in seconds / 15.0) points. -// Records below rank 1 get points% relative to their time in comparison to rank 1 and a final multiplier of 85% to promote rank 1 hunting. +// Records below rank 1 get points% relative to their time in comparison to rank 1. // // Bonus track gets a 0.25* final mutliplier for points and is treated as tier 1. //