From d413a5da1389a46882821815791f7e76d321f648 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 7 Jul 2019 22:00:02 +0000 Subject: [PATCH] Initialize powerup flags at level load --- similar/main/gamesave.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/similar/main/gamesave.cpp b/similar/main/gamesave.cpp index 091708bae1..c7da414a41 100644 --- a/similar/main/gamesave.cpp +++ b/similar/main/gamesave.cpp @@ -483,6 +483,10 @@ static void read_object(const vmobjptr_t obj,PHYSFS_File *f,int version) if (obj->type == OBJ_POWERUP) { + /* Objects loaded from a level file were not ejected by + * the player. + */ + obj->ctype.powerup_info.flags = 0; /* Hostages have control type CT_POWERUP, but object * type OBJ_HOSTAGE. Hostages are never weapons, so * prevent checking their IDs.