From 772a554e41e413312bb36b7a2e09b2c7d1e3ad33 Mon Sep 17 00:00:00 2001 From: 42 <33488710+FortyTwoFortyTwo@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:16:12 +0000 Subject: [PATCH] Revert "Several small updates to HHH Jr. rage (#414)" This reverts commit 29228b1392858a5d858f35e7d1283429a827cca3. --- .../vsh/abilities/ability_rage_ghost.sp | 26 ++++++++++++------- .../scripting/vsh/bosses/boss_horsemann.sp | 4 +-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/addons/sourcemod/scripting/vsh/abilities/ability_rage_ghost.sp b/addons/sourcemod/scripting/vsh/abilities/ability_rage_ghost.sp index a1b4dbb5..abac8225 100644 --- a/addons/sourcemod/scripting/vsh/abilities/ability_rage_ghost.sp +++ b/addons/sourcemod/scripting/vsh/abilities/ability_rage_ghost.sp @@ -1,6 +1,7 @@ #define GHOST_MODEL "models/props_halloween/ghost.mdl" -#define PARTICLE_BEAM "passtime_beam" +#define PARTICLE_BEAM_BLU "medicgun_beam_blue" +#define PARTICLE_BEAM_RED "medicgun_beam_red" static float g_flGhostHealStartTime[MAXPLAYERS][2048]; static int g_iGhostHealStealCount[MAXPLAYERS][2048]; @@ -61,10 +62,8 @@ public void RageGhost_OnRage(SaxtonHaleBase boss) g_iGhostParticleCentre[iClient] = TF2_SpawnParticle("", vecOrigin, vecAngles, false, iClient); //Stun and Fly - float flDuration = boss.GetPropFloat("RageGhost", "Duration"); - TF2_StunPlayer(iClient, flDuration, 0.0, TF_STUNFLAG_GHOSTEFFECT|TF_STUNFLAG_NOSOUNDOREFFECT, 0) - TF2_AddCondition(iClient, TFCond_SwimmingNoEffects, flDuration); - TF2_AddCondition(iClient, TFCond_ImmuneToPushback, flDuration); + TF2_StunPlayer(iClient, boss.GetPropFloat("RageGhost", "Duration"), 0.0, TF_STUNFLAG_GHOSTEFFECT|TF_STUNFLAG_NOSOUNDOREFFECT, 0); + TF2_AddCondition(iClient, TFCond_SwimmingNoEffects, boss.GetPropFloat("RageGhost", "Duration")); //Get active weapon and dont render int iWeapon = GetEntPropEnt(iClient, Prop_Send, "m_hActiveWeapon"); @@ -90,6 +89,14 @@ public void RageGhost_OnThink(SaxtonHaleBase boss) GetClientAbsOrigin(iClient, vecOrigin); vecOrigin[2] += 42.0; + int iTeam = GetClientTeam(iClient); + static char sParticle[][] = { + "", + "", + PARTICLE_BEAM_RED, + PARTICLE_BEAM_BLU, + }; + //Arrays of spooked clients int[] iSpooked = new int[MaxClients]; int iLength = 0; @@ -141,7 +148,7 @@ public void RageGhost_OnThink(SaxtonHaleBase boss) float vecTargetAngles[3]; GetClientAbsAngles(iClient, vecTargetAngles); - g_iGhostParticleBeam[iClient][iVictim] = TF2_SpawnParticle(PARTICLE_BEAM, vecTargetOrigin, vecTargetAngles, true, iVictim, EntRefToEntIndex(g_iGhostParticleCentre[iClient])); + g_iGhostParticleBeam[iClient][iVictim] = TF2_SpawnParticle(sParticle[iTeam], vecTargetOrigin, vecTargetAngles, true, iVictim, EntRefToEntIndex(g_iGhostParticleCentre[iClient])); } //Calculate on heal steal @@ -197,7 +204,7 @@ public void RageGhost_OnThink(SaxtonHaleBase boss) while ((iBuilding = FindEntityByClassname(iBuilding, "obj_*")) > MaxClients) { bool bLinked = false; - if (GetEntProp(iBuilding, Prop_Send, "m_iTeamNum") != GetClientTeam(iClient)) + if (GetEntProp(iBuilding, Prop_Send, "m_iTeamNum") != iTeam) { float vecTargetOrigin[3]; GetEntPropVector(iBuilding, Prop_Send, "m_vecOrigin", vecTargetOrigin); @@ -219,7 +226,7 @@ public void RageGhost_OnThink(SaxtonHaleBase boss) float vecTargetAngles[3]; GetClientAbsAngles(iClient, vecTargetAngles); - g_iGhostParticleBeam[iClient][iBuilding] = TF2_SpawnParticle(PARTICLE_BEAM, vecTargetOrigin, vecTargetAngles, true, iBuilding, EntRefToEntIndex(g_iGhostParticleCentre[iClient])); + g_iGhostParticleBeam[iClient][iBuilding] = TF2_SpawnParticle(sParticle[iTeam], vecTargetOrigin, vecTargetAngles, true, iBuilding, EntRefToEntIndex(g_iGhostParticleCentre[iClient])); } float flTimeGap = GetGameTime() - g_flGhostHealStartTime[iClient][iBuilding]; @@ -376,6 +383,7 @@ public void RageGhost_Destroy(SaxtonHaleBase boss) public void RageGhost_Precache(SaxtonHaleBase boss) { PrecacheModel(GHOST_MODEL); - PrecacheParticleSystem(PARTICLE_BEAM); + PrecacheParticleSystem(PARTICLE_BEAM_RED); + PrecacheParticleSystem(PARTICLE_BEAM_BLU); } diff --git a/addons/sourcemod/scripting/vsh/bosses/boss_horsemann.sp b/addons/sourcemod/scripting/vsh/bosses/boss_horsemann.sp index dccb142d..ed5e8bee 100644 --- a/addons/sourcemod/scripting/vsh/bosses/boss_horsemann.sp +++ b/addons/sourcemod/scripting/vsh/bosses/boss_horsemann.sp @@ -168,9 +168,7 @@ public Action Horsemann_OnSoundPlayed(SaxtonHaleBase boss, int clients[MAXPLAYER if (StrContains(sample, "player/footsteps/", false) == 0) { - if (!TF2_IsPlayerInCondition(boss.iClient, TFCond_SwimmingNoEffects)) - EmitSoundToAll(g_strHorsemannFootsteps[GetRandomInt(0, sizeof(g_strHorsemannFootsteps)-1)], boss.iClient, _, _, _, 0.4, GetRandomInt(90, 100)); - + EmitSoundToAll(g_strHorsemannFootsteps[GetRandomInt(0, sizeof(g_strHorsemannFootsteps)-1)], boss.iClient, _, _, _, 0.4, GetRandomInt(90, 100)); return Plugin_Handled; }