* Updated to ZDoom r3601:

- Fixed P_CheckSwitchRange() should not force range checking of lines flagged with ML_3DMIDTEX if they do not have a midtexture.
- Fixed: sector_t::GetHeightSec() was too aggressive about not returning heightsec.
- Fixed: PowerTimeFreezer needs to use different bits to mark timefreezing initiated by different players, or overlapping uses of PowerTimeFreezer will malfunction.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1368 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2012-04-27 13:54:44 +00:00
parent 61f97005d2
commit a42d2559e2
10 changed files with 90 additions and 51 deletions

View file

@ -247,6 +247,7 @@ player_t::player_t()
ReadyWeapon(0),
PendingWeapon(0),
cheats(0),
timefreezer(0),
refire(0),
inconsistant(0),
killcount(0),
@ -674,7 +675,7 @@ bool APlayerPawn::UseInventory (AInventory *item)
{ // You can't use items if you're totally frozen
return false;
}
if (( level.flags2 & LEVEL2_FROZEN ) && ( player == NULL || !( player->cheats & CF_TIMEFREEZE )))
if ((level.flags2 & LEVEL2_FROZEN) && (player == NULL || player->timefreezer == 0))
{
// Time frozen
return false;
@ -2694,6 +2695,15 @@ void player_t::Serialize (FArchive &arc)
poisonpaintype = poisoner->PainType != NAME_None ? poisoner->PainType : poisoner->DamageType;
}
if (SaveVersion >= 3599)
{
arc << timefreezer;
}
else
{
cheats &= ~(1 << 15); // make sure old CF_TIMEFREEZE bit is cleared
}
if (isbot)
{
arc << angle
@ -2784,5 +2794,5 @@ bool P_IsPlayerTotallyFrozen(const player_t *player)
return
gamestate == GS_TITLELEVEL ||
player->cheats & CF_TOTALLYFROZEN ||
((level.flags2 & LEVEL2_FROZEN) && !(player->cheats & CF_TIMEFREEZE));
((level.flags2 & LEVEL2_FROZEN) && player->timefreezer == 0);
}