Skip to content

Commit

Permalink
Oops + Change Function
Browse files Browse the repository at this point in the history
  • Loading branch information
Batfoxkid committed Sep 22, 2024
1 parent c07cb75 commit 7800b84
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 45 deletions.
12 changes: 5 additions & 7 deletions addons/sourcemod/scripting/saxtonhale.sp
Original file line number Diff line number Diff line change
Expand Up @@ -616,17 +616,15 @@ public void OnPluginStart()

func = SaxtonHaleFunction("GetSoundKill", ET_Ignore, Param_String, Param_Cell, Param_Cell);
func.SetParam(1, Param_String, VSHArrayType_Dynamic, 2);

func = SaxtonHaleFunction("GetSoundAbility", ET_Ignore, Param_Cell, Param_String, Param_String, Param_String);
func.SetParam(2, Param_String, VSHArrayType_Dynamic, 1);
func.SetParam(3, Param_String, VSHArrayType_Dynamic, 1);
func.SetParam(4, Param_String, VSHArrayType_Dynamic, 1);

func = SaxtonHaleFunction("GetSoundAbility", ET_Ignore, Param_String, Param_Cell, Param_String);
func.SetParam(1, Param_String, VSHArrayType_Dynamic, 2);

func = SaxtonHaleFunction("GetRenderColor", ET_Ignore, Param_Array);
func.SetParam(1, Param_Array, VSHArrayType_Static, 4);

func = SaxtonHaleFunction("GetParticleEffect", ET_Ignore, Param_String, Param_Cell);
func.SetParam(1, Param_String, VSHArrayType_Dynamic, 2);
func = SaxtonHaleFunction("GetParticleEffect", ET_Ignore, Param_Cell, Param_String, Param_Cell);
func.SetParam(2, Param_String, VSHArrayType_Dynamic, 3);

func = SaxtonHaleFunction("GetMusicInfo", ET_Ignore, Param_String, Param_Cell, Param_FloatByRef);
func.SetParam(1, Param_String, VSHArrayType_Dynamic, 2);
Expand Down
25 changes: 11 additions & 14 deletions addons/sourcemod/scripting/vsh/base_boss.sp
Original file line number Diff line number Diff line change
Expand Up @@ -447,31 +447,28 @@ Action AttachEnt_SetTransmit(int iAttachEnt, int iClient)

void ApplyBossEffects(SaxtonHaleBase boss)
{
// TODO multiple effects
char sEffect1[64], sEffect2[64], sEffect3[64];
boss.CallFunction("GetParticleEffect", sizeof(sEffect1), sEffect1, sEffect2, sEffect3);
if (sEffect1[0])
char sEffect[64];
boss.CallFunction("GetParticleEffect", 0, sEffect, sizeof(sEffect));
if (sEffect[0])
{
float vecOrigin[3], vecAngles[3];
GetClientAbsOrigin(boss.iClient, vecOrigin);
GetClientAbsAngles(boss.iClient, vecAngles);

vecAngles[1] -= 90.0;

int iEntity = TF2_SpawnParticle(sEffect1, .vecOrigin = vecOrigin, .vecAngles = vecAngles, .iEntity = boss.iClient, .sAttachmentOffset = "partyhat");
int iEntity = TF2_SpawnParticle(sEffect, .vecOrigin = vecOrigin, .vecAngles = vecAngles, .iEntity = boss.iClient, .sAttachmentOffset = "partyhat");
SetEdictFlags(iEntity, GetEdictFlags(iEntity) &~ FL_EDICT_ALWAYS);
SDKHook(iEntity, SDKHook_SetTransmit, AttachEnt_SetTransmit);

if(sEffect2[0])
for(int i = 1; ; i++)
{
iEntity = TF2_SpawnParticle(sEffect2, .vecOrigin = vecOrigin, .vecAngles = vecAngles, .iEntity = boss.iClient, .sAttachmentOffset = "partyhat");
SetEdictFlags(iEntity, GetEdictFlags(iEntity) &~ FL_EDICT_ALWAYS);
SDKHook(iEntity, SDKHook_SetTransmit, AttachEnt_SetTransmit);
}

if(sEffect3[0])
{
iEntity = TF2_SpawnParticle(sEffect2, .vecOrigin = vecOrigin, .vecAngles = vecAngles, .iEntity = boss.iClient, .sAttachmentOffset = "partyhat");
sEffect[0] = 0;
boss.CallFunction("GetParticleEffect", i, sEffect, sizeof(sEffect));
if (!sEffect[0])
break;

iEntity = TF2_SpawnParticle(sEffect, .vecOrigin = vecOrigin, .vecAngles = vecAngles, .iEntity = boss.iClient, .sAttachmentOffset = "partyhat");
SetEdictFlags(iEntity, GetEdictFlags(iEntity) &~ FL_EDICT_ALWAYS);
SDKHook(iEntity, SDKHook_SetTransmit, AttachEnt_SetTransmit);
}
Expand Down
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_angry.sp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ public void ModifiersAngry_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersAngry_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersAngry_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_storm_cloud_o");
if (index == 0)
strcopy(sEffect, length, "utaunt_storm_cloud_o");
}

public void ModifiersAngry_OnThink(SaxtonHaleBase boss)
Expand Down
12 changes: 9 additions & 3 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_electric.sp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ public void ModifiersElectric_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersElectric_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersElectric_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_storm_lightning2_k");
strcopy(sEffect2, length, "utaunt_electricity_glow");
switch (index)
{
case 0:
strcopy(sEffect, length, "utaunt_storm_lightning2_k");

case 1:
strcopy(sEffect, length, "utaunt_electricity_glow");
}
}

public Action ModifiersElectric_OnAttackDamage(SaxtonHaleBase boss, int victim, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3], int damagecustom)
Expand Down
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_hot.sp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ public void ModifiersHot_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersHot_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersHot_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_glowyplayer_orange_parent");
if (index == 0)
strcopy(sEffect, length, "utaunt_glowyplayer_orange_parent");
}

public void ModifiersHot_OnThink(SaxtonHaleBase boss)
Expand Down
13 changes: 9 additions & 4 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_ice.sp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ public void ModifiersIce_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersIce_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersIce_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_ice_bodyglow");
strcopy(sEffect2, length, "utaunt_festivelights_blue_lights1");
strcopy(sEffect3, length, "utaunt_festivelights_blue_lights1");
switch (index)
{
case 0:
strcopy(sEffect, length, "utaunt_ice_bodyglow");

case 1, 2, 3, 4, 5:
strcopy(sEffect, length, "utaunt_festivelights_blue_lights1");
}
}

public void ModifiersIce_OnDeath(SaxtonHaleBase boss, Event event)
Expand Down
12 changes: 9 additions & 3 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_jumper.sp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ public void ModifiersJumper_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersJumper_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersJumper_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_pedalfly_blue_pedals2");
strcopy(sEffect2, length, "player_intel_trail_blue");
switch (index)
{
case 0:
strcopy(sEffect, length, "utaunt_pedalfly_blue_pedals2");

case 1:
strcopy(sEffect, length, "player_intel_trail_blue");
}
}

public void ModifiersJumper_OnButtonPress(SaxtonHaleBase boss, int iButton)
Expand Down
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_magnet.sp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ public void ModifiersMagnet_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersMagnet_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersMagnet_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_electricity_purple_glow");
if (index == 0)
strcopy(sEffect, length, "utaunt_electricity_purple_glow");
}

public void ModifiersMagnet_OnThink(SaxtonHaleBase boss)
Expand Down
12 changes: 9 additions & 3 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_overload.sp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ public void ModifiersOverload_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersOverload_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersOverload_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_god_gold_beam_cp");
strcopy(sEffect2, length, "utaunt_twinkling_goldsilver_glow01");
switch (index)
{
case 0:
strcopy(sEffect, length, "utaunt_god_gold_beam_cp");

case 1:
strcopy(sEffect, length, "utaunt_twinkling_goldsilver_glow01");
}
}
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_speed.sp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public void ModifiersSpeed_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersSpeed_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersSpeed_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_auroraglow_green_parent");
if (index == 0)
strcopy(sEffect, length, "utaunt_auroraglow_green_parent");
}
12 changes: 9 additions & 3 deletions addons/sourcemod/scripting/vsh/modifiers/modifiers_vampire.sp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ public void ModifiersVampire_GetRenderColor(SaxtonHaleBase boss, int iColor[4])
iColor[3] = 255;
}

public void ModifiersVampire_GetParticleEffect(SaxtonHaleBase boss, int length, char[] sEffect1, char[] sEffect2, char[] sEffect3)
public void ModifiersVampire_GetParticleEffect(SaxtonHaleBase boss, int index, char[] sEffect, int length)
{
strcopy(sEffect1, length, "utaunt_hellpit_bats");
strcopy(sEffect2, length, "player_intel_trail_red");
switch (index)
{
case 0:
strcopy(sEffect, length, "utaunt_hellpit_bats");

case 1:
strcopy(sEffect, length, "player_intel_trail_red");
}
}

public void ModifiersVampire_OnThink(SaxtonHaleBase boss)
Expand Down

0 comments on commit 7800b84

Please sign in to comment.