mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 12:32:13 +00:00
- handle special case for activation sounds when player bumps into other actors.
This commit is contained in:
parent
524df20d26
commit
125ea52e57
21 changed files with 33 additions and 35 deletions
|
@ -112,7 +112,7 @@ void CallOnRespawn(DDukeActor* actor, int low);
|
||||||
bool CallAnimate(DDukeActor* actor, tspritetype* hitter);
|
bool CallAnimate(DDukeActor* actor, tspritetype* hitter);
|
||||||
bool CallShootThis(DDukeActor* clsdef, DDukeActor* actor, int pn, const DVector3& spos, DAngle sang);
|
bool CallShootThis(DDukeActor* clsdef, DDukeActor* actor, int pn, const DVector3& spos, DAngle sang);
|
||||||
void CallStaticSetup(DDukeActor* actor);
|
void CallStaticSetup(DDukeActor* actor);
|
||||||
void CallPlayFTASound(DDukeActor* actor);
|
void CallPlayFTASound(DDukeActor* actor, int mode = 0);
|
||||||
void CallStandingOn(DDukeActor* actor, player_struct* p);
|
void CallStandingOn(DDukeActor* actor, player_struct* p);
|
||||||
void CallRunState(DDukeActor* actor);
|
void CallRunState(DDukeActor* actor);
|
||||||
int CallTriggerSwitch(DDukeActor* actor, player_struct* p);
|
int CallTriggerSwitch(DDukeActor* actor, player_struct* p);
|
||||||
|
|
|
@ -623,12 +623,12 @@ bool CallShootThis(DDukeActor* clsdef, DDukeActor* actor, int pn, const DVector3
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallPlayFTASound(DDukeActor* actor)
|
void CallPlayFTASound(DDukeActor* actor, int mode)
|
||||||
{
|
{
|
||||||
IFVIRTUALPTR(actor, DDukeActor, PlayFTASound)
|
IFVIRTUALPTR(actor, DDukeActor, PlayFTASound)
|
||||||
{
|
{
|
||||||
VMValue val = actor;
|
VMValue val[] = { actor, mode };
|
||||||
VMCall(func, &val, 1, nullptr, 0);
|
VMCall(func, val, 2, nullptr, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2762,11 +2762,8 @@ HORIZONLY:
|
||||||
if (clip.actor()->spr.statnum != STAT_ACTOR)
|
if (clip.actor()->spr.statnum != STAT_ACTOR)
|
||||||
{
|
{
|
||||||
clip.actor()->timetosleep = 0;
|
clip.actor()->timetosleep = 0;
|
||||||
if (clip.actor()->spr.picnum == RTILE_BILLYRAY)
|
CallPlayFTASound(clip.actor(), 1);
|
||||||
S_PlayActorSound(404, clip.actor());
|
ChangeActorStat(clip.actor(), STAT_ACTOR);
|
||||||
else
|
|
||||||
CallPlayFTASound(clip.actor());
|
|
||||||
ChangeActorStat(clip.actor(), 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CallOnTouch(clip.actor(), p);
|
CallOnTouch(clip.actor(), p);
|
||||||
|
|
|
@ -20,7 +20,7 @@ class DukeGreenSlime : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("SLIM_RECOG");
|
self.PlayActorSound("SLIM_RECOG");
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ class DukeRecon : DukeActor
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("RECO_RECOG");
|
self.PlayActorSound("RECO_RECOG");
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ class RedneckUFO1 : DukeRecon
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ class DukeBoss1 : DukeBossBase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
Duke.PlaySound("BOS1_RECOG");
|
Duke.PlaySound("BOS1_RECOG");
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class DukeBoss1Stayput : DukeBoss1
|
||||||
+BADGUYSTAYPUT;
|
+BADGUYSTAYPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class DukeBoss2 : DukeBossBase
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
if (self.pal == 1)
|
if (self.pal == 1)
|
||||||
Duke.PlaySound("BOS2_RECOG");
|
Duke.PlaySound("BOS2_RECOG");
|
||||||
|
|
|
@ -11,7 +11,7 @@ class DukeBoss3 : DukeBossBase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
if (self.pal == 1)
|
if (self.pal == 1)
|
||||||
Duke.PlaySound("BOS3_RECOG");
|
Duke.PlaySound("BOS3_RECOG");
|
||||||
|
|
|
@ -13,7 +13,7 @@ class DukeBoss4 : DukeBossBase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
if (self.pal == 1)
|
if (self.pal == 1)
|
||||||
Duke.PlaySound("BOS4_RECOG");
|
Duke.PlaySound("BOS4_RECOG");
|
||||||
|
|
|
@ -21,7 +21,7 @@ class DukeCommander : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("COMM_RECOG");
|
self.PlayActorSound("COMM_RECOG");
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class DukeDrone : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("DRON_RECOG");
|
self.PlayActorSound("DRON_RECOG");
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class DukeLizMan : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("CAPT_RECOG");
|
self.PlayActorSound("CAPT_RECOG");
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ class DukeLizManStayput : DukeLizMan
|
||||||
+BADGUYSTAYPUT;
|
+BADGUYSTAYPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class DukeLizTrooper : DukeActor
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("PRED_RECOG");
|
self.PlayActorSound("PRED_RECOG");
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ class DukeLizTrooperStayput : DukeLizTrooper
|
||||||
+BADGUYSTAYPUT;
|
+BADGUYSTAYPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class DukeOctabrain : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("OCTA_RECOG");
|
self.PlayActorSound("OCTA_RECOG");
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ class DukePigCop : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("PIG_RECOG");
|
self.PlayActorSound("PIG_RECOG");
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ class DukePigCopDive : DukePigCopStayput
|
||||||
pic "PIGCOPDIVE";
|
pic "PIGCOPDIVE";
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class DukeTurret : DukeActor
|
||||||
aimoffset 32;
|
aimoffset 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("TURR_RECOG");
|
self.PlayActorSound("TURR_RECOG");
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,10 @@ class RedneckBillyRay : DukeActor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("BR_RECOG");
|
if (mode == 0) self.PlayActorSound("BR_RECOG");
|
||||||
|
else self.PlayActorSound("FART1");
|
||||||
}
|
}
|
||||||
|
|
||||||
override void Initialize()
|
override void Initialize()
|
||||||
|
@ -33,7 +34,7 @@ class RedneckBillyRayStayput: RedneckBillyRay
|
||||||
+BADGUYSTAYPUT
|
+BADGUYSTAYPUT
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class RedneckCoot : DukeActor
|
||||||
+DESTRUCTOIMMUNE;
|
+DESTRUCTOIMMUNE;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
if (!Raze.isRRRA() && (random(0, 3)) == 2)
|
if (!Raze.isRRRA() && (random(0, 3)) == 2)
|
||||||
self.PlayActorSound("CT_GET");
|
self.PlayActorSound("CT_GET");
|
||||||
|
@ -40,7 +40,7 @@ class RedneckCootStayput: RedneckCoot
|
||||||
+BADGUYSTAYPUT;
|
+BADGUYSTAYPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class RedneckMinionStayput: RedneckMinion
|
||||||
+BADGUYSTAYPUT;
|
+BADGUYSTAYPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ class VacationBeachBabe : DukeLizmanJump
|
||||||
+INTERNAL_BADGUY;
|
+INTERNAL_BADGUY;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PlayFTASound()
|
override void PlayFTASound(int mode)
|
||||||
{
|
{
|
||||||
self.PlayActorSound("CAPT_RECOG");
|
self.PlayActorSound("CAPT_RECOG");
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,7 @@ class DukeActor : CoreActor native
|
||||||
virtual void onRespawn(int tag) { }
|
virtual void onRespawn(int tag) { }
|
||||||
virtual bool animate(tspritetype tspr) { return false; }
|
virtual bool animate(tspritetype tspr) { return false; }
|
||||||
virtual void RunState(DukePlayer p, double pdist) {} // this is the CON function.
|
virtual void RunState(DukePlayer p, double pdist) {} // this is the CON function.
|
||||||
virtual void PlayFTASound() {}
|
virtual void PlayFTASound(int mode) {}
|
||||||
virtual void StandingOn(DukePlayer p) {}
|
virtual void StandingOn(DukePlayer p) {}
|
||||||
virtual bool TriggerSwitch(DukePlayer activator) { return false; }
|
virtual bool TriggerSwitch(DukePlayer activator) { return false; }
|
||||||
virtual bool shootthis(DukeActor actor, DukePlayer p, Vector3 pos, double ang) const // this gets called on the defaults.
|
virtual bool shootthis(DukeActor actor, DukePlayer p, Vector3 pos, double ang) const // this gets called on the defaults.
|
||||||
|
|
Loading…
Reference in a new issue