From 612cc2a40548d5fd5f152c882e177a5b50bf213a Mon Sep 17 00:00:00 2001 From: rftr Date: Fri, 3 Jun 2022 04:43:48 +0000 Subject: [PATCH] fix: clear world items when starting a new game git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9389 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Game Init.cpp | 4 ++++ Tactical/World Items.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Strategic/Game Init.cpp b/Strategic/Game Init.cpp index edf1b6e7..d3c01cb2 100644 --- a/Strategic/Game Init.cpp +++ b/Strategic/Game Init.cpp @@ -64,6 +64,7 @@ #include "ASD.h" // added by Flugente #include "MiniEvents.h" #include "Rebel Command.h" + #include "World Items.h" #endif #include "Vehicles.h" @@ -725,6 +726,9 @@ fFirstTimeInMapScreen = TRUE; // this is for the "mercs climbing down from a rope" animation, NOT Skyrider!! ResetHeliSeats( ); + TrashWorldItems(); + ClearAllWorldItems(); + #ifdef LUA_GAME_INIT_NEW_GAME LetLuaGameInit(0); diff --git a/Tactical/World Items.h b/Tactical/World Items.h index dd841f44..524b67b8 100644 --- a/Tactical/World Items.h +++ b/Tactical/World Items.h @@ -113,6 +113,7 @@ INT32 FindWorldItem( UINT16 usItem ); void LoadWorldItemsFromMap( INT8 **hBuffer, float dMajorMapVersion, int ubMinorMapVersion ); void SaveWorldItemsToMap(HWFILE fp, float dMajorMapVersion, UINT8 ubMinorMapVersion);//dnl ch33 150909 +void ClearAllWorldItems(); void TrashWorldItems(); typedef struct