diff --git a/src/actor.h b/src/actor.h index 6ddbeeb654..b80b21dbef 100644 --- a/src/actor.h +++ b/src/actor.h @@ -353,6 +353,7 @@ enum MF7_HITTARGET = 0x00004000, // The actor the projectile dies on is set to target, provided it's targetable anyway. MF7_HITMASTER = 0x00008000, // Same as HITTARGET, except it's master instead of target. MF7_HITTRACER = 0x00010000, // Same as HITTARGET, but for tracer. + MF7_FLYCHEAT = 0x00020000, // must be part of the actor so that it can be tracked properly diff --git a/src/g_heretic/a_hereticartifacts.cpp b/src/g_heretic/a_hereticartifacts.cpp index 1c9df572ca..651e3609c2 100644 --- a/src/g_heretic/a_hereticartifacts.cpp +++ b/src/g_heretic/a_hereticartifacts.cpp @@ -48,6 +48,7 @@ bool AArtiTomeOfPower::Use (bool pickup) DEFINE_ACTION_FUNCTION(AActor, A_TimeBomb) { self->z += 32*FRACUNIT; + self->PrevZ = self->z; // no interpolation! self->RenderStyle = STYLE_Add; self->alpha = FRACUNIT; P_RadiusAttack (self, self->target, 128, 128, self->DamageType, RADF_HURTSOURCE); diff --git a/src/g_level.cpp b/src/g_level.cpp index d834035564..9e36b5650b 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1235,15 +1235,6 @@ void G_FinishTravel () pawn->AddToHash (); pawn->SetState(pawn->SpawnState); pawn->player->SendPitchLimits(); - // Sync the FLY flags. - if (pawn->flags2 & MF2_FLY) - { - pawn->player->cheats |= CF_FLY; - } - else - { - pawn->player->cheats &= ~CF_FLY; - } for (inv = pawn->Inventory; inv != NULL; inv = inv->Inventory) { diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 21006776e1..14b2704355 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -997,7 +997,8 @@ void APowerFlight::EndEffect () { return; } - if (!(Owner->player->cheats & CF_FLY)) + + if (!(Owner->flags7 & MF7_FLYCHEAT)) { if (Owner->z != Owner->floorz) { diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index e48b79980a..f60131c8e5 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -149,8 +149,7 @@ void cht_DoCheat (player_t *player, int cheat) case CHT_FLY: if (player->mo != NULL) { - player->cheats ^= CF_FLY; - if (player->cheats & CF_FLY) + if ((player->mo->flags7 ^= MF7_FLYCHEAT) != 0) { player->mo->flags |= MF_NOGRAVITY; player->mo->flags2 |= MF2_FLY; diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index c170cacd3b..b550eeb770 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2800,7 +2800,7 @@ FUNC(LS_SetPlayerProperty) mask = CF_INSTANTWEAPSWITCH; break; case PROP_FLY: - mask = CF_FLY; + //mask = CF_FLY; break; case PROP_TOTALLYFROZEN: mask = CF_TOTALLYFROZEN; @@ -2814,6 +2814,7 @@ FUNC(LS_SetPlayerProperty) it->player->cheats |= mask; if (arg2 == PROP_FLY) { + it->flags7 |= MF7_FLYCHEAT; it->flags2 |= MF2_FLY; it->flags |= MF_NOGRAVITY; } @@ -2823,6 +2824,7 @@ FUNC(LS_SetPlayerProperty) it->player->cheats &= ~mask; if (arg2 == PROP_FLY) { + it->flags7 &= ~MF7_FLYCHEAT; it->flags2 &= ~MF2_FLY; it->flags &= ~MF_NOGRAVITY; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index ce9fe722a2..b27c79d912 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4477,7 +4477,7 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags) p->mo->ResetAirSupply(false); p->Uncrouch(); p->MinPitch = p->MaxPitch = 0; // will be filled in by PostBeginPlay()/netcode - p->cheats &= ~CF_FLY; + p->velx = p->vely = 0; // killough 10/98: initialize bobbing to 0.