diff --git a/addons/sourcemod/scripting/saxtonhale.sp b/addons/sourcemod/scripting/saxtonhale.sp index 593bf3c1..b0b11056 100644 --- a/addons/sourcemod/scripting/saxtonhale.sp +++ b/addons/sourcemod/scripting/saxtonhale.sp @@ -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); diff --git a/addons/sourcemod/scripting/vsh/base_boss.sp b/addons/sourcemod/scripting/vsh/base_boss.sp index 046d3e07..cdc6726f 100644 --- a/addons/sourcemod/scripting/vsh/base_boss.sp +++ b/addons/sourcemod/scripting/vsh/base_boss.sp @@ -447,10 +447,9 @@ 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); @@ -458,20 +457,18 @@ void ApplyBossEffects(SaxtonHaleBase boss) 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); } diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_angry.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_angry.sp index f5437a66..1485d05d 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_angry.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_angry.sp @@ -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) diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_electric.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_electric.sp index b494fd5f..0d9d26c1 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_electric.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_electric.sp @@ -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) diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_hot.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_hot.sp index e2f31bcd..854bb54c 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_hot.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_hot.sp @@ -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) diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_ice.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_ice.sp index ec448b98..81501a9e 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_ice.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_ice.sp @@ -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) diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_jumper.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_jumper.sp index e9055a83..5b7deee2 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_jumper.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_jumper.sp @@ -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) diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_magnet.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_magnet.sp index 67ea0110..f7ce7d40 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_magnet.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_magnet.sp @@ -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) diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_overload.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_overload.sp index 72983cfc..1345b1d6 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_overload.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_overload.sp @@ -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"); + } } diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_speed.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_speed.sp index a97a1d2c..8b9b5bb2 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_speed.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_speed.sp @@ -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"); } diff --git a/addons/sourcemod/scripting/vsh/modifiers/modifiers_vampire.sp b/addons/sourcemod/scripting/vsh/modifiers/modifiers_vampire.sp index b24b16d5..17bfe58b 100644 --- a/addons/sourcemod/scripting/vsh/modifiers/modifiers_vampire.sp +++ b/addons/sourcemod/scripting/vsh/modifiers/modifiers_vampire.sp @@ -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)