diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 289adb70f..830e83496 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -3146,7 +3146,22 @@ void ConCompiler::setmusic() void loadcons() { - memset(&gs.actorinfo, 0, sizeof(gs.actorinfo)); + gs = {}; + gs.respawnactortime = 768; + gs.bouncemineblastradius = 2500; + gs.respawnitemtime = 768; + gs.morterblastradius = 2500; + gs.numfreezebounces = 3; + gs.pipebombblastradius = 2500; + gs.playerfriction = 0xCFD0; + gs.rpgblastradius = 1780; + gs.seenineblastradius = 2048; + gs.shrinkerblastradius = 650; + gs.gravity = 176; + gs.tripbombblastradius = 3880; + gs.playerheight = PHEIGHT_DUKE; + gs.displayflags = DUKE3D_NO_WIDESCREEN_PINNING; + ScriptCode.Clear(); labels.Clear(); diff --git a/source/games/duke/src/global.h b/source/games/duke/src/global.h index 1e5eb961a..9e134844e 100644 --- a/source/games/duke/src/global.h +++ b/source/games/duke/src/global.h @@ -17,31 +17,31 @@ extern user_defs ud; struct DukeGameInfo { // Static constant global state - int respawnactortime = 768; - int bouncemineblastradius = 2500; - int respawnitemtime = 768; - int morterblastradius = 2500; - int numfreezebounces = 3; - int pipebombblastradius = 2500; - int playerfriction = 0xCFD0; - int rpgblastradius = 1780; - int seenineblastradius = 2048; - int shrinkerblastradius = 650; - int gravity = 176; - int tripbombblastradius = 3880; - int camerashitable = 0; - int max_player_health = 0; - int max_armour_amount = 0; - int lasermode = 0; - int freezerhurtowner = 0; - int impact_damage = 0; + int respawnactortime; + int bouncemineblastradius; + int respawnitemtime; + int morterblastradius; + int numfreezebounces; + int pipebombblastradius; + int playerfriction; + int rpgblastradius; + int seenineblastradius; + int shrinkerblastradius; + int gravity; + int tripbombblastradius; + int camerashitable; + int max_player_health; + int max_armour_amount; + int lasermode; + int freezerhurtowner; + int impact_damage; - TileInfo tileinfo[MAXTILES] = {}; // This is not from EDuke32. - ActorInfo actorinfo[MAXTILES] = {}; - int16_t max_ammo_amount[MAX_WEAPONS] = {}; - int16_t weaponsandammosprites[15] = {}; - int playerheight = PHEIGHT_DUKE; - int displayflags = DUKE3D_NO_WIDESCREEN_PINNING; + TileInfo tileinfo[MAXTILES]; // This is not from EDuke32. + ActorInfo actorinfo[MAXTILES]; + int16_t max_ammo_amount[MAX_WEAPONS]; + int16_t weaponsandammosprites[15]; + int playerheight; + int displayflags; }; extern DukeGameInfo gs;