mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 16:01:35 +00:00
Merge branch 'fix-leave-div-by-0' into 'next'
Fix stupid divide-by-zero error when leaving servers See merge request STJr/SRB2!1240
This commit is contained in:
commit
202d2126c9
1 changed files with 8 additions and 4 deletions
|
@ -2501,10 +2501,14 @@ static void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
|||
}
|
||||
|
||||
count--;
|
||||
spheres = players[playernum].spheres;
|
||||
rings = players[playernum].rings;
|
||||
sincrement = spheres/count;
|
||||
rincrement = rings/count;
|
||||
sincrement = spheres = players[playernum].spheres;
|
||||
rincrement = rings = players[playernum].rings;
|
||||
|
||||
if (count)
|
||||
{
|
||||
sincrement /= count;
|
||||
rincrement /= count;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue