From c1ecc94d570bb6b25b488badbc0c1e6070117bf2 Mon Sep 17 00:00:00 2001 From: Mentrillum <42941613+Mentrillum@users.noreply.github.com> Date: Sun, 20 Nov 2022 21:02:58 -0700 Subject: [PATCH] 1.7.5.07 --- addons/sourcemod/scripting/include/sf2.inc | 4 +- addons/sourcemod/scripting/sf2.sp | 27 +-- addons/sourcemod/scripting/sf2/adminmenu.sp | 44 +++-- addons/sourcemod/scripting/sf2/client.sp | 11 +- .../scripting/sf2/extras/commands.sp | 154 ++++++++------- .../sf2/functionclients/client_flashlight.sp | 4 +- addons/sourcemod/scripting/sf2/npc.sp | 177 +++++++++++++----- .../sourcemod/scripting/sf2/npc/npc_chaser.sp | 8 +- .../scripting/sf2/npc/npc_chaser_attacks.sp | 5 +- .../scripting/sf2/npc/npc_chaser_mind.sp | 6 + .../scripting/sf2/npc/npc_chaser_pathing.sp | 32 ++-- .../sf2/npc/npc_chaser_takedamage.sp | 2 +- addons/sourcemod/scripting/sf2/pvp.sp | 4 +- .../sourcemod/scripting/sf2/specialround.sp | 22 +-- 14 files changed, 316 insertions(+), 184 deletions(-) diff --git a/addons/sourcemod/scripting/include/sf2.inc b/addons/sourcemod/scripting/include/sf2.inc index 977a8dee..963b5bd5 100644 --- a/addons/sourcemod/scripting/include/sf2.inc +++ b/addons/sourcemod/scripting/include/sf2.inc @@ -3,8 +3,8 @@ #endif #define _sf2_included -#define PLUGIN_VERSION "1.7.5.06 M" -#define PLUGIN_VERSION_DISPLAY "1.7.5.06 M" +#define PLUGIN_VERSION "1.7.5.07 M" +#define PLUGIN_VERSION_DISPLAY "1.7.5.07 M" // Some defines. #define SF2_MAX_PROFILE_NAME_LENGTH 64 diff --git a/addons/sourcemod/scripting/sf2.sp b/addons/sourcemod/scripting/sf2.sp index 0f636609..6f5452d0 100644 --- a/addons/sourcemod/scripting/sf2.sp +++ b/addons/sourcemod/scripting/sf2.sp @@ -1420,6 +1420,11 @@ public void TF2_OnConditionAdded(int client, TFCond cond) g_PlayerProxyControl[client] = 0; } } + + if (IsClientUsingFlashlight(client)) + { + ClientHandleFlashlight(client); + } } if (cond == view_as(82)) { @@ -2280,7 +2285,7 @@ void OnConVarChanged(Handle cvar, const char[] oldValue, const char[] intValue) EmitSoundToAll(g_SoundNightmareMode[i]); } SpecialRoundGameText("Its Restart Session time!", "leaderboard_streak"); - CPrintToChatAll("{royalblue}%t{default}Your thirst for blood continues? Very well, let the blood spill. Let the demons feed off your unfortunate soul... Difficulty set to {mediumslateblue}%t!", "SF2 Prefix", "SF2 Calamity Difficulty"); + CPrintToChatAll("{royalblue}%t {default}Your thirst for blood continues? Very well, let the blood spill. Let the demons feed off your unfortunate soul... Difficulty set to {mediumslateblue}%t!", "SF2 Prefix", "SF2 Calamity Difficulty"); g_RestartSessionEnabled = true; g_DifficultyConVar.SetInt(Difficulty_Apollyon); g_IgnoreRoundWinConditionsConVar.SetBool(true); @@ -2375,7 +2380,7 @@ void OnConVarChanged(Handle cvar, const char[] oldValue, const char[] intValue) } else { - CPrintToChatAll("{royalblue}%t{default}You're done? Ok. Difficulty set to {darkgray}Apollyon.", "SF2 Prefix"); + CPrintToChatAll("{royalblue}%t {default}You're done? Ok. Difficulty set to {darkgray}Apollyon.", "SF2 Prefix"); g_RestartSessionEnabled = false; g_DifficultyConVar.SetInt(Difficulty_Apollyon); g_IgnoreRoundWinConditionsConVar.SetBool(false); @@ -2637,7 +2642,7 @@ Action Hook_NormalSound(int clients[64], int &numClients, char sample[PLATFORM_M } } } - else if (!g_PlayerEliminated[entity] && !g_PlayerEscaped[entity]) + else if (!g_PlayerEliminated[entity] && !DidClientEscape(entity)) { switch (channel) { @@ -2664,7 +2669,7 @@ Action Hook_NormalSound(int clients[64], int &numClients, char sample[PLATFORM_M GetClientAbsOrigin(entity, g_SlenderTargetSoundTempPos[bossIndex]); g_SlenderInterruptConditions[bossIndex] |= COND_HEARDSUSPICIOUSSOUND; g_SlenderInterruptConditions[bossIndex] |= COND_HEARDVOICE; - if (g_SlenderState[bossIndex] == STATE_ALERT && NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) + if (NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) { g_SlenderSoundTarget[bossIndex] = EntIndexToEntRef(entity); g_SlenderAutoChaseCount[bossIndex] += NPCChaserAutoChaseAddVoice(bossIndex, difficulty); @@ -2740,7 +2745,7 @@ Action Hook_NormalSound(int clients[64], int &numClients, char sample[PLATFORM_M { g_SlenderInterruptConditions[bossIndex] |= COND_HEARDFOOTSTEP; } - if (g_SlenderState[bossIndex] == STATE_ALERT && NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) + if (NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) { g_SlenderSoundTarget[bossIndex] = EntIndexToEntRef(entity); if (isLoudStep) @@ -2774,7 +2779,7 @@ Action Hook_NormalSound(int clients[64], int &numClients, char sample[PLATFORM_M GetClientAbsOrigin(entity, g_SlenderTargetSoundTempPos[bossIndex]); g_SlenderInterruptConditions[bossIndex] |= COND_HEARDSUSPICIOUSSOUND; g_SlenderInterruptConditions[bossIndex] |= COND_HEARDWEAPON; - if (g_SlenderState[bossIndex] == STATE_ALERT && NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) + if (NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) { g_SlenderSoundTarget[bossIndex] = EntIndexToEntRef(entity); g_SlenderAutoChaseCount[bossIndex] += NPCChaserAutoChaseAddWeapon(bossIndex, difficulty); @@ -2801,7 +2806,7 @@ Action Hook_NormalSound(int clients[64], int &numClients, char sample[PLATFORM_M GetClientAbsOrigin(entity, g_SlenderTargetSoundTempPos[bossIndex]); g_SlenderInterruptConditions[bossIndex] |= COND_HEARDSUSPICIOUSSOUND; g_SlenderInterruptConditions[bossIndex] |= COND_HEARDFLASHLIGHT; - if (g_SlenderState[bossIndex] == STATE_ALERT && NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) + if (NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) { g_SlenderSoundTarget[bossIndex] = EntIndexToEntRef(entity); g_SlenderAutoChaseCount[bossIndex] += NPCChaserAutoChaseAddWeapon(bossIndex, difficulty); @@ -2825,7 +2830,7 @@ Action Hook_NormalSound(int clients[64], int &numClients, char sample[PLATFORM_M GetClientAbsOrigin(entity, g_SlenderTargetSoundTempPos[bossIndex]); g_SlenderInterruptConditions[bossIndex] |= COND_HEARDSUSPICIOUSSOUND; g_SlenderInterruptConditions[bossIndex] |= COND_HEARDVOICE; - if (g_SlenderState[bossIndex] == STATE_ALERT && NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) + if (NPCChaserIsAutoChaseEnabled(bossIndex) && g_SlenderAutoChaseCooldown[bossIndex] < GetGameTime()) { g_SlenderSoundTarget[bossIndex] = EntIndexToEntRef(entity); g_SlenderAutoChaseCount[bossIndex] += NPCChaserAutoChaseAddVoice(bossIndex, difficulty) * 2; @@ -3188,7 +3193,7 @@ void CollectPage(int page, int activator) NPCGetBossName(_, bossName, sizeof(bossName), buffer); EmitSoundToAll(SR_SOUND_SELECT_BR, _, SNDCHAN_AUTO, _, _, 0.75); SpecialRoundGameText(bossName, "d_purgatory"); - CPrintToChatAll("{royalblue}%t{default}Next on the roulette: {valve}%s", "SF2 Prefix", bossName); //Minimized HUD + CPrintToChatAll("{royalblue}%t {default}Next on the roulette: {valve}%s", "SF2 Prefix", bossName); //Minimized HUD } delete selectableBosses; } @@ -3202,7 +3207,7 @@ void CollectPage(int page, int activator) NPCGetBossName(_, bossName, sizeof(bossName), buffer); EmitSoundToAll(SR_SOUND_SELECT_BR, _, SNDCHAN_AUTO, _, _, 0.75); SpecialRoundGameText(bossName, "d_purgatory"); - CPrintToChatAll("{royalblue}%t{default}Next on the roulette: {valve}%s", "SF2 Prefix", bossName); + CPrintToChatAll("{royalblue}%t {default}Next on the roulette: {valve}%s", "SF2 Prefix", bossName); } delete selectableBosses; } @@ -3210,7 +3215,7 @@ void CollectPage(int page, int activator) else { SpecialRoundGameText("You got lucky, no boss can be added.", "cappoint_progressbar_blocked"); - CPrintToChatAll("{royalblue}%t{default}You got lucky, no boss can be added.", "SF2 Prefix"); + CPrintToChatAll("{royalblue}%t {default}You got lucky, no boss can be added.", "SF2 Prefix"); } } diff --git a/addons/sourcemod/scripting/sf2/adminmenu.sp b/addons/sourcemod/scripting/sf2/adminmenu.sp index 42a10fcc..3ee50cd3 100644 --- a/addons/sourcemod/scripting/sf2/adminmenu.sp +++ b/addons/sourcemod/scripting/sf2/adminmenu.sp @@ -85,7 +85,7 @@ static int AdminMenu_PlayerForceProxy(Handle menu, MenuAction action,int param1, int client = GetClientOfUserId(StringToInt(userId)); if (client <= 0) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Player Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Player Does Not Exist", param1); DisplayPlayerForceProxyAdminMenu(param1); } else @@ -100,7 +100,7 @@ static int AdminMenu_PlayerForceProxy(Handle menu, MenuAction action,int param1, { delete menuHandle; DisplayTopMenu(g_TopMenu, param1, TopMenuPosition_LastCategory); - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 No Active Bosses", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 No Active Bosses", param1); } else { @@ -131,7 +131,7 @@ static int AdminMenu_PlayerForceProxyBoss(Handle menu, MenuAction action,int par int client = GetClientOfUserId(g_PlayerAdminMenuTargetUserId[param1]); if (client <= 0) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Player Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Player Does Not Exist", param1); } else { @@ -140,22 +140,22 @@ static int AdminMenu_PlayerForceProxyBoss(Handle menu, MenuAction action,int par int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); } else { if (!(NPCGetFlags(index) & SFF_PROXIES) || g_SlenderCopyMaster[index] != -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Not Allowed To Have Proxies", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Not Allowed To Have Proxies", param1); } else if (!g_PlayerEliminated[client]) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Player In Game", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Player In Game", param1); } else if (g_PlayerProxy[param1]) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Player Already A Proxy", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Player Already A Proxy", param1); } else { @@ -531,7 +531,7 @@ static bool DisplayRemoveBossAdminMenu(int client) if (!AddBossTargetsToMenu(menuHandle)) { delete menuHandle; - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); } else { @@ -566,7 +566,7 @@ static int AdminMenu_RemoveBoss(Handle menu, MenuAction action,int param1,int pa int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); } else { @@ -586,7 +586,7 @@ static bool DisplaySpawnBossAdminMenu(int client) if (!AddBossTargetsToMenu(menuHandle)) { delete menuHandle; - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); } else { @@ -621,7 +621,7 @@ static int AdminMenu_SpawnBoss(Handle menu, MenuAction action,int param1,int par int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); } else { @@ -641,7 +641,7 @@ static bool DisplayBossAttackWaitersAdminMenu(int client) if (!AddBossTargetsToMenu(menuHandle)) { delete menuHandle; - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); } else { @@ -676,7 +676,7 @@ static int AdminMenu_BossAttackWaiters(Handle menu, MenuAction action,int param1 int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); DisplayBossAttackWaitersAdminMenu(param1); } else @@ -725,7 +725,7 @@ static int AdminMenu_BossAttackWaitersConfirm(Handle menu, MenuAction action,int int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); } else { @@ -755,7 +755,7 @@ static bool DisplayBossTeleportAdminMenu(int client) if (!AddBossTargetsToMenu(menuHandle)) { delete menuHandle; - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 No Active Bosses", client); } else { @@ -790,7 +790,7 @@ static int AdminMenu_BossTeleport(Handle menu, MenuAction action,int param1,int int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); DisplayBossTeleportAdminMenu(param1); } else @@ -839,7 +839,7 @@ static int AdminMenu_BossTeleportConfirm(Handle menu, MenuAction action,int para int index = NPCGetFromUniqueID(StringToInt(id)); if (index == -1) { - CPrintToChat(param1, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); + CPrintToChat(param1, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Does Not Exist", param1); } else { @@ -927,10 +927,16 @@ static int AdminMenu_OverrideBoss(Handle menu, MenuAction action,int param1,int } else if (action == MenuAction_Select) { - char profile[SF2_MAX_PROFILE_NAME_LENGTH]; + char profile[SF2_MAX_PROFILE_NAME_LENGTH], name[SF2_MAX_NAME_LENGTH]; GetMenuItem(menu, param2, profile, sizeof(profile)); - FakeClientCommand(param1, "sm_cvar sf2_boss_profile_override %s", profile); + g_BossProfileOverrideConVar.SetString(profile); + + ArrayList arrayNames; + arrayNames = GetBossProfileNames(profile); + arrayNames.GetString(Difficulty_Normal, name, sizeof(name)); + + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next boss to {valve}%s{default}.", "SF2 Prefix", param1, name); DisplayOverrideBossAdminMenu(param1); } diff --git a/addons/sourcemod/scripting/sf2/client.sp b/addons/sourcemod/scripting/sf2/client.sp index 381cbd3c..4513fe47 100644 --- a/addons/sourcemod/scripting/sf2/client.sp +++ b/addons/sourcemod/scripting/sf2/client.sp @@ -3771,7 +3771,14 @@ void ClientUpdateListeningFlags(int client, bool reset=false) } else { - SetListenOverride(client, i, Listen_No); + if (!DidClientEscape(client)) + { + SetListenOverride(client, i, Listen_No); + } + else + { + SetListenOverride(client, i, Listen_Default); + } } } } @@ -3944,7 +3951,7 @@ static Action Hook_ConstantGlowSetTransmit(int ent, int other) { return Plugin_Continue; } - if ((SF_SpecialRound(SPECIALROUND_WALLHAX) || g_EnableWallHaxConVar.BoolValue) && ((GetClientTeam(other) == TFTeam_Red && !g_PlayerEscaped[other] && !g_PlayerEliminated[other]) || (g_PlayerProxy[other]))) + if ((SF_SpecialRound(SPECIALROUND_WALLHAX) || g_EnableWallHaxConVar.BoolValue) && ((GetClientTeam(other) == TFTeam_Red && !DidClientEscape(other) && !g_PlayerEliminated[other]) || (g_PlayerProxy[other]))) { return Plugin_Continue; } diff --git a/addons/sourcemod/scripting/sf2/extras/commands.sp b/addons/sourcemod/scripting/sf2/extras/commands.sp index caa85a64..e832b864 100644 --- a/addons/sourcemod/scripting/sf2/extras/commands.sp +++ b/addons/sourcemod/scripting/sf2/extras/commands.sp @@ -327,6 +327,8 @@ public void OnPluginStart() RegAdminCmd("sm_slalltalk", Command_AllTalkToggle, ADMFLAG_SLAY, _, _, FCVAR_HIDDEN); RegAdminCmd("sm_sf2_eventmode", Command_ConditionToggle, ADMFLAG_CONVARS); RegAdminCmd("sm_sleventmode", Command_ConditionToggle, ADMFLAG_CONVARS, _, _, FCVAR_HIDDEN); + RegAdminCmd("sm_sf2_endless_chasing", Command_EndlessChasing, ADMFLAG_SLAY); + RegAdminCmd("sm_sf2_red_player_death_switch", Command_RedDeathTeamSwitch, ADMFLAG_SLAY); RegAdminCmd("sm_sf2_set_queue", Command_SetQueuePoints, ADMFLAG_CHEATS); RegAdminCmd("+alltalk", Command_AllTalkOn, ADMFLAG_SLAY); RegAdminCmd("-alltalk", Command_AllTalkOff, ADMFLAG_SLAY); @@ -1179,7 +1181,7 @@ static Action Command_SpawnSlender(int client,int args) char profile[SF2_MAX_PROFILE_NAME_LENGTH]; Npc.GetProfile(profile, sizeof(profile)); - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Spawned Boss", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Spawned Boss", client); return Plugin_Handled; } @@ -1234,11 +1236,11 @@ static Action Command_SpawnAllSlenders(int client,int args) } else { - CPrintToChat(client, "{royalblue}%t{default}Already spawning bosses, please wait...", "SF2 Prefix"); + CPrintToChat(client, "{royalblue}%t {default}Already spawning bosses, please wait...", "SF2 Prefix"); } } - CPrintToChat(client, "{royalblue}%t{default}Spawned all bosses at your location.", "SF2 Prefix"); + CPrintToChat(client, "{royalblue}%t {default}Spawned all bosses at your location.", "SF2 Prefix"); return Plugin_Handled; } @@ -1256,7 +1258,7 @@ static Action Timer_SpawnAllSlenders(Handle timer, any userid) } if (g_SpawnAllBossesCount >= 64) { - CPrintToChat(client, "{royalblue}%t{default}Spawned all bosses at your locations.", "SF2 Prefix"); + CPrintToChat(client, "{royalblue}%t {default}Spawned all bosses at your locations.", "SF2 Prefix"); g_SpawnAllBossesCount = 0; g_SpawnAllSlendersTimer[client] = null; return Plugin_Stop; @@ -1316,7 +1318,7 @@ static Action Command_RemoveSlender(int client,int args) NPCRemove(bossIndex); - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Removed Boss", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Removed Boss", client); return Plugin_Handled; } @@ -1338,11 +1340,11 @@ static Action Command_RemoveAllSlenders(int client,int args) } NPCRemove(npcIndex); } - CPrintToChat(client, "{royalblue}%t{default}Removed all bosses.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}Removed all bosses.", "SF2 Prefix", client); } else { - CPrintToChat(client, "{royalblue}%t{default}Cannot use this command in Boxing maps.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}Cannot use this command in Boxing maps.", "SF2 Prefix", client); } if (MusicActive()) @@ -1460,7 +1462,7 @@ static Action Command_SlenderAttackWaiters(int client,int args) if (!oldState) { NPCSetFlags(bossIndex, bossFlags | SFF_ATTACKWAITERS); - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Attack Waiters", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Attack Waiters", client); } } else @@ -1468,7 +1470,7 @@ static Action Command_SlenderAttackWaiters(int client,int args) if (oldState) { NPCSetFlags(bossIndex, bossFlags & ~SFF_ATTACKWAITERS); - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Do Not Attack Waiters", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Do Not Attack Waiters", client); } } @@ -1513,7 +1515,7 @@ static Action Command_SlenderNoTeleport(int client,int args) if (!oldState) { NPCSetFlags(bossIndex, bossFlags | SFF_NOTELEPORT); - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Should Not Teleport", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Should Not Teleport", client); } } else @@ -1521,7 +1523,7 @@ static Action Command_SlenderNoTeleport(int client,int args) if (oldState) { NPCSetFlags(bossIndex, bossFlags & ~SFF_NOTELEPORT); - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Boss Should Teleport", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Boss Should Teleport", client); } } @@ -1564,11 +1566,11 @@ static Action Command_ToggleAllBossTeleports(int client,int args) } if (state) { - CPrintToChat(client, "{royalblue}%t{default}All bosses can no longer teleport.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}All bosses can no longer teleport.", "SF2 Prefix", client); } else if (!state) { - CPrintToChat(client, "{royalblue}%t{default}All bosses can now teleport.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}All bosses can now teleport.", "SF2 Prefix", client); } return Plugin_Handled; @@ -1603,7 +1605,7 @@ static Action Command_DebugLogicEscape(int client,int args) } } } - CPrintToChat(client, "{royalblue}%t{default}Triggered sf2_logic_escape.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}Triggered sf2_logic_escape.", "SF2 Prefix", client); return Plugin_Handled; } @@ -1634,7 +1636,7 @@ static Action Command_ReloadProfiles(int client, int args) ReloadRestrictedWeapons(); ReloadSpecialRounds(); ReloadClassConfigs(); - CPrintToChatAll("{royalblue}%t{default} Reloaded all profiles successfully.", "SF2 Prefix"); + CPrintToChatAll("{royalblue}%t {default} Reloaded all profiles successfully.", "SF2 Prefix"); return Plugin_Handled; } @@ -1675,11 +1677,11 @@ static Action Command_ToggleAllAttackWaiters(int client,int args) } if (state) { - CPrintToChat(client, "{royalblue}%t{default}All bosses can now attack waiters.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}All bosses can now attack waiters.", "SF2 Prefix", client); } else if (!state) { - CPrintToChat(client, "{royalblue}%t{default}All bosses can no longer attack waiters.", "SF2 Prefix", client); + CPrintToChat(client, "{royalblue}%t {default}All bosses can no longer attack waiters.", "SF2 Prefix", client); } return Plugin_Handled; @@ -1700,7 +1702,7 @@ static Action Command_ForceProxy(int client,int args) if (IsRoundEnding() || IsRoundInWarmup()) { - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Cannot Use Command", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Cannot Use Command", client); return Plugin_Handled; } @@ -1753,7 +1755,7 @@ static Action Command_ForceProxy(int client,int args) if (!g_PlayerEliminated[target]) { - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Unable To Perform Action On Player In Round", client, name); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Unable To Perform Action On Player In Round", client, name); continue; } @@ -1768,7 +1770,7 @@ static Action Command_ForceProxy(int client,int args) if (!SpawnProxy(client, bossIndex, intPos, spawnPoint)) { - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Player No Place For Proxy", client, name); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Player No Place For Proxy", client, name); continue; } @@ -1839,7 +1841,7 @@ static Action Command_ForceDifficulty(int client,int args) if (IsRoundEnding() || IsRoundInWarmup()) { - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Cannot Use Command", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Cannot Use Command", client); return Plugin_Handled; } @@ -1865,29 +1867,29 @@ static Action Command_ForceDifficulty(int client,int args) { case Difficulty_Normal: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the difficulty to {yellow}%t{default}.", "SF2 Prefix", client, "SF2 Normal Difficulty"); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the difficulty to {yellow}%t{default}.", "SF2 Prefix", client, "SF2 Normal Difficulty"); } case Difficulty_Hard: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the difficulty to {orange}%t{default}.", "SF2 Prefix", client, "SF2 Hard Difficulty"); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the difficulty to {orange}%t{default}.", "SF2 Prefix", client, "SF2 Hard Difficulty"); } case Difficulty_Insane: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the difficulty to {red}%t{default}.", "SF2 Prefix", client, "SF2 Insane Difficulty"); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the difficulty to {red}%t{default}.", "SF2 Prefix", client, "SF2 Insane Difficulty"); } case Difficulty_Nightmare: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the difficulty to {valve}%t!", "SF2 Prefix", client, "SF2 Nightmare Difficulty"); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the difficulty to {valve}%t!", "SF2 Prefix", client, "SF2 Nightmare Difficulty"); } case Difficulty_Apollyon: { if (!g_RestartSessionEnabled) { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the difficulty to {darkgray}%t!", "SF2 Prefix", client, "SF2 Apollyon Difficulty"); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the difficulty to {darkgray}%t!", "SF2 Prefix", client, "SF2 Apollyon Difficulty"); } else { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the difficulty to {mediumslateblue}%t!", "SF2 Prefix", client, "SF2 Calamity Difficulty"); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the difficulty to {mediumslateblue}%t!", "SF2 Prefix", client, "SF2 Calamity Difficulty"); } } } @@ -1903,7 +1905,7 @@ static Action Command_ForceSpecialRound(int client,int args) if (args == 0) { - ReplyToCommand(client, "Usage: sm_sf2_force_special_round "); + ReplyToCommand(client, "Usage: sm_sf2_force_special_round "); return Plugin_Handled; } @@ -1929,155 +1931,155 @@ static Action Command_ForceSpecialRound(int client,int args) { case SPECIALROUND_DOUBLETROUBLE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Double Trouble.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Double Trouble.", "SF2 Prefix", client); } case SPECIALROUND_INSANEDIFFICULTY: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Suicide Time.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Suicide Time.", "SF2 Prefix", client); } case SPECIALROUND_DOUBLEMAXPLAYERS: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Double Players.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Double Players.", "SF2 Prefix", client); } case SPECIALROUND_LIGHTSOUT: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Lights Out.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Lights Out.", "SF2 Prefix", client); } case SPECIALROUND_BEACON: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Bacon Spray.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Bacon Spray.", "SF2 Prefix", client); } case SPECIALROUND_DOOMBOX: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Stealth Box of Doom.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Stealth Box of Doom.", "SF2 Prefix", client); } case SPECIALROUND_NOGRACE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Start Running.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Start Running.", "SF2 Prefix", client); } case SPECIALROUND_2DOUBLE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Double It All, But Go No Higher.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Double It All, But Go No Higher.", "SF2 Prefix", client); } case SPECIALROUND_DOUBLEROULETTE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Double Roulette.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Double Roulette.", "SF2 Prefix", client); } case SPECIALROUND_NIGHTVISION: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Night Vision.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Night Vision.", "SF2 Prefix", client); } case SPECIALROUND_INFINITEFLASHLIGHT: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Infinite Flashlight.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Infinite Flashlight.", "SF2 Prefix", client); } case SPECIALROUND_DREAMFAKEBOSSES: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Just A Dream.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Just A Dream.", "SF2 Prefix", client); } case SPECIALROUND_EYESONTHECLOACK: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Countdown.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Countdown.", "SF2 Prefix", client); } case SPECIALROUND_NOPAGEBONUS: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Deadline.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Deadline.", "SF2 Prefix", client); } case SPECIALROUND_DUCKS: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Ducks.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Ducks.", "SF2 Prefix", client); } case SPECIALROUND_1UP: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}1-Up.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}1-Up.", "SF2 Prefix", client); } case SPECIALROUND_NOULTRAVISION: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Blind.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Blind.", "SF2 Prefix", client); } case SPECIALROUND_SUPRISE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Surprise Me.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Surprise Me.", "SF2 Prefix", client); } case SPECIALROUND_LASTRESORT: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Last Resort.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Last Resort.", "SF2 Prefix", client); } case SPECIALROUND_ESCAPETICKETS: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Escape Tickets.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Escape Tickets.", "SF2 Prefix", client); } case SPECIALROUND_REVOLUTION: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Special Round Revolution.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Special Round Revolution.", "SF2 Prefix", client); } case SPECIALROUND_DISTORTION: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Space Distortion.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Space Distortion.", "SF2 Prefix", client); } case SPECIALROUND_MULTIEFFECT: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Multieffect.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Multieffect.", "SF2 Prefix", client); } case SPECIALROUND_BOO: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Boo.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Boo.", "SF2 Prefix", client); } case SPECIALROUND_VOTE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Special Round Vote.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Special Round Vote.", "SF2 Prefix", client); } case SPECIALROUND_COFFEE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Coffee.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Coffee.", "SF2 Prefix", client); } case SPECIALROUND_PAGEDETECTOR: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Item Detectors.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Item Detectors.", "SF2 Prefix", client); } case SPECIALROUND_CLASSSCRAMBLE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Class Scramble.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Class Scramble.", "SF2 Prefix", client); } case SPECIALROUND_2DOOM: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Silent Slender.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Silent Slender.", "SF2 Prefix", client); } case SPECIALROUND_PAGEREWARDS: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Page Rewards.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Page Rewards.", "SF2 Prefix", client); } case SPECIALROUND_TINYBOSSES: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Tiny Bosses.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Tiny Bosses.", "SF2 Prefix", client); } case SPECIALROUND_RUNNINGINTHE90S: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}In The 90s.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}In The 90s.", "SF2 Prefix", client); } case SPECIALROUND_TRIPLEBOSSES: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Triple Bosses.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Triple Bosses.", "SF2 Prefix", client); } case SPECIALROUND_MODBOSSES: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}MODified Bosses {default}(WARNING, ITS H3LL).", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}MODified Bosses {default}(WARNING, ITS H3LL).", "SF2 Prefix", client); } case SPECIALROUND_BOSSROULETTE: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Boss Roulette.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Boss Roulette.", "SF2 Prefix", client); } case SPECIALROUND_THANATOPHOBIA: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Thanatophobia.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Thanatophobia.", "SF2 Prefix", client); } case SPECIALROUND_WALLHAX: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Wall Hax.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Wall Hax.", "SF2 Prefix", client); } case SPECIALROUND_SINGLEPLAYER: { - CPrintToChatAll("{royalblue}%t{collectors}%N {default}set the next special round to {lightblue}Single Player.", "SF2 Prefix", client); + CPrintToChatAll("{royalblue}%t {collectors}%N {default}set the next special round to {lightblue}Single Player.", "SF2 Prefix", client); } } @@ -2256,7 +2258,7 @@ static Action Command_ForceState(int client,int args) if (IsRoundEnding() || IsRoundInWarmup()) { - CPrintToChat(client, "{royalblue}%t{default}%T", "SF2 Prefix", "SF2 Cannot Use Command", client); + CPrintToChat(client, "{royalblue}%t {default}%T", "SF2 Prefix", "SF2 Cannot Use Command", client); return Plugin_Handled; } @@ -2351,7 +2353,7 @@ Action Timer_ForcePlayer(Handle timer, any userid) static Action Command_AllTalkToggle(int client, int args) { g_AdminAllTalk[client] = !g_AdminAllTalk[client]; - CPrintToChat(client, "{royalblue}%t{default}You will %s hear and speak to all players.", "SF2 Prefix", g_AdminAllTalk[client] ? "now" : "no longer"); + CPrintToChat(client, "{royalblue}%t {default}You will %s hear and speak to all players.", "SF2 Prefix", g_AdminAllTalk[client] ? "now" : "no longer"); for (int target = 1; target <= MaxClients; target++) { @@ -2385,7 +2387,21 @@ static Action Command_AllTalkOff(int client, int args) static Action Command_ConditionToggle(int client, int args) { g_IgnoreRoundWinConditionsConVar.BoolValue = !g_IgnoreRoundWinConditionsConVar.BoolValue; - CPrintToChat(client, "{royalblue}%t{default}Round condition is now %sabled.", "SF2 Prefix", g_IgnoreRoundWinConditionsConVar.BoolValue ? "dis" : "en"); + CPrintToChat(client, "{royalblue}%t {default}Round condition is now %sabled.", "SF2 Prefix", g_IgnoreRoundWinConditionsConVar.BoolValue ? "dis" : "en"); + return Plugin_Handled; +} + +static Action Command_EndlessChasing(int client, int args) +{ + g_BossChaseEndlesslyConVar.BoolValue = !g_BossChaseEndlesslyConVar.BoolValue; + CPrintToChat(client, "{royalblue}%t {default}Bosses will %s endlessly chase.", "SF2 Prefix", g_BossChaseEndlesslyConVar.BoolValue ? "now" : "no longer"); + return Plugin_Handled; +} + +static Action Command_RedDeathTeamSwitch(int client, int args) +{ + g_IgnoreRedPlayerDeathSwapConVar.BoolValue = !g_IgnoreRedPlayerDeathSwapConVar.BoolValue; + CPrintToChat(client, "{royalblue}%t {default}RED players will %s respawn upon death.", "SF2 Prefix", g_IgnoreRedPlayerDeathSwapConVar.BoolValue ? "now" : "no longer"); return Plugin_Handled; } diff --git a/addons/sourcemod/scripting/sf2/functionclients/client_flashlight.sp b/addons/sourcemod/scripting/sf2/functionclients/client_flashlight.sp index 2cd1abaf..f52a4866 100644 --- a/addons/sourcemod/scripting/sf2/functionclients/client_flashlight.sp +++ b/addons/sourcemod/scripting/sf2/functionclients/client_flashlight.sp @@ -731,14 +731,14 @@ void ClientStartDrainingFlashlightBattery(int client) void ClientHandleFlashlight(int client) { - if (!IsValidClient(client) || !IsPlayerAlive(client)) + if (!IsValidClient(client) || !IsPlayerAlive(client) || (TF2_IsPlayerInCondition(client, TFCond_Taunting) && !IsClientUsingFlashlight(client))) { return; } bool nightVision = (g_NightvisionEnabledConVar.BoolValue || SF_SpecialRound(SPECIALROUND_NIGHTVISION)); - if (IsClientUsingFlashlight(client)) + if (IsClientUsingFlashlight(client) || TF2_IsPlayerInCondition(client, TFCond_Taunting)) { ClientTurnOffFlashlight(client); ClientStartRechargingFlashlightBattery(client); diff --git a/addons/sourcemod/scripting/sf2/npc.sp b/addons/sourcemod/scripting/sf2/npc.sp index a20da7ee..a822efc1 100644 --- a/addons/sourcemod/scripting/sf2/npc.sp +++ b/addons/sourcemod/scripting/sf2/npc.sp @@ -131,7 +131,7 @@ bool g_NpcUsesRageAnimation1[MAX_BOSSES] = { false, ... }; bool g_NpcUsesRageAnimation2[MAX_BOSSES] = { false, ... }; bool g_NpcUsesRageAnimation3[MAX_BOSSES] = { false, ... }; -stock bool NPCGetBossName(int npcIndex = -1, char[] buffer,int bufferLen, char profile[SF2_MAX_PROFILE_NAME_LENGTH] = "") +bool NPCGetBossName(int npcIndex = -1, char[] buffer,int bufferLen, char profile[SF2_MAX_PROFILE_NAME_LENGTH] = "") { if (npcIndex == -1 && profile[0] == '\0') { @@ -3521,7 +3521,7 @@ static Action Hook_SlenderGlowSetTransmit(int entity,int other) { return Plugin_Continue; } - if ((SF_SpecialRound(SPECIALROUND_WALLHAX) || g_EnableWallHaxConVar.BoolValue) && GetClientTeam(other) == TFTeam_Red && !g_PlayerEscaped[other] && !g_PlayerEliminated[other]) + if ((SF_SpecialRound(SPECIALROUND_WALLHAX) || g_EnableWallHaxConVar.BoolValue) && GetClientTeam(other) == TFTeam_Red && !DidClientEscape(other) && !g_PlayerEliminated[other]) { return Plugin_Continue; } @@ -3585,16 +3585,28 @@ bool SlenderCanHearPlayer(int bossIndex,int client, SoundType soundType) if (soundType == SoundType_QuietFootstep) { + if (GetChaserProfileQuietFootstepAddThreshold(profile, difficulty) <= 0) + { + return false; + } cooldown = GetChaserProfileHearQuietFootstepCooldown(profile, difficulty); distance *= 1.85; } else if (soundType == SoundType_LoudFootstep) { + if (GetChaserProfileLoudFootstepAddThreshold(profile, difficulty) <= 0) + { + return false; + } cooldown = GetChaserProfileHearLoudFootstepCooldown(profile, difficulty); distance *= 0.66; } else { + if (GetChaserProfileFootstepAddThreshold(profile, difficulty) <= 0) + { + return false; + } cooldown = GetChaserProfileHearFootstepCooldown(profile, difficulty); } @@ -3622,21 +3634,37 @@ bool SlenderCanHearPlayer(int bossIndex,int client, SoundType soundType) if (soundType == SoundType_Voice) { + if (GetChaserProfileVoiceAddThreshold(profile, difficulty) <= 0) + { + return false; + } cooldown = GetChaserProfileHearVoiceCooldown(profile, difficulty); } else if (soundType == SoundType_Flashlight) { + if (GetChaserProfileFlashlightAddThreshold(profile, difficulty) <= 0) + { + return false; + } cooldown = GetChaserProfileHearFlashlightCooldown(profile, difficulty); } } case SoundType_Weapon: { + if (GetChaserProfileWeaponAddThreshold(profile, difficulty) <= 0) + { + return false; + } + float hisMins[3], hisMaxs[3]; GetEntPropVector(client, Prop_Send, "m_vecMins", hisMins); GetEntPropVector(client, Prop_Send, "m_vecMaxs", hisMaxs); float middle[3]; - for (int i = 0; i < 2; i++) middle[i] = (hisMins[i] + hisMaxs[i]) / 2.0; + for (int i = 0; i < 2; i++) + { + middle[i] = (hisMins[i] + hisMaxs[i]) / 2.0; + } float endPos[3]; GetClientAbsOrigin(client, endPos); @@ -3935,22 +3963,110 @@ void SlenderPerformVoiceCooldown(int bossIndex, int slender, SF2BossProfileSound g_SlenderNextVoiceSound[bossIndex] = GetGameTime() + cooldown; return; } - if (soundInfo.PitchRandomMin != soundInfo.Pitch || soundInfo.PitchRandomMax != soundInfo.Pitch) - { - EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, soundInfo.Flags, - soundInfo.Volume, pitch); - } - else if (SF_SpecialRound(SPECIALROUND_TINYBOSSES)) + SlenderCalculateVolume(buffer, slender, soundInfo, 0, pitch); + g_SlenderNextVoiceSound[bossIndex] = GetGameTime() + cooldown; + } +} + +void SlenderCalculateVolume(const char[] buffer, int slender, SF2BossProfileSoundInfo soundInfo, int state, int randomPitch) +{ + // State 0 = voice, state 1 = everything else + int volumeCount = RoundToCeil(soundInfo.Volume); + for (int i = 0; i < volumeCount; i++) + { + float finalVolume = soundInfo.Volume; + if (i + 1 != volumeCount) { - EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, soundInfo.Flags, - soundInfo.Volume, ((soundInfo.PitchRandomMin == soundInfo.Pitch && soundInfo.PitchRandomMax == soundInfo.Pitch) ? soundInfo.Pitch : pitch) + 25); + switch (state) + { + case 0: + { + SlenderCastVoice(buffer, slender, soundInfo, 1.0, randomPitch); + } + default: + { + SlenderDetermineGameSounds(buffer, slender, soundInfo, 1.0, randomPitch); + } + } } else { - EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, soundInfo.Flags, - soundInfo.Volume, soundInfo.Pitch); + if (finalVolume > 1.0) + { + while (finalVolume > 1.0) + { + finalVolume -= 1.0; + } + switch (state) + { + case 0: + { + SlenderCastVoice(buffer, slender, soundInfo, finalVolume, randomPitch); + } + default: + { + SlenderDetermineGameSounds(buffer, slender, soundInfo, finalVolume, randomPitch); + } + } + } + else + { + switch (state) + { + case 0: + { + SlenderCastVoice(buffer, slender, soundInfo, _, randomPitch); + } + default: + { + SlenderDetermineGameSounds(buffer, slender, soundInfo, _, randomPitch); + } + } + } } - g_SlenderNextVoiceSound[bossIndex] = GetGameTime() + cooldown; + } +} + +void SlenderDetermineGameSounds(const char[] buffer, int slender, SF2BossProfileSoundInfo soundInfo, float overrideVolume = -1.0, int randomPitch = 100) +{ + float volume = soundInfo.Volume; + if (overrideVolume >= 0.0) + { + volume = overrideVolume; + } + if (StrContains(buffer, ".mp3", true) == -1 && StrContains(buffer, ".wav", true) == -1) + { + EmitGameSoundToAll(buffer, slender); + } + else + { + EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, _, volume, + (soundInfo.PitchRandomMin == soundInfo.Pitch && soundInfo.PitchRandomMax == soundInfo.Pitch) ? soundInfo.Pitch : randomPitch); + } +} + +void SlenderCastVoice(const char[] buffer, int slender, SF2BossProfileSoundInfo soundInfo, float overrideVolume = -1.0, int randomPitch = 100) +{ + float volume = soundInfo.Volume; + if (overrideVolume >= 0.0) + { + volume = overrideVolume; + } + if (soundInfo.PitchRandomMin != soundInfo.Pitch || soundInfo.PitchRandomMax != soundInfo.Pitch) + { + EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, soundInfo.Flags, + volume, randomPitch); + } + else if (SF_SpecialRound(SPECIALROUND_TINYBOSSES)) + { + EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, soundInfo.Flags, + volume, + ((soundInfo.PitchRandomMin == soundInfo.Pitch && soundInfo.PitchRandomMax == soundInfo.Pitch) ? soundInfo.Pitch : randomPitch) + 25); + } + else + { + EmitSoundToAll(buffer, slender, soundInfo.Channel, soundInfo.Level, soundInfo.Flags, + volume, soundInfo.Pitch); } } @@ -3989,21 +4105,10 @@ void SlenderCastFootstep(int bossIndex) if (path[0] != '\0') { - float volume = soundInfo.Volume; - int channel = soundInfo.Channel; - int level = soundInfo.Level; - int pitch = soundInfo.Pitch; int randomPitch = GetRandomInt(soundInfo.PitchRandomMin, soundInfo.PitchRandomMax); g_SlenderNextFootstepSound[bossIndex] = GetGameTime() + g_SlenderFootstepTime[bossIndex]; - if (StrContains(path, ".mp3", true) == -1 && StrContains(path, ".wav", true) == -1) - { - EmitGameSoundToAll(path, slender); - } - else - { - EmitSoundToAll(path, slender, channel, level, _, volume, (soundInfo.PitchRandomMin == pitch && soundInfo.PitchRandomMax == pitch) ? pitch : randomPitch); - } + SlenderCalculateVolume(path, slender, soundInfo, 1, randomPitch); if (NPCChaserGetEarthquakeFootstepsState(bossIndex)) { UTIL_ScreenShake(myPos, NPCChaserGetEarthquakeFootstepsAmplitude(bossIndex), @@ -4059,16 +4164,8 @@ void SlenderCastFootstepAnimEvent(int bossIndex, int event) if (path[0] != '\0') { - int pitch = soundInfo.Pitch; int randomPitch = GetRandomInt(soundInfo.PitchRandomMin, soundInfo.PitchRandomMax); - if (StrContains(path, ".mp3", true) == -1 && StrContains(path, ".wav", true) == -1) - { - EmitGameSoundToAll(path, slender); - } - else - { - EmitSoundToAll(path, slender, soundInfo.Channel, soundInfo.Level, _, soundInfo.Volume, (soundInfo.PitchRandomMin == pitch && soundInfo.PitchRandomMax == pitch) ? pitch : randomPitch); - } + SlenderCalculateVolume(path, slender, soundInfo, 1, randomPitch); } if (NPCChaserGetEarthquakeFootstepsState(bossIndex)) { @@ -4121,16 +4218,8 @@ void SlenderCastAnimEvent(int bossIndex, int event) if (path[0] != '\0') { - int pitch = soundInfo.Pitch; int randomPitch = GetRandomInt(soundInfo.PitchRandomMin, soundInfo.PitchRandomMax); - if (StrContains(path, ".mp3", true) == -1 && StrContains(path, ".wav", true) == -1) - { - EmitGameSoundToAll(path, slender); - } - else - { - EmitSoundToAll(path, slender, soundInfo.Channel, soundInfo.Level, _, soundInfo.Volume, (soundInfo.PitchRandomMin == pitch && soundInfo.PitchRandomMax == pitch) ? pitch : randomPitch); - } + SlenderCalculateVolume(path, slender, soundInfo, 1, randomPitch); } } diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp index 563d8f15..3d183cb3 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser.sp @@ -2168,7 +2168,7 @@ static Action Timer_InstantKillThink(Handle timer, int bossIndex) // - If I lose sight or I'm unable to traverse safely, find paths around obstacles and follow memorized path. // - If I reach the end of my path and I still don't see him and I still want to pursue him, keep on going in the direction I'm going. -stock bool IsTargetValidForSlender(int target, bool bIncludeEliminated = false) +bool IsTargetValidForSlender(int target, bool includeEliminated = false) { if (!target || !IsValidClient(target)) { @@ -2180,7 +2180,7 @@ stock bool IsTargetValidForSlender(int target, bool bIncludeEliminated = false) if (!IsClientInGame(target) || !IsPlayerAlive(target) || IsClientInDeathCam(target) || - (!bIncludeEliminated && g_PlayerEliminated[target]) || + (!includeEliminated && g_PlayerEliminated[target]) || IsClientInGhostMode(target) || DidClientEscape(target)) { @@ -4136,7 +4136,7 @@ void SlenderDoDamageEffects(int bossIndex, int attackIndex, int client) } if (GetClientTeam(client) == 2) { - CPrintToChatAll("{royalblue}%t{default}%t", "SF2 Prefix", "SF2 Smote target", name, player); + CPrintToChatAll("{royalblue}%t {default}%t", "SF2 Prefix", "SF2 Smote target", name, player); } } } @@ -4175,7 +4175,7 @@ void SlenderDoDamageEffects(int bossIndex, int attackIndex, int client) } if (GetClientTeam(client) == 2) { - CPrintToChatAll("{royalblue}%t{default}%t", "SF2 Prefix", "SF2 Smote target", name, player); + CPrintToChatAll("{royalblue}%t {default}%t", "SF2 Prefix", "SF2 Smote target", name, player); } } } diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp index 633cb2f1..ae7d4123 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_attacks.sp @@ -618,7 +618,10 @@ Action Timer_SlenderChaseBossAttack(Handle timer, any entref) { float percentLife; percentLife = ClientGetFlashlightBatteryLife(i) - NPCChaserGetShockwaveDrain(bossIndex, difficulty); - if (percentLife < 0.0) percentLife = 0.0; + if (percentLife < 0.0) + { + percentLife = 0.0; + } ClientSetFlashlightBatteryLife(i, percentLife); float directionForce[3]; diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp index 4e3eb7a6..7ba06e72 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_mind.sp @@ -282,6 +282,12 @@ Action Timer_SlenderChaseBossThink(Handle timer, any entref) //God damn you are } } + if (state == STATE_CHASE || state == STATE_ATTACK || state == STATE_STUN) + { + g_SlenderAutoChaseCount[chaserBoss.Index] = 0; + g_SlenderSoundTarget[chaserBoss.Index] = INVALID_ENT_REFERENCE; + } + if (g_SlenderSoundTarget[chaserBoss.Index] != INVALID_ENT_REFERENCE) { soundTarget = EntRefToEntIndex(g_SlenderSoundTarget[chaserBoss.Index]); diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp index 6687cfd6..c8c13f29 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_pathing.sp @@ -29,22 +29,6 @@ void SlenderChaseBossProcessMovement(int bossEnt) return; } - //From Pelipoika's rainbow outline plugin - if (NPCGetCustomOutlinesState(bossIndex) && NPCGetRainbowOutlineState(bossIndex)) - { - int glow = EntRefToEntIndex(g_NpcGlowEntity[bossIndex]); - int color[4]; - color[0] = RoundToNearest(Cosine((GetGameTime() * NPCGetRainbowOutlineCycleRate(bossIndex)) + bossIndex + 0) * 127.5 + 127.5); - color[1] = RoundToNearest(Cosine((GetGameTime() * NPCGetRainbowOutlineCycleRate(bossIndex)) + bossIndex + 2) * 127.5 + 127.5); - color[2] = RoundToNearest(Cosine((GetGameTime() * NPCGetRainbowOutlineCycleRate(bossIndex)) + bossIndex + 4) * 127.5 + 127.5); - color[3] = 255; - if (IsValidEntity(glow)) - { - SetVariantColor(color); - AcceptEntityInput(glow, "SetGlowColor"); - } - } - INextBot bot = npc.GetBot(); CBaseNPC_Locomotion loco = npc.GetLocomotion(); CBaseCombatCharacter combatChar = CBaseCombatCharacter(bossEnt); @@ -973,6 +957,22 @@ void SlenderSetNextThink(int bossEnt) int bossIndex = NPCGetFromEntIndex(bossEnt); if (bossIndex != -1) { + //From Pelipoika's rainbow outline plugin + if (NPCGetCustomOutlinesState(bossIndex) && NPCGetRainbowOutlineState(bossIndex)) + { + int glow = EntRefToEntIndex(g_NpcGlowEntity[bossIndex]); + int color[4]; + color[0] = RoundToNearest(Cosine((GetGameTime() * NPCGetRainbowOutlineCycleRate(bossIndex)) + bossIndex + 0) * 127.5 + 127.5); + color[1] = RoundToNearest(Cosine((GetGameTime() * NPCGetRainbowOutlineCycleRate(bossIndex)) + bossIndex + 2) * 127.5 + 127.5); + color[2] = RoundToNearest(Cosine((GetGameTime() * NPCGetRainbowOutlineCycleRate(bossIndex)) + bossIndex + 4) * 127.5 + 127.5); + color[3] = 255; + if (IsValidEntity(glow)) + { + SetVariantColor(color); + AcceptEntityInput(glow, "SetGlowColor"); + } + } + int state = g_SlenderState[bossIndex]; bool changeAngle = false; float posToAt[3]; diff --git a/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp b/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp index d91be14b..a8e8fb9e 100644 --- a/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp +++ b/addons/sourcemod/scripting/sf2/npc/npc_chaser_takedamage.sp @@ -596,7 +596,7 @@ void NPCBossTriggerStun(int bossIndex, int victim, char profile[SF2_MAX_PROFILE_ { strcopy(bossName, sizeof(bossName), profile); } - CPrintToChatAll("{royalblue}%t{default}%t", "SF2 Prefix", "SF2 Boxing Win Message", player, bossName); + CPrintToChatAll("{royalblue}%t {default}%t", "SF2 Prefix", "SF2 Boxing Win Message", player, bossName); } } } diff --git a/addons/sourcemod/scripting/sf2/pvp.sp b/addons/sourcemod/scripting/sf2/pvp.sp index 15afeb2c..bdba62c9 100644 --- a/addons/sourcemod/scripting/sf2/pvp.sp +++ b/addons/sourcemod/scripting/sf2/pvp.sp @@ -500,7 +500,7 @@ void PvP_OnPlayerSpawn(int client) { if (!IsClientInGhostMode(client) && !g_PlayerProxy[client]) { - if (g_PlayerEliminated[client] || g_PlayerEscaped[client]) + if (g_PlayerEliminated[client] || DidClientEscape(client)) { bool autoSpawn = g_PlayerPreferences[client].PlayerPreference_PvPAutoSpawn; @@ -555,7 +555,7 @@ void PvP_OnPlayerDeath(int client, bool fake) if (autoSpawn) { - if (g_PlayerEliminated[client] || g_PlayerEscaped[client]) + if (g_PlayerEliminated[client] || DidClientEscape(client)) { if (!IsRoundEnding()) { diff --git a/addons/sourcemod/scripting/sf2/specialround.sp b/addons/sourcemod/scripting/sf2/specialround.sp index 8941badb..cc9e0ad3 100644 --- a/addons/sourcemod/scripting/sf2/specialround.sp +++ b/addons/sourcemod/scripting/sf2/specialround.sp @@ -847,17 +847,17 @@ void SpecialRoundStart() case 1: { g_DifficultyConVar.SetInt(Difficulty_Normal); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {yellow}%t{default}.", "SF2 Prefix", "SF2 Normal Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {yellow}%t{default}.", "SF2 Prefix", "SF2 Normal Difficulty"); } case 2: { g_DifficultyConVar.SetInt(Difficulty_Hard); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {orange}%t{default}.", "SF2 Prefix", "SF2 Hard Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {orange}%t{default}.", "SF2 Prefix", "SF2 Hard Difficulty"); } case 3: { g_DifficultyConVar.SetInt(Difficulty_Insane); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {red}%t{default}.", "SF2 Prefix", "SF2 Insane Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {red}%t{default}.", "SF2 Prefix", "SF2 Insane Difficulty"); } case 4: { @@ -868,7 +868,7 @@ void SpecialRoundStart() FormatEx(sNightmareDisplay, sizeof(sNightmareDisplay), "%t mode!", "SF2 Nightmare Difficulty"); SpecialRoundGameText(sNightmareDisplay, "leaderboard_streak"); g_DifficultyConVar.SetInt(Difficulty_Nightmare); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {valve}%t!", "SF2 Prefix", "SF2 Nightmare Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {valve}%t!", "SF2 Prefix", "SF2 Nightmare Difficulty"); } case 5: { @@ -879,7 +879,7 @@ void SpecialRoundStart() FormatEx(sNightmareDisplay, sizeof(sNightmareDisplay), "%t mode!", "SF2 Apollyon Difficulty"); SpecialRoundGameText(sNightmareDisplay, "leaderboard_streak"); g_DifficultyConVar.SetInt(Difficulty_Apollyon); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {darkgray}%t!", "SF2 Prefix", "SF2 Apollyon Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {darkgray}%t!", "SF2 Prefix", "SF2 Apollyon Difficulty"); int randomQuote = GetRandomInt(1, 8); switch (randomQuote) { @@ -936,17 +936,17 @@ void SpecialRoundStart() case 1: { g_DifficultyConVar.SetInt(Difficulty_Normal); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {yellow}%t{default}.", "SF2 Prefix", "SF2 Normal Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {yellow}%t{default}.", "SF2 Prefix", "SF2 Normal Difficulty"); } case 2: { g_DifficultyConVar.SetInt(Difficulty_Hard); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {orange}%t{default}.", "SF2 Prefix", "SF2 Hard Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {orange}%t{default}.", "SF2 Prefix", "SF2 Hard Difficulty"); } case 3: { g_DifficultyConVar.SetInt(Difficulty_Insane); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {red}%t{default}.", "SF2 Prefix", "SF2 Insane Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {red}%t{default}.", "SF2 Prefix", "SF2 Insane Difficulty"); } case 4: { @@ -957,7 +957,7 @@ void SpecialRoundStart() FormatEx(sNightmareDisplay, sizeof(sNightmareDisplay), "%t mode!", "SF2 Nightmare Difficulty"); SpecialRoundGameText(sNightmareDisplay, "leaderboard_streak"); g_DifficultyConVar.SetInt(Difficulty_Nightmare); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {valve}%t!", "SF2 Prefix", "SF2 Nightmare Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {valve}%t!", "SF2 Prefix", "SF2 Nightmare Difficulty"); } case 5: { @@ -968,7 +968,7 @@ void SpecialRoundStart() FormatEx(sNightmareDisplay, sizeof(sNightmareDisplay), "%t mode!", "SF2 Apollyon Difficulty"); SpecialRoundGameText(sNightmareDisplay, "leaderboard_streak"); g_DifficultyConVar.SetInt(Difficulty_Apollyon); - CPrintToChatAll("{royalblue}%t{default}The difficulty has been set to {darkgray}%t!", "SF2 Prefix", "SF2 Apollyon Difficulty"); + CPrintToChatAll("{royalblue}%t {default}The difficulty has been set to {darkgray}%t!", "SF2 Prefix", "SF2 Apollyon Difficulty"); int randomQuote = GetRandomInt(1, 8); switch (randomQuote) { @@ -1613,7 +1613,7 @@ static int Menu_SpecialVote(Handle menu, MenuAction action,int param1,int param2 char specialRound[64], specialRoundName[64], display[120]; NativeVotes_GetItem(menu, param1, specialRound, sizeof(specialRound), specialRoundName, sizeof(specialRoundName)); - CPrintToChatAll("{royalblue}%t{default}%t", "SF2 Prefix", "SF2 Special Round Vote Successful", specialRoundName); + CPrintToChatAll("{royalblue}%t {default}%t", "SF2 Prefix", "SF2 Special Round Vote Successful", specialRoundName); FormatEx(display,120,"%t","SF2 Special Round Vote Successful", specialRoundName); g_SpecialRoundType = StringToInt(specialRound);