Commits

Braden Obrzut committed 7f92913

- Fixed: Trigger action was not serialized.

  • Participants
  • Parent commits 9843e22

Comments (0)

Files changed (3)

File src/gamemap.cpp

 #include "wl_game.h"
 #include "r_sprites.h"
 #include "resourcefiles/resourcefile.h"
+#include "wl_loadsave.h"
 
 GameMap::GameMap(const FString &map) : map(map), valid(false), file(NULL), zoneLinks(NULL)
 {
 	arc << trigger.x
 		<< trigger.y
 		<< trigger.z
-		<< trigger.active
-		<< trigger.activate[0] << trigger.activate[1] << trigger.activate[2] << trigger.activate[3]
+		<< trigger.active;
+
+	if(GameSave::SaveVersion >= 1350238078)
+		arc << trigger.action;
+
+	arc << trigger.activate[0] << trigger.activate[1] << trigger.activate[2] << trigger.activate[3]
 		<< trigger.arg[0] << trigger.arg[1] << trigger.arg[2] << trigger.arg[3] << trigger.arg[4]
 		<< trigger.playerUse
 		<< trigger.playerCross

File src/wl_loadsave.cpp

 
 namespace GameSave {
 
+int SaveVersion = SAVEVER;
+
 static const char* const NEW_SAVE = "    - NEW SAVE -";
 
 struct SaveFile
 	if(!quickSaveLoad)
 		DrawLSAction(0);
 
+	char* savesig = M_GetPNGText(png, "ECWolf Save Version");
+	SaveVersion = atoi(savesig+10);
+	delete[] savesig;
+
 	char level[9];
 	M_GetPNGText(png, "Current Map", level, 8);
 	CA_CacheMap(level);
 	else
 		Message (language["STR_SAVING"]);
 
+	SaveVersion = SAVEVER;
+
 	// If we get hubs this will need to be moved so that we can have multiple of them
 	FCompressedMemFile snapshot;
 	snapshot.Open();

File src/wl_loadsave.h

 
 namespace GameSave
 {
+	extern int SaveVersion;
+
 	Menu		&GetLoadMenu();
 	MenuItem	*GetLoadMenuItem();
 	Menu		&GetSaveMenu();