diff --git a/src/playsim/actor.h b/src/playsim/actor.h index 8e562f1253..ece9be8e08 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -1362,18 +1362,23 @@ public: DVector3 Prev; DRotator PrevAngles; DAngle PrevFOV; - int PrevPortalGroup; TArray AttachedLights; TDeletingArray UserLights; + int PrevPortalGroup; // When was this actor spawned? int SpawnTime; uint32_t SpawnOrder; + int UnmorphTime; + int MorphFlags; + int PremorphProperties; + PClassActor* MorphExitFlash; // landing speed from a jump with normal gravity (squats the player's view) // (note: this is put into AActor instead of the PlayerPawn because non-players also use the value) double LandingSpeed; + // ThingIDs void SetTID (int newTID); diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index e1a1fb6fbc..daa19670fa 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -393,7 +393,13 @@ void AActor::Serialize(FSerializer &arc) A("userlights", UserLights) A("WorldOffset", WorldOffset) ("modelData", modelData) - A("LandingSpeed", LandingSpeed); + A("LandingSpeed", LandingSpeed) + + ("unmorphtime", UnmorphTime) + ("morphflags", MorphFlags) + ("premorphproperties", PremorphProperties) + ("morphexitflash", MorphExitFlash); + SerializeTerrain(arc, "floorterrain", floorterrain, &def->floorterrain); SerializeArgs(arc, "args", args, def->args, special); diff --git a/src/scripting/vmthunks_actors.cpp b/src/scripting/vmthunks_actors.cpp index 7094212e0f..acf2538076 100644 --- a/src/scripting/vmthunks_actors.cpp +++ b/src/scripting/vmthunks_actors.cpp @@ -2126,6 +2126,10 @@ DEFINE_FIELD(AActor, ShadowAimFactor) DEFINE_FIELD(AActor, ShadowPenaltyFactor) DEFINE_FIELD(AActor, AutomapOffsets) DEFINE_FIELD(AActor, LandingSpeed) +DEFINE_FIELD(AActor, UnmorphTime) +DEFINE_FIELD(AActor, MorphFlags) +DEFINE_FIELD(AActor, PremorphProperties) +DEFINE_FIELD(AActor, MorphExitFlash) DEFINE_FIELD_X(FCheckPosition, FCheckPosition, thing); DEFINE_FIELD_X(FCheckPosition, FCheckPosition, pos); diff --git a/wadsrc/static/zscript/actors/morph.zs b/wadsrc/static/zscript/actors/morph.zs index b9fdbb101f..9cd21287a0 100644 --- a/wadsrc/static/zscript/actors/morph.zs +++ b/wadsrc/static/zscript/actors/morph.zs @@ -35,10 +35,10 @@ extend class Actor MPROP_INVIS = 1 << 6, } - int UnmorphTime; - EMorphFlags MorphFlags; - class MorphExitFlash; - EPremorphProperty PremorphProperties; + native int UnmorphTime; + native int MorphFlags; + native class MorphExitFlash; + native int PremorphProperties; // Players still track these separately for legacy reasons. void SetMorphStyle(EMorphFlags flags)