- Added a read barrier to player_t::PrewmorphWeapon.

- Fixed: After spawning a deathmatch player P_PlayerStartStomp must
  be called.
- Fixed: SpawnThings must check if the players were spawned before
  calling P_PlayerStartStomp.


SVN r1038 (trunk)
This commit is contained in:
Christoph Oelckers 2008-06-15 23:09:01 +00:00
parent 2af3663744
commit 7a215e538a
5 changed files with 17 additions and 6 deletions

View file

@ -1,4 +1,10 @@
June 15, 2008 (Changes by Graf Zahl) June 15, 2008 (Changes by Graf Zahl)
- Added a read barrier to player_t::PrewmorphWeapon.
- Fixed: After spawning a deathmatch player P_PlayerStartStomp must
be called.
- Fixed: SpawnThings must check if the players were spawned before
calling P_PlayerStartStomp.
- Fixed typo in flat scroll interpolation.
- Changed FImageCollection to return translated texture indices so - Changed FImageCollection to return translated texture indices so
that animated icons can be done with it. that animated icons can be done with it.
- Changed FImageCollection to use a TArray to hold its data. - Changed FImageCollection to use a TArray to hold its data.

View file

@ -256,7 +256,7 @@ public:
BYTE MorphedPlayerClass; // [MH] (for SBARINFO) class # for this player instance when morphed BYTE MorphedPlayerClass; // [MH] (for SBARINFO) class # for this player instance when morphed
int MorphStyle; // which effects to apply for this player instance when morphed int MorphStyle; // which effects to apply for this player instance when morphed
const PClass *MorphExitFlash; // flash to apply when demorphing (cache of value given to P_MorphPlayer) const PClass *MorphExitFlash; // flash to apply when demorphing (cache of value given to P_MorphPlayer)
AWeapon *PremorphWeapon; // ready weapon before morphing TObjPtr<AWeapon> PremorphWeapon; // ready weapon before morphing
int chickenPeck; // chicken peck countdown int chickenPeck; // chicken peck countdown
int jumpTics; // delay the next jump for a moment int jumpTics; // delay the next jump for a moment

View file

@ -1372,7 +1372,8 @@ void G_DeathMatchSpawnPlayer (int playernum)
spot->type = playernum+9100-4; spot->type = playernum+9100-4;
} }
P_SpawnPlayer (spot); AActor *mo = P_SpawnPlayer (spot);
if (mo != NULL) P_PlayerStartStomp(mo);
} }
// //
@ -1443,7 +1444,8 @@ void G_DoReborn (int playernum, bool freshbot)
if (G_CheckSpot (playernum, &playerstarts[playernum]) ) if (G_CheckSpot (playernum, &playerstarts[playernum]) )
{ {
P_SpawnPlayer (&playerstarts[playernum]); AActor *mo = P_SpawnPlayer (&playerstarts[playernum]);
if (mo != NULL) P_PlayerStartStomp(mo);
} }
else else
{ {
@ -1469,13 +1471,15 @@ void G_DoReborn (int playernum, bool freshbot)
{ {
playerstarts[i].type = playernum + 4001 - 4; playerstarts[i].type = playernum + 4001 - 4;
} }
P_SpawnPlayer (&playerstarts[i]); AActor *mo = P_SpawnPlayer (&playerstarts[i]);
if (mo != NULL) P_PlayerStartStomp(mo);
playerstarts[i].type = oldtype; // restore playerstarts[i].type = oldtype; // restore
return; return;
} }
// he's going to be inside something. Too bad. // he's going to be inside something. Too bad.
} }
P_SpawnPlayer (&playerstarts[playernum]); AActor *mo = P_SpawnPlayer (&playerstarts[playernum]);
if (mo != NULL) P_PlayerStartStomp(mo);
} }
} }
} }

View file

@ -1492,7 +1492,7 @@ void P_SpawnThings (int position)
} }
for(int i=0; i<MAXPLAYERS; i++) for(int i=0; i<MAXPLAYERS; i++)
{ {
if (playeringame[i]) if (playeringame[i] && players[i].mo != NULL)
P_PlayerStartStomp(players[i].mo); P_PlayerStartStomp(players[i].mo);
} }
} }

View file

@ -342,6 +342,7 @@ size_t player_t::PropagateMark()
GC::Mark(ReadyWeapon); GC::Mark(ReadyWeapon);
GC::Mark(ConversationNPC); GC::Mark(ConversationNPC);
GC::Mark(ConversationPC); GC::Mark(ConversationPC);
GC::Mark(PremorphWeapon);
if (PendingWeapon != WP_NOCHANGE) if (PendingWeapon != WP_NOCHANGE)
{ {
GC::Mark(PendingWeapon); GC::Mark(PendingWeapon);