From 119c2f36b2d3f3914f9147a3bd0af5400867f8e4 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 19 Jan 2016 13:20:32 +0000 Subject: [PATCH 1/3] - Fixed an incorrect memset parameter in wi_stuff.cpp. - Removed some whitespace from wi_stuff.h. --- src/wi_stuff.cpp | 2 +- src/wi_stuff.h | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index 653f6b907..e931b33fd 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -1228,7 +1228,7 @@ void WI_initDeathmatchStats (void) acceleratestage = 0; memset(playerready, 0, sizeof(playerready)); memset(cnt_frags, 0, sizeof(cnt_frags)); - memset(cnt_deaths, 0, sizeof(cnt_frags)); + memset(cnt_deaths, 0, sizeof(cnt_deaths)); memset(player_deaths, 0, sizeof(player_deaths)); total_frags = 0; total_deaths = 0; diff --git a/src/wi_stuff.h b/src/wi_stuff.h index dee36e736..a594d17af 100644 --- a/src/wi_stuff.h +++ b/src/wi_stuff.h @@ -33,7 +33,7 @@ class FTexture; struct wbplayerstruct_t { bool in; // whether the player is in game - + // Player stats, kills, collected items etc. int skills; int sitems; @@ -41,7 +41,6 @@ struct wbplayerstruct_t int stime; int frags[MAXPLAYERS]; int fragcount; // [RH] Cumulative frags for this player - }; struct wbstartstruct_t @@ -54,7 +53,7 @@ struct wbstartstruct_t FTexture *LName0; FTexture *LName1; - + int maxkills; int maxitems; int maxsecret; @@ -63,19 +62,19 @@ struct wbstartstruct_t // the par time and sucktime int partime; // in tics int sucktime; // in minutes - + // total time for the entire current game int totaltime; // index of this player in game - int pnum; + int pnum; wbplayerstruct_t plyr[MAXPLAYERS]; }; // Intermission stats. // Parameters for world map / intermission. -extern wbstartstruct_t wminfo; +extern wbstartstruct_t wminfo; // Called by main loop, animate the intermission. From 9b9008ecc7b1d6c870273739289fbcc911ed68fb Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 19 Jan 2016 18:00:46 -0600 Subject: [PATCH 2/3] Restore original offset range for WraithFX5 spawn --- src/g_hexen/a_wraith.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_hexen/a_wraith.cpp b/src/g_hexen/a_wraith.cpp index 312585cdf..dc7d50009 100644 --- a/src/g_hexen/a_wraith.cpp +++ b/src/g_hexen/a_wraith.cpp @@ -215,8 +215,8 @@ void A_WraithFX4 (AActor *self) if (spawn5) { fixedvec3 pos = self->Vec3Offset( - (pr_wraithfx4()-128)<<12, - (pr_wraithfx4()-128)<<12, + (pr_wraithfx4()-128)<<11, + (pr_wraithfx4()-128)<<11, (pr_wraithfx4()<<10)); mo = Spawn ("WraithFX5", pos, ALLOW_REPLACE); From 5c8ebf487dbb1abff83d9705e9bf1d6c91e2ed51 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Wed, 20 Jan 2016 19:14:43 +1300 Subject: [PATCH 3/3] Fixed load order for saves - Make sure the PRNG tables are restored after the base level is loaded, otherwise the tables will restore in a modified state. --- src/g_game.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index ca2233cdb..799a4e7aa 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1930,9 +1930,6 @@ void G_DoLoadGame () } G_ReadSnapshots (png); - STAT_Read(png); - FRandom::StaticReadRNGState (png); - P_ReadACSDefereds (png); // load a base level savegamerestore = true; // Use the player actors in the savegame @@ -1942,6 +1939,9 @@ void G_DoLoadGame () delete[] map; savegamerestore = false; + STAT_Read(png); + FRandom::StaticReadRNGState(png); + P_ReadACSDefereds(png); P_ReadACSVars(png); NextSkill = -1;