mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-16 10:36:09 +00:00
Shrink Sync
Obj_CreateShrinkPohbees: Fix potential uninitialised memory being used that could cause a differing number of pobbys to spawn between client and server, causing an (extremely recoverable but still undesired) desync
This commit is contained in:
parent
434e451b8c
commit
274e72ed2d
1 changed files with 2 additions and 5 deletions
|
|
@ -789,11 +789,7 @@ void Obj_CreateShrinkPohbees(player_t *owner)
|
|||
pohbees[j].start = GetPohbeeStart(player->nextwaypoint);
|
||||
pohbees[j].end = endWaypoint;
|
||||
pohbees[j].lasers = 1;
|
||||
|
||||
if (player->position == 1)
|
||||
{
|
||||
pohbees[j].first = true;
|
||||
}
|
||||
pohbees[j].first = (player->position == 1);
|
||||
|
||||
numPohbees++;
|
||||
}
|
||||
|
|
@ -801,6 +797,7 @@ void Obj_CreateShrinkPohbees(player_t *owner)
|
|||
|
||||
for (i = 0; i < numPohbees; i++)
|
||||
{
|
||||
// omg pobby hi!!!
|
||||
CreatePohbee(owner, pohbees[i].start, pohbees[i].end, pohbees[i].lasers);
|
||||
|
||||
if (pohbees[i].first == true)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue