- 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)
- 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
that animated icons can be done with it.
- 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
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)
AWeapon *PremorphWeapon; // ready weapon before morphing
TObjPtr<AWeapon> PremorphWeapon; // ready weapon before morphing
int chickenPeck; // chicken peck countdown
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;
}
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]) )
{
P_SpawnPlayer (&playerstarts[playernum]);
AActor *mo = P_SpawnPlayer (&playerstarts[playernum]);
if (mo != NULL) P_PlayerStartStomp(mo);
}
else
{
@ -1469,13 +1471,15 @@ void G_DoReborn (int playernum, bool freshbot)
{
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
return;
}
// 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++)
{
if (playeringame[i])
if (playeringame[i] && players[i].mo != NULL)
P_PlayerStartStomp(players[i].mo);
}
}

View file

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