From d4c8cdf45a59a2cd36655c14c8ac0d9570356ca0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 16 Jun 2008 07:10:08 +0000 Subject: [PATCH] - Added read barriers to all actor pointers within player_t except for mo, ReadyWeapon and PendingWeapon. SVN r1039 (trunk) --- docs/rh-log.txt | 4 ++++ src/d_player.h | 20 ++++++++++---------- src/p_user.cpp | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 2e176be0a..592424f30 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +June 16, 2008 (Changes by Graf Zahl) +- Added read barriers to all actor pointers within player_t except for + mo, ReadyWeapon and PendingWeapon. + June 15, 2008 (Changes by Graf Zahl) - Added a read barrier to player_t::PrewmorphWeapon. - Fixed: After spawning a deathmatch player P_PlayerStartStomp must diff --git a/src/d_player.h b/src/d_player.h index a3865d0cc..365834087 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -247,8 +247,8 @@ public: int damagecount, bonuscount;// for screen flashing int hazardcount; // for delayed Strife damage int poisoncount; // screen flash for poison damage - AActor *poisoner; // NULL for non-player actors - AActor *attacker; // who did damage (NULL for floors) + TObjPtr poisoner; // NULL for non-player actors + TObjPtr attacker; // who did damage (NULL for floors) int extralight; // so gun flashes light up areas int fixedcolormap; // can be set to REDCOLORMAP, etc. pspdef_t psprites[NUMPSPRITES]; // view sprites (gun, etc) @@ -261,7 +261,7 @@ public: int jumpTics; // delay the next jump for a moment int respawn_time; // [RH] delay respawning until this tic - AActor *camera; // [RH] Whose eyes this player sees through + TObjPtr camera; // [RH] Whose eyes this player sees through int air_finished; // [RH] Time when you start drowning @@ -275,14 +275,14 @@ public: angle_t angle; // The wanted angle that the bot try to get every tic. // (used to get a smoth view movement) - AActor *dest; // Move Destination. - AActor *prev; // Previous move destination. + TobjPtr dest; // Move Destination. + TObjPtr prev; // Previous move destination. - AActor *enemy; // The dead meat. - AActor *missile; // A threathing missile that got to be avoided. - AActor *mate; // Friend (used for grouping in templay or coop. - AActor *last_mate; // If bots mate dissapeared (not if died) that mate is + TObjPtr enemy; // The dead meat. + TObjPtr missile; // A threathing missile that got to be avoided. + TObjPtr mate; // Friend (used for grouping in templay or coop. + TObjPtr last_mate; // If bots mate dissapeared (not if died) that mate is // pointed to by this. Allows bot to roam to it if // necessary. @@ -325,7 +325,7 @@ public: fixed_t crouchviewdelta; // [CW] I moved these here for multiplayer conversation support. - AActor *ConversationNPC, *ConversationPC; + TObjPtr ConversationNPC, ConversationPC; angle_t ConversationNPCAngle; bool ConversationFaceTalker; diff --git a/src/p_user.cpp b/src/p_user.cpp index 006e72c84..bf43ffa41 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -322,6 +322,7 @@ size_t player_t::FixPointers (const DObject *old, DObject *rep) if (last_mate == old) last_mate = replacement, changed++; if (ReadyWeapon == old) ReadyWeapon = static_cast(rep), changed++; if (PendingWeapon == old) PendingWeapon = static_cast(rep), changed++; + if (PremorphWeapon == old) PremorphWeaon = static_cast(rep), changed++; if (ConversationNPC == old) ConversationNPC = replacement, changed++; if (ConversationPC == old) ConversationPC = replacement, changed++; return changed;