From 34a8cdcc22d1f5c4ecf13f466579ca5c9f2544b2 Mon Sep 17 00:00:00 2001 From: Mentrillum <42941613+Mentrillum@users.noreply.github.com> Date: Sun, 9 Jan 2022 01:07:02 -0700 Subject: [PATCH] 1.7.1.3 --- addons/sourcemod/scripting/sf2.sp | 8 +- addons/sourcemod/scripting/sf2/client.sp | 4 +- .../scripting/sf2/extras/commands.sp | 21 +- addons/sourcemod/scripting/sf2/npc.sp | 74 ++-- .../sourcemod/scripting/sf2/npc/npc_chaser.sp | 369 ++++++++++-------- .../scripting/sf2/npc/npc_chaser_attacks.sp | 10 + .../scripting/sf2/npc/npc_chaser_mind.sp | 5 +- .../scripting/sf2/npc/npc_chaser_pathing.sp | 75 ++-- .../sf2/npc/npc_chaser_takedamage.sp | 11 +- .../scripting/sf2/profiles/profile_chaser.sp | 14 + .../sf2/profiles/profile_chaser_precache.sp | 70 +++- addons/sourcemod/scripting/sf2/stocks.sp | 19 +- addons/sourcemod/translations/sf2.phrases.txt | 2 +- 13 files changed, 444 insertions(+), 238 deletions(-) diff --git a/addons/sourcemod/scripting/sf2.sp b/addons/sourcemod/scripting/sf2.sp index 3e6d1906..9d8556a6 100644 --- a/addons/sourcemod/scripting/sf2.sp +++ b/addons/sourcemod/scripting/sf2.sp @@ -35,8 +35,8 @@ bool steamworks; #include #pragma newdecls required -#define PLUGIN_VERSION "1.7.1.2 M" -#define PLUGIN_VERSION_DISPLAY "1.7.1.2 M" +#define PLUGIN_VERSION "1.7.1.3 M" +#define PLUGIN_VERSION_DISPLAY "1.7.1.3 M" #define TFTeam_Spectator 1 #define TFTeam_Red 2 @@ -6534,7 +6534,7 @@ public Action Event_PlayerDeathPre(Event event, const char[] name, bool dB) event.SetInt("attacker", userid); g_hTimerChangeClientName[iTarget] = CreateTimer(0.6, Timer_RevertClientName, iTarget, TIMER_FLAG_NO_MAPCHANGE); - if(!IsClientSourceTV(iTarget)) + if(IsValidClient(iTarget)) { event.SetInt("ignore", iTarget); @@ -6656,7 +6656,7 @@ public Action Event_PlayerDeathPre(Event event, const char[] name, bool dB) event.SetInt("attacker", userid); g_hTimerChangeClientName[iTarget] = CreateTimer(0.6, Timer_RevertClientName, iTarget, TIMER_FLAG_NO_MAPCHANGE); - if(!IsClientSourceTV(iTarget)) + if(IsValidClient(iTarget)) { event.SetInt("ignore", iTarget); diff --git a/addons/sourcemod/scripting/sf2/client.sp b/addons/sourcemod/scripting/sf2/client.sp index a7f7d3f1..926d25aa 100644 --- a/addons/sourcemod/scripting/sf2/client.sp +++ b/addons/sourcemod/scripting/sf2/client.sp @@ -156,7 +156,7 @@ public Action CH_PassFilter(int ent1,int ent2, bool &result) SF2RoundState state = GetRoundState(); if (state == SF2RoundState_Intro || state == SF2RoundState_Outro) return Plugin_Continue; - if (MaxClients >= ent1 > 0) + if (IsValidClient(ent1)) { if (IsClientInGhostMode(ent1)) { @@ -164,7 +164,7 @@ public Action CH_PassFilter(int ent1,int ent2, bool &result) return Plugin_Changed; } } - if (MaxClients >= ent2 > 0) + if (IsValidClient(ent2)) { if (IsClientInGhostMode(ent2)) { diff --git a/addons/sourcemod/scripting/sf2/extras/commands.sp b/addons/sourcemod/scripting/sf2/extras/commands.sp index ed4e512c..35240e34 100644 --- a/addons/sourcemod/scripting/sf2/extras/commands.sp +++ b/addons/sourcemod/scripting/sf2/extras/commands.sp @@ -14,8 +14,11 @@ public void OnPluginStart() AddTempEntHook("Entity Decal", Hook_BlockDecals); //AddTempEntHook("TFExplosion", Hook_DebugExplosion); + g_bNBActionFactory = new NextBotActionFactory("SlenderBossAction"); + g_bNBActionFactory.SetEventCallback(EventResponderType_OnStuck, CBaseNPC_OnStuck); + for (int i = 0; i < MAX_BOSSES; i++) g_pPath[i] = PathFollower(_, TraceRayDontHitAnyEntity_Pathing, Path_FilterOnlyActors); - + // Get offsets. g_offsPlayerFOV = FindSendPropInfo("CBasePlayer", "m_iFOV"); if (g_offsPlayerFOV == -1) SetFailState("Couldn't find CBasePlayer offset for m_iFOV."); @@ -131,7 +134,7 @@ public void OnPluginStart() g_cvIgnoreRedPlayerDeathSwap = CreateConVar("sf2_ignore_red_player_death_team_switch", "0", "If set to 1, RED players will not switch back to the BLU team.", FCVAR_NOTIFY, true, 0.0, true, 1.0); g_cvIgnoreRedPlayerDeathSwap.AddChangeHook(OnConVarChanged); - g_cvDisableBossCrushFix = CreateConVar("sf2_disable_boss_crush_fix", "0", "Enables/disables the boss crushing patch from Secret Update 4, should only be turned on if the server introduces players getting stuck in bosses.", _, true, 0.0, true, 1.0); + g_cvDisableBossCrushFix = CreateConVar("sf2_disable_boss_crush_fix", "1", "Enables/disables the boss crushing patch from Secret Update 4, should only be off if absolutely necessary.", _, true, 0.0, true, 1.0); g_cvEnableWallHax = CreateConVar("sf2_enable_wall_hax", "0", "Enables/disables the Wall Hax special round without needing to turn on Wall Hax. This will not force the difficulty to Insane and will show player + boss outlines.", _, true, 0.0, true, 1.0); @@ -191,6 +194,20 @@ public void OnPluginStart() g_hRoundTimerSync = CreateHudSynchronizer(); g_hCookie = RegClientCookie("sf2_newcookies", "", CookieAccess_Private); + switch(g_cvDifficulty.IntValue) + { + case Difficulty_Easy: g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_NORMAL; + case Difficulty_Hard: g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_HARD; + case Difficulty_Insane: g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_INSANE; + case Difficulty_Nightmare: g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_NIGHTMARE; + case Difficulty_Apollyon: + { + if (g_bRestartSessionEnabled) g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_RESTARTSESSION; + else g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_APOLLYON; + } + default: g_flRoundDifficultyModifier = DIFFICULTYMODIFIER_NORMAL; + } + // Register console commands. RegConsoleCmd("sm_sf2", Command_MainMenu); RegConsoleCmd("sm_sl", Command_MainMenu); diff --git a/addons/sourcemod/scripting/sf2/npc.sp b/addons/sourcemod/scripting/sf2/npc.sp index eff5d4a9..29148b06 100644 --- a/addons/sourcemod/scripting/sf2/npc.sp +++ b/addons/sourcemod/scripting/sf2/npc.sp @@ -121,6 +121,8 @@ static bool g_bNPCProxySpawnEffectEnabled[MAX_BOSSES]; static float g_flNPCProxySpawnEffectLifetime[MAX_BOSSES]; static float g_flNPCProxySpawnEffectZOffset[MAX_BOSSES]; +NextBotActionFactory g_bNBActionFactory; + Handle hTimerMusic = null;//Planning to add a bosses array on. int g_iBossPathingColor[MAX_BOSSES][4]; @@ -2411,22 +2413,27 @@ void ChangeAllSlenderModels() } if (NPCGetType(iNPCIndex) == SF2BossType_Chaser) { + float flTempHitboxMins[3]; NPCChaserUpdateBossAnimation(iNPCIndex, slender, g_iSlenderState[iNPCIndex]); if (NPCGetRaidHitbox(iNPCIndex) == 1) { - SetEntPropVector(slender, Prop_Send, "m_vecMins", g_flSlenderDetectMins[iNPCIndex]); - SetEntPropVector(slender, Prop_Send, "m_vecMaxs", g_flSlenderDetectMaxs[iNPCIndex]); + CopyVector(g_flSlenderDetectMins[iNPCIndex], flTempHitboxMins); + flTempHitboxMins[2] = 10.0; + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMins", flTempHitboxMins); + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMaxs", g_flSlenderDetectMaxs[iNPCIndex]); - SetEntPropVector(slender, Prop_Send, "m_vecMinsPreScaled", g_flSlenderDetectMins[iNPCIndex]); - SetEntPropVector(slender, Prop_Send, "m_vecMaxsPreScaled", g_flSlenderDetectMaxs[iNPCIndex]); + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMinsPreScaled", flTempHitboxMins); + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMaxsPreScaled", g_flSlenderDetectMaxs[iNPCIndex]); } else if (NPCGetRaidHitbox(iNPCIndex) == 0) { - SetEntPropVector(slender, Prop_Send, "m_vecMins", HULL_HUMAN_MINS); - SetEntPropVector(slender, Prop_Send, "m_vecMaxs", HULL_HUMAN_MAXS); + CopyVector(HULL_HUMAN_MINS, flTempHitboxMins); + flTempHitboxMins[2] = 10.0; + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMins", flTempHitboxMins); + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMaxs", HULL_HUMAN_MAXS); - SetEntPropVector(slender, Prop_Send, "m_vecMinsPreScaled", HULL_HUMAN_MINS); - SetEntPropVector(slender, Prop_Send, "m_vecMaxsPreScaled", HULL_HUMAN_MAXS); + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMinsPreScaled", flTempHitboxMins); + SetEntPropVector(g_iSlenderHitbox[iNPCIndex], Prop_Send, "m_vecMaxsPreScaled", HULL_HUMAN_MAXS); } } } @@ -2722,6 +2729,7 @@ void SpawnSlender(SF2NPC_BaseNPC Npc, const float pos[3]) CBaseNPC_Locomotion locomotion = npcBoss.GetLocomotion(); npcEntity.DispatchAnimEvents(npcEntity); npcEntity.Hook_HandleAnimEvent(CBaseAnimating_HandleAnimEvent); + CBaseNPC_RemoveAllLayers(npcBoss.GetEntity()); npcEntity.Teleport(flTruePos, flVecAng); npcEntity.SetModel(sBuffer); @@ -2755,22 +2763,28 @@ void SpawnSlender(SF2NPC_BaseNPC Npc, const float pos[3]) locomotion.SetCallback(LocomotionCallback_JumpAcrossGap, JumpAcrossGapsCBase); locomotion.SetCallback(LocomotionCallback_ClimbUpToLedge, ClimbUpCBase); + float flSlenderBoxMins[3], flSlenderBoxMaxs[3]; + flSlenderBoxMins[0] = -1.0; + flSlenderBoxMins[1] = -1.0; + flSlenderBoxMaxs[0] = 1.0; + flSlenderBoxMaxs[1] = 1.0; + flSlenderBoxMaxs[2] = 1.0; if (NPCGetRaidHitbox(iBossIndex) == 1) { - npcEntity.SetPropVector(Prop_Send, "m_vecMins", g_flSlenderDetectMins[iBossIndex]); - npcEntity.SetPropVector(Prop_Send, "m_vecMaxs", g_flSlenderDetectMaxs[iBossIndex]); - - npcEntity.SetPropVector(Prop_Send, "m_vecMinsPreScaled", g_flSlenderDetectMins[iBossIndex]); - npcEntity.SetPropVector(Prop_Send, "m_vecMaxsPreScaled", g_flSlenderDetectMaxs[iBossIndex]); + npcBoss.SetBodyMins(g_flSlenderDetectMins[iBossIndex]); + npcBoss.SetBodyMaxs(g_flSlenderDetectMaxs[iBossIndex]); } else if (NPCGetRaidHitbox(iBossIndex) == 0) { - npcEntity.SetPropVector(Prop_Send, "m_vecMins", HULL_HUMAN_MINS); - npcEntity.SetPropVector(Prop_Send, "m_vecMaxs", HULL_HUMAN_MAXS); - - npcEntity.SetPropVector(Prop_Send, "m_vecMinsPreScaled", HULL_HUMAN_MINS); - npcEntity.SetPropVector(Prop_Send, "m_vecMaxsPreScaled", HULL_HUMAN_MAXS); + npcBoss.SetBodyMins(HULL_HUMAN_MINS); + npcBoss.SetBodyMaxs(HULL_HUMAN_MAXS); } + + npcEntity.SetPropVector(Prop_Send, "m_vecMins", flSlenderBoxMins); + npcEntity.SetPropVector(Prop_Send, "m_vecMaxs", flSlenderBoxMaxs); + + npcEntity.SetPropVector(Prop_Send, "m_vecMinsPreScaled", flSlenderBoxMins); + npcEntity.SetPropVector(Prop_Send, "m_vecMaxsPreScaled", flSlenderBoxMaxs); if (NPCGetModelSkinMax(iBossIndex) > 0) { @@ -2794,7 +2808,7 @@ void SpawnSlender(SF2NPC_BaseNPC Npc, const float pos[3]) } g_hSDKUpdateTransmitState.HookEntity(Hook_Pre, npcEntity.iEnt, Hook_BossUpdateTransmitState); - npcEntity.AddFlag(FL_NPC); + SetEntityFlags(npcEntity.iEnt, FL_NPC); SetEntityTransmitState(npcEntity.iEnt, FL_EDICT_ALWAYS); //if (!g_cvDisableBossCrushFix.BoolValue) SetEntData(iBoss, FindSendPropInfo("CTFBaseBoss", "m_lastHealthPercentage") + 28, false, 4, true); @@ -2842,23 +2856,25 @@ void SpawnSlender(SF2NPC_BaseNPC Npc, const float pos[3]) float flTempHitboxMins[3]; g_iSlenderHitbox[iBossIndex] = CreateEntityByName("base_boss"); Address aLocomotion = SF2_GetLocomotionInterface(g_iSlenderHitbox[iBossIndex]); - + SetEntityModel(g_iSlenderHitbox[iBossIndex], sBuffer); TeleportEntity(g_iSlenderHitbox[iBossIndex], flTruePos, flVecAng, NULL_VECTOR); DispatchKeyValue(g_iSlenderHitbox[iBossIndex],"TeamNum","1"); DispatchSpawn(g_iSlenderHitbox[iBossIndex]); ActivateEntity(g_iSlenderHitbox[iBossIndex]); - SetEntityMoveType(g_iSlenderHitbox[iBossIndex], MOVETYPE_NONE); + SetEntityMoveType(g_iSlenderHitbox[iBossIndex],MOVETYPE_NONE); SetEntityRenderMode(g_iSlenderHitbox[iBossIndex], RENDER_TRANSCOLOR); SetEntityRenderColor(g_iSlenderHitbox[iBossIndex], 0, 0, 0, 0); SetVariantString("!activator"); AcceptEntityInput(g_iSlenderHitbox[iBossIndex], "SetParent", npcEntity.iEnt); AcceptEntityInput(g_iSlenderHitbox[iBossIndex], "EnableShadow"); AcceptEntityInput(g_iSlenderHitbox[iBossIndex], "DisableShadow"); + if (SF_IsBoxingMap()) SetEntProp(g_iSlenderHitbox[iBossIndex], Prop_Send, "m_CollisionGroup", COLLISION_GROUP_DEBRIS_TRIGGER); //Block base_boss's ai. SetEntProp(g_iSlenderHitbox[iBossIndex], Prop_Data,"m_nNextThinkTick",-1); g_iSlenderHitboxOwner[g_iSlenderHitbox[iBossIndex]] = npcEntity.iEnt; SDKHook(g_iSlenderHitbox[iBossIndex], SDKHook_OnTakeDamageAlive, Hook_HitboxOnTakeDamage); + //SDKHook(g_iSlenderHitbox[iBossIndex], SDKHook_ShouldCollide, Hook_HitBoxShouldCollide); DHookRaw(g_hShouldCollide, true, aLocomotion); if (SF_SpecialRound(SPECIALROUND_TINYBOSSES)) { @@ -3307,7 +3323,12 @@ public Action Timer_BossMarked(Handle timer, any entref) public bool Hook_HitBoxShouldCollide(int slender,int collisiongroup,int contentsmask, bool originalResult) { - return false; + if ((contentsmask & CONTENTS_MONSTERCLIP) || (contentsmask & CONTENTS_PLAYERCLIP)) + { + //CONTENTS_MOVEABLE seems to make the hitbox bullet proof + return false; + } + return originalResult; } public bool Hook_BossShouldCollide(int slender,int collisiongroup,int contentsmask, bool originalResult) @@ -4567,7 +4588,7 @@ stock int SpawnSlenderModel(int iBossIndex, const float pos[3], bool bDeathCam = char buffer[PLATFORM_MAX_PATH], sProfile[SF2_MAX_PROFILE_NAME_LENGTH]; NPCGetProfile(iBossIndex, sProfile, sizeof(sProfile)); - float flPlaybackRate, flTempFootsteps; + float flPlaybackRate, flTempFootsteps, flCycle; int iDifficulty = GetLocalGlobalDifficulty(iBossIndex); GetSlenderModel(iBossIndex, _, buffer, sizeof(buffer)); @@ -4599,14 +4620,14 @@ stock int SpawnSlenderModel(int iBossIndex, const float pos[3], bool bDeathCam = ActivateEntity(iSlenderModel); if (!bDeathCam) { - GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, buffer, sizeof(buffer), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, buffer, sizeof(buffer), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } else { - bool bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_DeathcamAnimations, buffer, sizeof(buffer), flPlaybackRate, 1, _, flTempFootsteps); + bool bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_DeathcamAnimations, buffer, sizeof(buffer), flPlaybackRate, 1, _, flTempFootsteps, flCycle); if (!bAnimationFound || strcmp(buffer,"") <= 0) { - GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, buffer, sizeof(buffer), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, buffer, sizeof(buffer), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } if (buffer[0] != '\0') @@ -4620,6 +4641,7 @@ stock int SpawnSlenderModel(int iBossIndex, const float pos[3], bool bDeathCam = SetVariantFloat(flPlaybackRate); AcceptEntityInput(iSlenderModel, "SetPlaybackRate"); + SetEntPropFloat(iSlenderModel, Prop_Data, "m_flCycle", flCycle); if (SF_SpecialRound(SPECIALROUND_TINYBOSSES)) { diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp index ad9cfe60..68505e25 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp @@ -287,6 +287,7 @@ enum struct BaseAttackStructure int BaseAttackExplosiveDanceRadius; int BaseAttackWeaponTypeInt; bool BaseAttackIgnoreAlwaysLooking; + bool BaseAttackGestures; } int g_iSlenderOldState[MAX_BOSSES]; @@ -874,6 +875,11 @@ float NPCChaserGetAttackBeginFOV(int iNPCIndex, int iAttackIndex) return g_NPCBaseAttacks[iNPCIndex][iAttackIndex][1].BaseAttackBeginFOV; } +bool NPCChaserGetAttackGestureState(int iNPCIndex, int iAttackIndex) +{ + return g_NPCBaseAttacks[iNPCIndex][iAttackIndex][1].BaseAttackGestures; +} + int NPCSetCurrentAttackIndex(int iNPCIndex, int iAttackIndex) { g_iNPCCurrentAttackIndex[iNPCIndex] = iAttackIndex; @@ -1776,6 +1782,7 @@ int NPCChaserOnSelectProfile(int iNPCIndex, bool bInvincible) g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackLaserDuration = profile.GetAttackLaserDuration(i); g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackLaserNoise = profile.GetAttackLaserNoise(i); g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackPullIn = profile.CanAttackPullIn(i); + g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackGestures = profile.HasAttackGestures(i); g_NPCBaseAttacks[iNPCIndex][i][1].CurrentAttackRepeat = 0; } @@ -2085,6 +2092,7 @@ static void NPCChaserResetValues(int iNPCIndex) g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackBlockOnDifficulty = 0; g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackExplosiveDanceRadius = 0; g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackWeaponTypeInt = 0; + g_NPCBaseAttacks[iNPCIndex][i][1].BaseAttackGestures = false; } g_bNPCEarthquakeFootstepsEnabled[iNPCIndex] = false; @@ -2363,9 +2371,9 @@ public int NPCChaserGetClosestPlayer(int iSlender) void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSpawn = false) { char sAnimation[256]; - float flPlaybackRate, flTempFootsteps; + float flPlaybackRate, flTempFootsteps, flCycle; bool bAnimationFound = false; - + int iDifficulty = GetLocalGlobalDifficulty(iBossIndex); char sProfile[SF2_MAX_PROFILE_NAME_LENGTH]; @@ -2381,109 +2389,109 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { case Difficulty_Normal: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } case Difficulty_Hard: { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } case Difficulty_Insane: { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } case Difficulty_Nightmare: { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } case Difficulty_Apollyon: { - bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound5 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); if (bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_IdleAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderIdleFootstepTime[iBossIndex], flCycle); } } } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_SpawnAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_SpawnAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } } case STATE_WANDER: @@ -2496,102 +2504,102 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { case Difficulty_Normal: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } case Difficulty_Hard: { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Insane: { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Nightmare: { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Apollyon: { - bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound5 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } } @@ -2602,102 +2610,102 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { case Difficulty_Normal: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } case Difficulty_Hard: { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Insane: { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Nightmare: { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Apollyon: { - bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound5 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CrawlWalkAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } } @@ -2714,102 +2722,102 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { case Difficulty_Normal: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } case Difficulty_Hard: { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Insane: { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Nightmare: { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } case Difficulty_Apollyon: { - bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound5 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_WalkAlertAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderWalkFootstepTime[iBossIndex], flCycle); } } } @@ -3039,121 +3047,121 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { case Difficulty_Normal: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } case Difficulty_Hard: { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } case Difficulty_Insane: { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } case Difficulty_Nightmare: { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } case Difficulty_Apollyon: { - bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound5 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } } } else if (g_bNPCUsesChaseInitialAnimation[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_ChaseInitialAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_ChaseInitialAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } else if (g_bNPCUsesRageAnimation1[iBossIndex] || g_bNPCUsesRageAnimation2[iBossIndex] || g_bNPCUsesRageAnimation3[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RageAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_RageAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } else if (g_bNPCUsesCloakStartAnimation[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CloakStartAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CloakStartAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } else if (g_bNPCUsesCloakEndAnimation[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CloakEndAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_CloakEndAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } else if (g_bNPCIsCrawling[iBossIndex] && !g_bNPCUsesChaseInitialAnimation[iBossIndex] && !g_bNPCUsesCloakStartAnimation[iBossIndex] && !g_bNPCUsesCloakEndAnimation[iBossIndex] && @@ -3163,102 +3171,102 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { case Difficulty_Normal: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } case Difficulty_Hard: { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } case Difficulty_Insane: { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } case Difficulty_Nightmare: { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } case Difficulty_Apollyon: { - bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound5 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound5 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound4 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound4 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound3 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound3 || strcmp(sAnimation, "") <= 0) { - bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bool bAnimationFound2 = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); if (!bAnimationFound2 || strcmp(sAnimation, "") <= 0) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 2, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 3, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 4, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserANimation_CrawlRunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, iDifficulty, _, g_flSlenderRunFootstepTime[iBossIndex], flCycle); } } } @@ -3268,20 +3276,20 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { if (!g_bNPCUseFireAnimation[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_AttackAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, NPCGetCurrentAttackIndex(iBossIndex) + 1, g_flSlenderAttackFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_AttackAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, NPCGetCurrentAttackIndex(iBossIndex) + 1, g_flSlenderAttackFootstepTime[iBossIndex], flCycle); } else { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_ShootAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, NPCGetCurrentAttackIndex(iBossIndex) + 1, g_flSlenderAttackFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_ShootAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, NPCGetCurrentAttackIndex(iBossIndex) + 1, g_flSlenderAttackFootstepTime[iBossIndex], flCycle); } } case STATE_STUN: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_StunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderStunFootstepTime[iBossIndex]); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_StunAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, g_flSlenderStunFootstepTime[iBossIndex], flCycle); } case STATE_DEATHCAM: { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_DeathcamAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_DeathcamAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } } switch (iState) @@ -3290,11 +3298,11 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp { if (g_bNPCUseStartFleeAnimation[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_FleeInitialAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_FleeInitialAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } else if (g_bNPCUsesHealAnimation[iBossIndex]) { - bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_HealAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps); + bAnimationFound = GetProfileAnimation(iBossIndex, sProfile, ChaserAnimation_HealAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, 1, _, flTempFootsteps, flCycle); } } } @@ -3311,9 +3319,9 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp if (action != Plugin_Handled) { g_flNPCCurrentAnimationSequencePlaybackRate[iBossIndex] = flPlaybackRate; - g_iNPCCurrentAnimationSequence[iBossIndex] = EntitySetAnimation(iEnt, sAnimation, flPlaybackRate); + g_iNPCCurrentAnimationSequence[iBossIndex] = EntitySetAnimation(iEnt, sAnimation, flPlaybackRate, _, flCycle); g_sNPCurrentAnimationSequenceName[iBossIndex] = sAnimation; - EntitySetAnimation(iEnt, sAnimation, flPlaybackRate); //Fix an issue where an anim could start on the wrong frame. + EntitySetAnimation(iEnt, sAnimation, flPlaybackRate, _, flCycle); //Fix an issue where an anim could start on the wrong frame. if (g_iNPCCurrentAnimationSequence[iBossIndex] <= -1) { g_iNPCCurrentAnimationSequence[iBossIndex] = 0; @@ -3321,10 +3329,34 @@ void NPCChaserUpdateBossAnimation(int iBossIndex, int iEnt, int iState, bool bSp } bool bAnimationLoop = (iState == STATE_IDLE || iState == STATE_ALERT || (iState == STATE_CHASE && !g_bNPCUsesChaseInitialAnimation[iBossIndex] && !g_bNPCUsesRageAnimation1[iBossIndex] && !g_bNPCUsesRageAnimation2[iBossIndex] && !g_bNPCUsesRageAnimation3[iBossIndex] && !g_bNPCUseStartFleeAnimation[iBossIndex] && !g_bNPCUsesHealAnimation[iBossIndex] && !g_bNPCUsesCloakStartAnimation[iBossIndex] && !g_bNPCUsesCloakEndAnimation[iBossIndex]) - || iState == STATE_WANDER); + || iState == STATE_WANDER + || (iState == STATE_ATTACK && NPCChaserGetAttackWhileRunningState(iBossIndex, NPCGetCurrentAttackIndex(iBossIndex)))); SetEntProp(iEnt, Prop_Data, "m_bSequenceLoops", bAnimationLoop); } } + if (iState == STATE_ATTACK && NPCChaserGetAttackGestureState(iBossIndex, NPCGetCurrentAttackIndex(iBossIndex))) + { + float flGestureCycle, flDuration; + bAnimationFound = GetProfileGesture(iBossIndex, sProfile, ChaserAnimation_AttackAnimations, sAnimation, sizeof(sAnimation), flPlaybackRate, flCycle, NPCGetCurrentAttackIndex(iBossIndex) + 1); + if (bAnimationFound && strcmp(sAnimation, "") != 0) + { + CBaseCombatCharacter overlay = CBaseCombatCharacter(iEnt); + int iGesture = overlay.LookupSequence(sAnimation); + if (iGesture != -1) + { + flDuration = overlay.SequenceDuration(iGesture); + int iLayer = overlay.AddLayeredSequence(iGesture, 1); + overlay.SetLayerDuration(iLayer, flDuration); + overlay.SetLayerPlaybackRate(iLayer, flPlaybackRate); + overlay.SetLayerCycle(iLayer, flGestureCycle); + overlay.SetLayerAutokill(iLayer, true); + } + } + } + if (!g_bSlenderAttacking[iBossIndex]) + { + CBaseNPC_RemoveAllLayers(iEnt); + } } public Action Timer_SlenderChaseInitialTimer(Handle timer, any entref) @@ -3758,6 +3790,7 @@ public MRESReturn ShouldCollideWith(Address pThis, Handle hReturn, Handle hParam } return MRES_Ignored; } + public MRESReturn CBaseAnimating_HandleAnimEvent(int pThis, Handle hParams) { int iBossIndex = NPCGetFromEntIndex(pThis); @@ -4793,3 +4826,7 @@ stock bool NPC_CanAttackProps(int iBossIndex, float flAttackRange, float flAttac } return false; } +stock void CBaseNPC_OnStuck(NextBotAction action, int actor) +{ + return; +} \ No newline at end of file diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp index 6cc39e1c..e490af99 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp @@ -1764,6 +1764,10 @@ static Action Timer_SlenderChaseBossAttackEnd(Handle timer, any entref) if (iBossIndex == -1) return Plugin_Stop; if (timer != g_hSlenderAttackTimer[iBossIndex]) return Plugin_Stop; + + CBaseNPC npc = TheNPCs.FindNPCByEntIndex(slender); + CBaseNPC_Locomotion loco = npc.GetLocomotion(); + loco.ClearStuckStatus(); g_bSlenderAttacking[iBossIndex] = false; g_bNPCStealingLife[iBossIndex] = false; @@ -1773,6 +1777,7 @@ static Action Timer_SlenderChaseBossAttackEnd(Handle timer, any entref) g_bNPCAlreadyAttacked[iBossIndex] = false; g_bNPCUseFireAnimation[iBossIndex] = false; g_hSlenderLaserTimer[iBossIndex] = null; + CBaseNPC_RemoveAllLayers(slender); return Plugin_Stop; } @@ -1787,6 +1792,10 @@ static Action Timer_SlenderChaseBossAttackEndBackup(Handle timer, any entref) if (iBossIndex == -1) return Plugin_Stop; if (timer != g_hSlenderBackupAtkTimer[iBossIndex]) return Plugin_Stop; + + CBaseNPC npc = TheNPCs.FindNPCByEntIndex(slender); + CBaseNPC_Locomotion loco = npc.GetLocomotion(); + loco.ClearStuckStatus(); g_bSlenderAttacking[iBossIndex] = false; g_bNPCStealingLife[iBossIndex] = false; @@ -1796,5 +1805,6 @@ static Action Timer_SlenderChaseBossAttackEndBackup(Handle timer, any entref) g_bNPCAlreadyAttacked[iBossIndex] = false; g_bNPCUseFireAnimation[iBossIndex] = false; g_hSlenderLaserTimer[iBossIndex] = null; + CBaseNPC_RemoveAllLayers(slender); return Plugin_Stop; } diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp index a9aff3b6..70e5efdd 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp @@ -25,8 +25,6 @@ public Action Timer_SlenderChaseBossThink(Handle timer, any entref) //God damn y INextBot bot = npc.GetBot(); CBaseCombatCharacter npcEntity = CBaseCombatCharacter(npc.GetEntity()); - loco.ClearStuckStatus(); - #if defined DEBUG SendDebugMessageToPlayers(DEBUG_BOSS_IDLE, 1, "g_flSlenderTimeUntilKill[%d]: %f", iBossIndex, g_flSlenderTimeUntilKill[iBossIndex] - GetGameTime()); #endif @@ -1171,6 +1169,7 @@ public Action Timer_SlenderChaseBossThink(Handle timer, any entref) //God damn y { RemoveSlender(iBossIndex); } + loco.ClearStuckStatus(); if (NPCHasAttribute(iBossIndex, "add stun health on stun")) { float flValue = NPCGetAttributeValue(iBossIndex, "add stun health on stun"); @@ -1994,6 +1993,8 @@ public Action Timer_SlenderChaseBossThink(Handle timer, any entref) //God damn y { g_bSlenderAttacking[iBossIndex] = true; npcEntity.RemoveAllGestures(); + CBaseNPC_RemoveAllLayers(slender); + loco.ClearStuckStatus(); int iAttackIndex = NPCGetCurrentAttackIndex(iBossIndex); if (!NPCChaserGetAttackWhileRunningState(iBossIndex, iAttackIndex)) { diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp index 8d6eaa1c..58c1ecaa 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp @@ -77,8 +77,18 @@ public void SlenderChaseBossProcessMovement(int iBoss) { if (GetGameTime() < g_flNPCBaseAttackRunDurationTime[iBossIndex][iCurrentAttackIndex]) { - if (npc != INVALID_NPC) npc.flWalkSpeed = NPCChaserGetAttackRunSpeed(iBossIndex, iCurrentAttackIndex, iDifficulty) * g_flSlenderSpeedMultiplier[iBossIndex]; - if (npc != INVALID_NPC) npc.flRunSpeed = NPCChaserGetAttackRunSpeed(iBossIndex, iCurrentAttackIndex, iDifficulty) * g_flSlenderSpeedMultiplier[iBossIndex]; + float flAttackSpeed, flOriginalSpeed; + flOriginalSpeed = NPCChaserGetAttackRunSpeed(iBossIndex, iCurrentAttackIndex, iDifficulty); + if (g_flRoundDifficultyModifier > 1.0) + { + flAttackSpeed = flOriginalSpeed + ((flOriginalSpeed * g_flRoundDifficultyModifier) / 15.0) + (NPCGetAnger(iBossIndex) * g_flRoundDifficultyModifier); + } + else + { + flAttackSpeed = flOriginalSpeed + NPCGetAnger(iBossIndex); + } + if (npc != INVALID_NPC) npc.flWalkSpeed = flAttackSpeed * g_flSlenderSpeedMultiplier[iBossIndex]; + if (npc != INVALID_NPC) npc.flRunSpeed = flAttackSpeed * g_flSlenderSpeedMultiplier[iBossIndex]; } else { @@ -88,8 +98,19 @@ public void SlenderChaseBossProcessMovement(int iBoss) } else { - if (npc != INVALID_NPC) npc.flWalkSpeed = NPCChaserGetAttackRunSpeed(iBossIndex, iCurrentAttackIndex, iDifficulty) * g_flSlenderSpeedMultiplier[iBossIndex]; - if (npc != INVALID_NPC) npc.flRunSpeed = NPCChaserGetAttackRunSpeed(iBossIndex, iCurrentAttackIndex, iDifficulty) * g_flSlenderSpeedMultiplier[iBossIndex]; + float flAttackSpeed, flOriginalSpeed; + flOriginalSpeed = NPCChaserGetAttackRunSpeed(iBossIndex, iCurrentAttackIndex, iDifficulty); + if (g_flRoundDifficultyModifier > 1.0) + { + flAttackSpeed = flOriginalSpeed + ((flOriginalSpeed * g_flRoundDifficultyModifier) / 15.0) + (NPCGetAnger(iBossIndex) * g_flRoundDifficultyModifier); + } + else + { + flAttackSpeed = flOriginalSpeed + NPCGetAnger(iBossIndex); + } + + if (npc != INVALID_NPC) npc.flWalkSpeed = flAttackSpeed * g_flSlenderSpeedMultiplier[iBossIndex]; + if (npc != INVALID_NPC) npc.flRunSpeed = flAttackSpeed * g_flSlenderSpeedMultiplier[iBossIndex]; } } else @@ -380,7 +401,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) hullcheckmins[2] += loco.GetStepHeight(); hullcheckmaxs[2] += 5.0; - if (!g_bNPCVelocityCancel[iBossIndex] && IsSpaceOccupiedIgnorePlayers(flMyPos, hullcheckmins, hullcheckmaxs, iBoss))//The boss will start to merge with shits, cancel out velocity. + if (!g_bNPCVelocityCancel[iBossIndex] && IsSpaceOccupiedIgnorePlayersAndEnts(flMyPos, hullcheckmins, hullcheckmaxs, iBoss))//The boss will start to merge with shits, cancel out velocity. { float vec3Origin[3]; loco.SetVelocity(vec3Origin); @@ -397,13 +418,13 @@ public void SlenderChaseBossProcessMovement(int iBoss) flCrawlDetectMins = g_flNPCCrawlDetectMins[iBossIndex]; flCrawlDetectMaxs = g_flNPCCrawlDetectMaxs[iBossIndex]; - if (IsSpaceOccupiedIgnorePlayers(flMyPos, flCrawlDetectMins, flCrawlDetectMaxs, iBoss) && !g_bNPCIsCrawling[iBossIndex]) + if (IsSpaceOccupiedIgnorePlayersAndEnts(flMyPos, flCrawlDetectMins, flCrawlDetectMaxs, iBoss) && !g_bNPCIsCrawling[iBossIndex]) { NPCChaserUpdateBossAnimation(iBossIndex, iBoss, g_iSlenderState[iBossIndex]); g_bNPCIsCrawling[iBossIndex] = true; g_bNPCChangeToCrawl[iBossIndex] = true; } - if (!IsSpaceOccupiedIgnorePlayers(flMyPos, flCrawlDetectMins, flCrawlDetectMaxs, iBoss) && g_bNPCIsCrawling[iBossIndex]) + if (!IsSpaceOccupiedIgnorePlayersAndEnts(flMyPos, flCrawlDetectMins, flCrawlDetectMaxs, iBoss) && g_bNPCIsCrawling[iBossIndex]) { NPCChaserUpdateBossAnimation(iBossIndex, iBoss, g_iSlenderState[iBossIndex]); g_bNPCIsCrawling[iBossIndex] = false; @@ -411,7 +432,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) } } - if (iState == STATE_CHASE || iState == STATE_ALERT || iState == STATE_WANDER) + if (iState == STATE_CHASE || iState == STATE_ALERT || iState == STATE_WANDER || (iState == STATE_ATTACK && NPCChaserGetAttackWhileRunningState(iBossIndex, iAttackIndex))) { int iPitch = combatChar.LookupPoseParameter("body_pitch"); int iYaw = combatChar.LookupPoseParameter("body_yaw"); @@ -485,15 +506,13 @@ public void SlenderChaseBossProcessMovement(int iBoss) { if (g_flLastStuckTime[iBossIndex] == 0.0) g_flLastStuckTime[iBossIndex] = GetGameTime(); - if (g_flLastStuckTime[iBossIndex] <= GetGameTime()-1.0 && !g_bNPCRunningToHeal[iBossIndex] && !g_bNPCHealing[iBossIndex] && + if ((g_flLastStuckTime[iBossIndex] <= GetGameTime()-1.0 || loco.GetStuckDuration() >= 1.0) && !g_bNPCRunningToHeal[iBossIndex] && !g_bNPCHealing[iBossIndex] && g_pPath[iBossIndex].FirstSegment() != NULL_PATH_SEGMENT && g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].FirstSegment()) != NULL_PATH_SEGMENT) { float vecMovePos[3]; Segment sSegment; - if (g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].FirstSegment())) != NULL_PATH_SEGMENT) //See if we can get the third segment, thats often a nicer solution for specific situations the second segment can't resolve. - sSegment = g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].FirstSegment())); - else sSegment = g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].FirstSegment()); + sSegment = g_pPath[iBossIndex].NextSegment(g_pPath[iBossIndex].FirstSegment()); sSegment.GetPos(vecMovePos); bool bPathResolved = false; @@ -501,7 +520,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) { if (NPCGetRaidHitbox(iBossIndex) == 1) { - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) + if (!IsSpaceOccupied(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -511,7 +530,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) else { vecMovePos[2] += loco.GetStepHeight(); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) + if (!IsSpaceOccupied(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -522,7 +541,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) } else if (NPCGetRaidHitbox(iBossIndex) == 0) { - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) + if (!IsSpaceOccupied(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -532,7 +551,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) else { vecMovePos[2] += loco.GetStepHeight(); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) + if (!IsSpaceOccupied(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -546,7 +565,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) { if (NPCGetRaidHitbox(iBossIndex) == 1) { - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) + if (!IsSpaceOccupied(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) { bPathResolved = false; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -556,7 +575,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) else { vecMovePos[2] += loco.GetStepHeight(); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) + if (!IsSpaceOccupied(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -573,7 +592,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) if (area != NULL_AREA) { area.GetCenter(vecMovePos); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) + if (!IsSpaceOccupied(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) { bPathResolved = false; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -583,7 +602,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) else { vecMovePos[2] += loco.GetStepHeight(); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) + if (!IsSpaceOccupied(vecMovePos, g_flSlenderDetectMins[iBossIndex], g_flSlenderDetectMaxs[iBossIndex], iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -662,7 +681,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) } else if (NPCGetRaidHitbox(iBossIndex) == 0) { - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) + if (!IsSpaceOccupied(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) { bPathResolved = false; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -672,7 +691,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) else { vecMovePos[2] += loco.GetStepHeight(); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) + if (!IsSpaceOccupied(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -689,7 +708,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) if (area != NULL_AREA) { area.GetCenter(vecMovePos); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) + if (!IsSpaceOccupied(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) { bPathResolved = false; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -699,7 +718,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) else { vecMovePos[2] += loco.GetStepHeight(); - if (!IsSpaceOccupiedIgnorePlayers(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) + if (!IsSpaceOccupied(vecMovePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, iBoss)) { bPathResolved = true; TeleportEntity(iBoss, vecMovePos, NULL_VECTOR, NULL_VECTOR); @@ -779,6 +798,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) } if (bPathResolved) { + loco.ClearStuckStatus(); g_flLastStuckTime[iBossIndex] = 0.0; } } @@ -786,6 +806,7 @@ public void SlenderChaseBossProcessMovement(int iBoss) } else { + loco.ClearStuckStatus(); g_flLastStuckTime[iBossIndex] = 0.0; g_flLastPos[iBossIndex] = flMyPos; } @@ -1043,15 +1064,15 @@ stock bool SlenderChaseBoss_OnStuckResolvePath(int slender, float flMyPos[3], fl GetPositionForward(flMyPos, flMyAng, flFreePos, float(r)); // Perform a line of sight check to avoid spawning players in unreachable map locations. - TR_TraceRayFilter(flMyPos, flFreePos, MASK_NPCSOLID, RayType_EndPoint, TraceRayDontHitAnyEntity, slender); + TR_TraceRayFilter(flMyPos, flFreePos, CONTENTS_SOLID | CONTENTS_MOVEABLE | CONTENTS_MIST | CONTENTS_GRATE | CONTENTS_MONSTERCLIP, RayType_EndPoint, TraceRayDontHitAnyEntity, slender); if(!TR_DidHit()) { // Perform an other line of sight check to avoid moving in a area that can't reach the original goal! - TR_TraceRayFilter(flFreePos, flGoalPosition, MASK_NPCSOLID, RayType_EndPoint, TraceRayDontHitAnyEntity, slender); + TR_TraceRayFilter(flFreePos, flGoalPosition, CONTENTS_SOLID | CONTENTS_MOVEABLE | CONTENTS_MIST | CONTENTS_GRATE | CONTENTS_MONSTERCLIP, RayType_EndPoint, TraceRayDontHitAnyEntity, slender); if(!TR_DidHit()) { - TR_TraceHullFilter(flMyPos, flFreePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, MASK_NPCSOLID, TraceRayDontHitAnyEntity, slender); + TR_TraceHullFilter(flMyPos, flFreePos, HULL_HUMAN_MINS, HULL_HUMAN_MAXS, CONTENTS_SOLID | CONTENTS_MOVEABLE | CONTENTS_MIST | CONTENTS_GRATE | CONTENTS_MONSTERCLIP, TraceRayDontHitAnyEntity, slender); if(!TR_DidHit()) { diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp index 78fcccec..d24cec7b 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp @@ -326,26 +326,26 @@ public void Hook_SlenderOnTakeDamage(int victim, int attacker, int inflictor, fl float flMyEyePos[3]; SlenderGetAbsOrigin(iBossIndex, flMyEyePos); float flMyEyePosEx[3]; - GetEntPropVector(slender, Prop_Send, "m_vecMaxs", flMyEyePosEx); + GetEntPropVector(g_iSlenderHitbox[iBossIndex], Prop_Send, "m_vecMaxs", flMyEyePosEx); flMyEyePos[2]+=flMyEyePosEx[2]; TE_Particle(g_iParticle[CriticalHit], flMyEyePos, flMyEyePos); TE_SendToAll(); - EmitSoundToAll(CRIT_SOUND, slender, SNDCHAN_AUTO, SNDLEVEL_SCREAMING); + EmitSoundToAll(CRIT_SOUND, g_iSlenderHitbox[iBossIndex], SNDCHAN_AUTO, SNDLEVEL_SCREAMING); } else if(bMiniCrit) { float flMyEyePos[3]; SlenderGetAbsOrigin(iBossIndex, flMyEyePos); float flMyEyePosEx[3]; - GetEntPropVector(slender, Prop_Send, "m_vecMaxs", flMyEyePosEx); + GetEntPropVector(g_iSlenderHitbox[iBossIndex], Prop_Send, "m_vecMaxs", flMyEyePosEx); flMyEyePos[2]+=flMyEyePosEx[2]; TE_Particle(g_iParticle[MiniCritHit], flMyEyePos, flMyEyePos); TE_SendToAll(); - EmitSoundToAll(MINICRIT_SOUND, slender, SNDCHAN_AUTO, SNDLEVEL_SCREAMING); + EmitSoundToAll(MINICRIT_SOUND, g_iSlenderHitbox[iBossIndex], SNDCHAN_AUTO, SNDLEVEL_SCREAMING); } } @@ -381,10 +381,13 @@ public void NPCBossTriggerStun(int iBossIndex, int victim, char sProfile[SF2_MAX int iDifficulty = GetLocalGlobalDifficulty(iBossIndex); CBaseNPC npc = TheNPCs.FindNPCByEntIndex(victim); CBaseNPC_Locomotion loco = npc.GetLocomotion(); + CBaseCombatCharacter overlay = CBaseCombatCharacter(victim); npc.flWalkSpeed = 0.0; npc.flRunSpeed = 0.0; int iState = g_iSlenderState[iBossIndex]; bool bDoChasePersistencyInit = false; + overlay.RemoveAllGestures(); + CBaseNPC_RemoveAllLayers(victim); if (g_flLastStuckTime[iBossIndex] != 0.0) g_flLastStuckTime[iBossIndex] = GetGameTime(); loco.ClearStuckStatus(); g_iSlenderState[iBossIndex] = STATE_STUN; diff --git a/addons/sourcemod/scripting/sf2/profiles/profile_chaser.sp b/addons/sourcemod/scripting/sf2/profiles/profile_chaser.sp index 5167a7c7..182c1f7e 100644 --- a/addons/sourcemod/scripting/sf2/profiles/profile_chaser.sp +++ b/addons/sourcemod/scripting/sf2/profiles/profile_chaser.sp @@ -651,6 +651,7 @@ enum ChaserProfileAttackData_UseOnDifficulty, ChaserProfileAttackData_BlockOnDifficulty, ChaserProfileAttackData_ExplosiveDanceRadius, + ChaserProfileAttackData_Gestures, ChaserProfileAttackData_MaxStats }; @@ -1583,6 +1584,11 @@ methodmap SF2ChaserBossProfile < SF2BaseBossProfile return GetChaserProfileAttackPullIn(this.UniqueProfileIndex, attackIndex); } + public bool HasAttackGestures(int attackIndex) + { + return GetChaserProfileAttackGesturesState(this.UniqueProfileIndex, attackIndex); + } + public void GetSmiteColor(int color[4]) { color[0] = GetChaserProfileSmiteColorR(this.UniqueProfileIndex); @@ -2760,6 +2766,14 @@ int GetChaserProfileAttackExplosiveDanceRadius(int iChaserProfileIndex,int iAtta return hAttacks.Get(iAttackIndex, ChaserProfileAttackData_ExplosiveDanceRadius); } +bool GetChaserProfileAttackGesturesState(int iChaserProfileIndex,int iAttackIndex) +{ + ArrayList hAttacks = g_hChaserProfileData.Get(iChaserProfileIndex, ChaserProfileData_Attacks); + + return view_as(hAttacks.Get(iAttackIndex, ChaserProfileAttackData_Gestures)); +} + + bool GetChaserProfileEnableAdvancedDamageEffects(int iChaserProfileIndex) { return view_as(g_hChaserProfileData.Get(iChaserProfileIndex, ChaserProfileData_AdvancedDamageEffectsEnabled)); diff --git a/addons/sourcemod/scripting/sf2/profiles/profile_chaser_precache.sp b/addons/sourcemod/scripting/sf2/profiles/profile_chaser_precache.sp index f08fd4b1..23280c45 100644 --- a/addons/sourcemod/scripting/sf2/profiles/profile_chaser_precache.sp +++ b/addons/sourcemod/scripting/sf2/profiles/profile_chaser_precache.sp @@ -1398,6 +1398,8 @@ public int ParseChaserProfileAttacks(KeyValues kv,int iUniqueProfileIndex) int iAttackExplosiveDanceRadius = kv.GetNum("attack_explosivedance_radius", 350); + bool bAttackGestures = view_as(kv.GetNum("attack_gestures", 0)); + int iAttackIndex = hAttacks.Push(-1); hAttacks.Set(iAttackIndex, iAttackType, ChaserProfileAttackData_Type); @@ -1519,6 +1521,7 @@ public int ParseChaserProfileAttacks(KeyValues kv,int iUniqueProfileIndex) hAttacks.Set(iAttackIndex, iAttackUseOnDifficulty, ChaserProfileAttackData_UseOnDifficulty); hAttacks.Set(iAttackIndex, iAttackBlockOnDifficulty, ChaserProfileAttackData_BlockOnDifficulty); hAttacks.Set(iAttackIndex, iAttackExplosiveDanceRadius, ChaserProfileAttackData_ExplosiveDanceRadius); + hAttacks.Set(iAttackIndex, bAttackGestures, ChaserProfileAttackData_Gestures); if (iMaxAttacks > 0)//Backward compatibility { @@ -1532,11 +1535,60 @@ public int ParseChaserProfileAttacks(KeyValues kv,int iUniqueProfileIndex) return iMaxAttacks; } -stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnimationSection, char[] sAnimation, int iLenght, float &flPlaybackRate, int difficulty, int iAnimationIndex = -1, float &flFootstepInterval) +stock bool GetProfileGesture(int iBossIndex, const char[] sProfile, int iAnimationSection, char[] sAnimation, int iLenght, float &flPlaybackRate, float &flCycle, int iAnimationIndex = -1) +{ + g_hConfig.Rewind(); + g_hConfig.JumpToKey(sProfile); + char sAnimationSection[40], sKeyGestureName[65], sKeyGesturePlayBackRate[65], sKeyGestureCycle[65]; + switch (iAnimationSection) + { + case ChaserAnimation_AttackAnimations: + { + strcopy(sAnimationSection, sizeof(sAnimationSection), "attack"); + strcopy(sKeyGestureName, sizeof(sKeyGestureName), "gesture_attack"); + strcopy(sKeyGesturePlayBackRate, sizeof(sKeyGesturePlayBackRate), "gesture_attack_playbackrate"); + strcopy(sKeyGestureCycle, sizeof(sKeyGestureCycle), "gesture_attack_cycle"); + } + } + if (g_hConfig.JumpToKey("animations")) + { + if (g_hConfig.JumpToKey(sAnimationSection)) + { + char sNum[3]; + if (iAnimationIndex == -1) + { + int iTotalAnimation; + for (iAnimationIndex = 1; iAnimationIndex <= SF2_CHASER_BOSS_MAX_ANIMATIONS; iAnimationIndex++) + { + FormatEx(sNum, sizeof(sNum), "%d", iAnimationIndex); + if (g_hConfig.JumpToKey(sNum)) + { + iTotalAnimation++; + g_hConfig.GoBack(); + } + } + iAnimationIndex = GetRandomInt(1, iTotalAnimation); + } + FormatEx(sNum, sizeof(sNum), "%d", iAnimationIndex); + if (!g_hConfig.JumpToKey(sNum)) + { + return false; + } + } + else + return false; + } + g_hConfig.GetString(sKeyGestureName, sAnimation, iLenght); + flPlaybackRate = g_hConfig.GetFloat(sKeyGesturePlayBackRate, 1.0); + flCycle = g_hConfig.GetFloat(sKeyGestureCycle, 0.0); + return true; +} + +stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnimationSection, char[] sAnimation, int iLenght, float &flPlaybackRate, int difficulty, int iAnimationIndex = -1, float &flFootstepInterval, float &flCycle = 0.0) { g_hConfig.Rewind(); g_hConfig.JumpToKey(sProfile); - char sAnimationSection[128], sKeyAnimationName[256], sKeyAnimationPlayBackRate[128], sKeyAnimationFootstepInt[128]; + char sAnimationSection[40], sKeyAnimationName[65], sKeyAnimationPlayBackRate[65], sKeyAnimationFootstepInt[65], sKeyAnimationCycle[65]; switch (iAnimationSection) { case ChaserAnimation_IdleAnimations: @@ -1701,6 +1753,7 @@ stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnima strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_attack"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_attack_playbackrate"); strcopy(sKeyAnimationFootstepInt, sizeof(sKeyAnimationFootstepInt), "animation_attack_footstepinterval"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_attack_cycle"); } case ChaserAnimation_ShootAnimations: { @@ -1708,6 +1761,7 @@ stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnima strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_shoot"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_shoot_playbackrate"); strcopy(sKeyAnimationFootstepInt, sizeof(sKeyAnimationFootstepInt), "animation_attack_footstepinterval"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_shoot_cycle"); } case ChaserAnimation_RunAnimations: { @@ -1766,12 +1820,14 @@ stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnima strcopy(sAnimationSection, sizeof(sAnimationSection), "chaseinitial"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_chaseinitial"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_chaseinitial_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_chaseinitial_cycle"); } case ChaserAnimation_RageAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "rage"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_rage"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_rage_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_rage_cycle"); } case ChaserAnimation_StunAnimations: { @@ -1779,54 +1835,63 @@ stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnima strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_stun"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_stun_playbackrate"); strcopy(sKeyAnimationFootstepInt, sizeof(sKeyAnimationFootstepInt), "animation_stun_footstepinterval"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_stun_cycle"); } case ChaserAnimation_DeathAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "death"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_death"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_death_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_death_cycle"); } case ChaserAnimation_JumpAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "jump"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_jump"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_jump_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_jump_cycle"); } case ChaserAnimation_SpawnAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "spawn"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_spawn"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_spawn_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_spawn_cycle"); } case ChaserAnimation_FleeInitialAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "fleestart"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_fleestart"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_fleestart_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_fleestart_cycle"); } case ChaserAnimation_HealAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "heal"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_heal"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_heal_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_heal_cycle"); } case ChaserAnimation_DeathcamAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "deathcam"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_deathcam"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_deathcam_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_deathcam_cycle"); } case ChaserAnimation_CloakStartAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "cloakstart"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_cloakstart"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_cloakstart_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_cloakstart_cycle"); } case ChaserAnimation_CloakEndAnimations: { strcopy(sAnimationSection, sizeof(sAnimationSection), "cloakend"); strcopy(sKeyAnimationName, sizeof(sKeyAnimationName), "animation_cloakend"); strcopy(sKeyAnimationPlayBackRate, sizeof(sKeyAnimationPlayBackRate), "animation_cloakend_playbackrate"); + strcopy(sKeyAnimationCycle, sizeof(sKeyAnimationCycle), "animation_cloakend_cycle"); } case ChaserAnimation_CrawlWalkAnimations: { @@ -1965,6 +2030,7 @@ stock bool GetProfileAnimation(int iBossIndex, const char[] sProfile, int iAnima g_hConfig.GetString(sKeyAnimationName, sAnimation, iLenght); flPlaybackRate = g_hConfig.GetFloat(sKeyAnimationPlayBackRate, 1.0); flFootstepInterval = g_hConfig.GetFloat(sKeyAnimationFootstepInt); + flCycle = g_hConfig.GetFloat(sKeyAnimationCycle); return true; } diff --git a/addons/sourcemod/scripting/sf2/stocks.sp b/addons/sourcemod/scripting/sf2/stocks.sp index 358dd9b8..7a1096a1 100644 --- a/addons/sourcemod/scripting/sf2/stocks.sp +++ b/addons/sourcemod/scripting/sf2/stocks.sp @@ -397,7 +397,7 @@ stock bool IsSpaceOccupiedNPC(const float pos[3], const float mins[3], const flo return bHit; } -int EntitySetAnimation(int iEntity, const char[] sName, float flPlaybackRate = 1.0, int iForceSequence = -1) +int EntitySetAnimation(int iEntity, const char[] sName, float flPlaybackRate = 1.0, int iForceSequence = -1, float flCycle = 0.0) { CBaseCombatCharacter animationEntity = CBaseCombatCharacter(iEntity); int iSequence = iForceSequence; @@ -409,7 +409,7 @@ int EntitySetAnimation(int iEntity, const char[] sName, float flPlaybackRate = 1 if (iSequence != -1) { animationEntity.ResetSequence(iSequence); - SetEntPropFloat(iEntity, Prop_Data, "m_flCycle", 0.0); + SetEntPropFloat(iEntity, Prop_Data, "m_flCycle", flCycle); } if (flPlaybackRate<-12.0) flPlaybackRate = -12.0; @@ -428,6 +428,21 @@ stock void EntitySetBlendAnimation(int iEntity, const char[] sParameter, float f SetEntPropFloat(iEntity, Prop_Send, "m_flPoseParameter", flNewValue, iParameter); //PrintToChatAll("called"); } +stock void CBaseNPC_RemoveAllLayers(int iEntity) +{ + if (!IsValidEntity(iEntity)) return; + CBaseCombatCharacter animationEntity = CBaseCombatCharacter(iEntity); + int iCount = animationEntity.GetNumAnimOverlays(); + for(int i = 0; i < iCount; i++) + { + CAnimationLayer pOverlay = animationEntity.GetAnimOverlay(i); + if (!pOverlay.IsAlive()) + { + continue; + } + pOverlay.KillMe(); + } +} stock void SDK_GetVectors(int iEntity, float vecForward[3], float vecRight[3], float vecUp[3]) { if (g_hSDKGetVectors != null) diff --git a/addons/sourcemod/translations/sf2.phrases.txt b/addons/sourcemod/translations/sf2.phrases.txt index e9b16493..ad4fb436 100644 --- a/addons/sourcemod/translations/sf2.phrases.txt +++ b/addons/sourcemod/translations/sf2.phrases.txt @@ -1684,7 +1684,7 @@ "SF2 Change Log" { - "en" "-Fixed a bug where bosses wouldn't collide with any trigger brush\n-Set the boss' entity health to the 32 bit integer limit minus 1\n-Bosses during endless chasing and RAID no longer get the no teleport flag upon spawning\n-Upgraded the grace period states\n-Bosses can now phase through deathcam players\n-func_nav_prefer can be used properly again" + "en" "-Added boss gesture animations for attacks\n-Bosses are now able to use looping animations when applicable on attack animations\n-Likely fixed a bug where bosses randomly unstuck on players\n-Reduced the chances of getting stuck in bosses\n-Fixed a bug where the SourceTV name change was delayed\n-Difficulty modifiers don't reset upon reloading the plugin" } "SF2 Smite player"