diff --git a/src/namedef_custom.h b/src/namedef_custom.h index 16f6a022a..15a9a2910 100644 --- a/src/namedef_custom.h +++ b/src/namedef_custom.h @@ -526,6 +526,7 @@ xx(ExplosionDamage) xx(ExplosionRadius) xx(DontHurtShooter) xx(Noattack) +xx(PushSound) //xx(X) //xx(Y) diff --git a/src/playsim/actor.h b/src/playsim/actor.h index b5105f0d4..be0cc1044 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -1240,7 +1240,6 @@ public: FSoundIDNoInit BounceSound; FSoundIDNoInit WallBounceSound; FSoundIDNoInit CrushPainSound; - FSoundIDNoInit PushSound; // [UZ] Sound to play when an actor is being pushed around. double MaxDropOffHeight; double MaxStepHeight; diff --git a/src/playsim/p_acs.cpp b/src/playsim/p_acs.cpp index 8564320a4..36513de5a 100644 --- a/src/playsim/p_acs.cpp +++ b/src/playsim/p_acs.cpp @@ -4672,7 +4672,7 @@ static FSoundID GetActorSound(AActor *actor, int soundtype) case SOUND_WallBounce: return actor->WallBounceSound; case SOUND_CrushPain: return actor->CrushPainSound; case SOUND_Howl: return actor->SoundVar(NAME_HowlSound); - case SOUND_Push: return actor->PushSound; + case SOUND_Push: return actor->SoundVar(NAME_PushSound); default: return 0; } } diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 032968808..a8ccf0604 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -280,7 +280,6 @@ void AActor::Serialize(FSerializer &arc) A("bouncesound", BounceSound) A("wallbouncesound", WallBounceSound) A("crushpainsound", CrushPainSound) - A("pushsound", PushSound) A("speed", Speed) A("floatspeed", FloatSpeed) A("mass", Mass) @@ -3316,9 +3315,10 @@ DEFINE_ACTION_FUNCTION(AActor, PlayActiveSound) void AActor::PlayPushSound() { - if (PushSound && !S_IsActorPlayingSomething(this, CHAN_VOICE, -1)) + FSoundID push = SoundVar(NAME_PushSound); + if (!S_IsActorPlayingSomething(this, CHAN_BODY, push)) { - S_Sound(this, CHAN_VOICE, 0, PushSound, 1, ATTN_IDLE); + S_Sound(this, CHAN_BODY, 0, push, 1, ATTN_NORM); } } diff --git a/src/scripting/vmthunks_actors.cpp b/src/scripting/vmthunks_actors.cpp index 25622b4ba..3bdcfe3ad 100644 --- a/src/scripting/vmthunks_actors.cpp +++ b/src/scripting/vmthunks_actors.cpp @@ -1992,7 +1992,6 @@ DEFINE_FIELD(AActor, UseSound) DEFINE_FIELD(AActor, BounceSound) DEFINE_FIELD(AActor, WallBounceSound) DEFINE_FIELD(AActor, CrushPainSound) -DEFINE_FIELD(AActor, PushSound) DEFINE_FIELD(AActor, MaxDropOffHeight) DEFINE_FIELD(AActor, MaxStepHeight) DEFINE_FIELD(AActor, MaxSlopeSteepness) diff --git a/wadsrc/static/zscript/actors/actor.zs b/wadsrc/static/zscript/actors/actor.zs index c7a753f69..01f3555d3 100644 --- a/wadsrc/static/zscript/actors/actor.zs +++ b/wadsrc/static/zscript/actors/actor.zs @@ -227,7 +227,6 @@ class Actor : Thinker native native sound BounceSound; native sound WallBounceSound; native sound CrushPainSound; - native sound PushSound; native double MaxDropoffHeight; native double MaxStepHeight; native double MaxSlopeSteepness; @@ -279,6 +278,7 @@ class Actor : Thinker native meta double MissileHeight; meta Name MissileName; meta double FastSpeed; // speed in fast mode + meta Sound PushSound; // Sound being played when pushed by something // todo: implement access to native meta properties. // native meta int infighting_group;