Skip to content

Commit

Permalink
Revert "Several small updates to HHH Jr. rage (#414)"
Browse files Browse the repository at this point in the history
This reverts commit 29228b1.
  • Loading branch information
FortyTwoFortyTwo authored Dec 10, 2024
1 parent 29228b1 commit 772a554
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
26 changes: 17 additions & 9 deletions addons/sourcemod/scripting/vsh/abilities/ability_rage_ghost.sp
Original file line number Diff line number Diff line change
@@ -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];
Expand Down Expand Up @@ -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");
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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];
Expand Down Expand Up @@ -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);
}

4 changes: 1 addition & 3 deletions addons/sourcemod/scripting/vsh/bosses/boss_horsemann.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 772a554

Please sign in to comment.