diff --git a/src/actor.h b/src/actor.h index 0ab589107..b7a8614a7 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_level.cpp b/src/g_level.cpp index b6cc1cd84..2d44bfc27 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 21006776e..14b270435 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 e48b79980..f60131c8e 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 c170cacd3..b550eeb77 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 ce9fe722a..b27c79d91 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.