File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 4
4
#include < TFE_FileSystem/fileutil.h>
5
5
#include < TFE_Input/inputMapping.h>
6
6
#include < TFE_RenderBackend/renderBackend.h>
7
+ #include < TFE_ExternalData/dfLogics.h>
8
+ #include < TFE_ExternalData/weaponExternal.h>
9
+ #include < TFE_ExternalData/pickupExternal.h>
7
10
#include < TFE_Settings/gameSourceData.h>
8
11
#include < TFE_System/system.h>
9
12
#include < cassert>
@@ -247,6 +250,14 @@ namespace TFE_SaveSystem
247
250
{
248
251
SaveHeader header;
249
252
loadHeader (&stream, &header, filename);
253
+
254
+ // Clear out custom logics and external data before loading
255
+ TFE_ExternalData::getExternalLogics ()->actorLogics .clear ();
256
+ TFE_ExternalData::clearExternalWeapons ();
257
+ TFE_ExternalData::clearExternalProjectiles ();
258
+ TFE_ExternalData::clearExternalEffects ();
259
+ TFE_ExternalData::clearExternalPickups ();
260
+
250
261
ret = s_game->serializeGameState (&stream, filename, false );
251
262
stream.close ();
252
263
}
You can’t perform that action at this time.
0 commit comments