diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index e70f3cc0a..955672c67 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3879,7 +3879,7 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t actor->SpawnPoint[2] = (actor->z - actor->floorz); } - actor->FloatBobPhase = rng(); // Don't make everything bob in sync + if (actor->FloatBobPhase < 0) actor->FloatBobPhase = rng(); // Don't make everything bob in sync (unless deliberately told to do) if (actor->flags2 & MF2_FLOORCLIP) { actor->AdjustFloorClip (); diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index e3461792b..662c868ee 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -624,6 +624,16 @@ DEFINE_PROPERTY(scale, F, Actor) defaults->scaleX = defaults->scaleY = id; } +//========================================================================== +// +//========================================================================== +DEFINE_PROPERTY(floatbobphase, F, Actor) +{ + PROP_FIXED_PARM(id, 0); + if (id < -1 || id >= 64) I_Error ("FloatBobPhase must be in range [-1,63]"); + defaults->FloatBobPhase = id; +} + //========================================================================== // //========================================================================== diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 8e76ca374..950521361 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -16,6 +16,7 @@ ACTOR Actor native //: Thinker WallBounceFactor 0.75 BounceCount -1 FloatSpeed 4 + FloatBobPhase -1 // randomly initialize by default Gravity 1 DamageFactor 1.0 PushFactor 0.25