From 274e72ed2dfdeb66edb65b609fccb01161fe4aed Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 20 Aug 2023 22:13:53 +0100 Subject: [PATCH] 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 --- src/objects/shrink.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/objects/shrink.c b/src/objects/shrink.c index 5336630ba..e5dd2b8c6 100644 --- a/src/objects/shrink.c +++ b/src/objects/shrink.c @@ -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)