Skip to content

Commit

Permalink
1.5.5 Secret Update 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mentrillum authored Jun 28, 2020
1 parent 00fc637 commit 8e4efb5
Show file tree
Hide file tree
Showing 11 changed files with 1,455 additions and 263 deletions.
16 changes: 13 additions & 3 deletions addons/sourcemod/configs/sf2/profiles.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,17 @@
"type" "2"
"speed" "400.0"
"speed_nightmare" "550.0"
"acceleration" "6000.0"
"speed_apollyon" "1000.0"
"acceleration" "7000.0"
"speed_max" "550.0"
"speed_max_nightmare" "666.0"
"speed_max_apollyon" "1250.0"
"walkspeed" "120.0"
"walkspeed_nightamre" "220.0"
"walkspeed_apollyon" "300.0"
"walkspeed_max" "220.0"
"walkspeed_max_nightmare" "290.0"
"walkspeed_max_apollyon" "400.0"
"model" "models/mentrillum/ahatintime/hypersnatcher.mdl"
"model_scale" "1.0"
"eye_pos" "0 0 72"
Expand All @@ -578,6 +582,10 @@

"copy" "1"
"copy_max" "1"
"copy_max_hard" "1"
"copy_max_insane" "2"
"copy_max_nightmare" "2"
"copy_max_apollyon" "3"

"sound_music_loop" "9999"

Expand Down Expand Up @@ -638,6 +646,7 @@
"search_sound_range" "1300.0"
"search_alert_gracetime" "1.6"
"search_alert_gracetime_nightmare" "0.7"
"search_alert_gracetime_apollyon" "0.0"
"search_alert_duration" "9"
"search_chase_duration" "20.0"
"search_chase_persistency_time_init" "20.0"
Expand All @@ -657,13 +666,13 @@

"kill_radius" "60"

"attack_delay" "0.2"
"attack_delay" "0.1"
"attack_range" "400.0"
"attack_begin_range" "150"
"attack_damage" "9001.0"
"attack_damagetype" "1327104"
"attack_punchvel" "5 5 5"
"attack_endafter" "0.2"
"attack_endafter" "0.25"
"attack_spread" "360"

"animation_idle" "Talkidle"
Expand Down Expand Up @@ -703,6 +712,7 @@
"mod_precache"
{
"1" "models/mentrillum/ahatintime/hypersnatcher.mdl"
"2" "models/mentrillum/ahatintime/hyperhatghost.mdl"
}

"mod_download"
Expand Down
329 changes: 221 additions & 108 deletions addons/sourcemod/configs/sf2/profiles_documentation.cfg

Large diffs are not rendered by default.

76 changes: 62 additions & 14 deletions addons/sourcemod/scripting/sf2.sp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ bool sendproxymanager=false;
#include <sf2>
#pragma newdecls required

#define PLUGIN_VERSION "1.5.4 Modified"
#define PLUGIN_VERSION_DISPLAY "1.5.4 Modified"
#define PLUGIN_VERSION "1.5.5 Modified"
#define PLUGIN_VERSION_DISPLAY "1.5.5 Modified"

#define TFTeam_Spectator 1
#define TFTeam_Red 2
Expand Down Expand Up @@ -177,7 +177,7 @@ enum MuteMode

enum FlashlightTemperature
{
FlashlightTemperature_6000,
FlashlightTemperature_6000 = 0,
FlashlightTemperature_1000,
FlashlightTemperature_2000,
FlashlightTemperature_3000,
Expand Down Expand Up @@ -2339,7 +2339,7 @@ public Action Hook_CommandSay(int iClient, const char[] command,int argc)
g_bPlayerCalledForNightmare[iClient] = (StrContains(sMessage, "nightmare", false) != -1 || StrContains(sMessage, "Nightmare", false) != -1);
}

if (!g_bEnabled || GetConVarBool(g_cvAllChat)) return Plugin_Continue;
if (!g_bEnabled || GetConVarBool(g_cvAllChat) || SF_IsBoxingMap()) return Plugin_Continue;

if (!IsRoundEnding())
{
Expand Down Expand Up @@ -2374,7 +2374,7 @@ public Action Hook_CommandSayTeam(int iClient, const char[] command,int argc)
g_bPlayerCalledForNightmare[iClient] = (StrContains(sMessage, "nightmare", false) != -1 || StrContains(sMessage, "Nightmare", false) != -1);
}

if (!g_bEnabled || GetConVarBool(g_cvAllChat)) return Plugin_Continue;
if (!g_bEnabled || GetConVarBool(g_cvAllChat) || SF_IsBoxingMap()) return Plugin_Continue;

if (!IsRoundEnding())
{
Expand Down Expand Up @@ -3133,6 +3133,7 @@ public Action Timer_BossCountUpdate(Handle timer)

int iBossCount = NPCGetCount();
int iBossPreferredCount;
int iDifficulty = GetConVarInt(g_cvDifficulty);

for (int i = 0; i < MAX_BOSSES; i++)
{
Expand Down Expand Up @@ -3271,9 +3272,56 @@ public Action Timer_BossCountUpdate(Handle timer)
}

Npc.GetProfile(sProfile, sizeof(sProfile));
if (iCopyCount >= GetProfileNum(sProfile, "copy_max", 10))
{
continue;
int CopyNormal = GetProfileNum(sProfile, "copy_max", 10);
int CopyEasy = GetProfileNum(sProfile, "copy_max_easy", CopyNormal);
int CopyHard = GetProfileNum(sProfile, "copy_max_hard", CopyNormal);
int CopyInsane = GetProfileNum(sProfile, "copy_max_insane", CopyHard);
int CopyNightmare = GetProfileNum(sProfile, "copy_max_nightmare", CopyInsane);
int CopyApollyon = GetProfileNum(sProfile, "copy_max_apollyon", CopyNightmare);
switch (iDifficulty)
{
case Difficulty_Easy:
{
if (iCopyCount >= CopyEasy)
{
continue;
}
}
case Difficulty_Normal:
{
if (iCopyCount >= CopyNormal)
{
continue;
}
}
case Difficulty_Hard:
{
if (iCopyCount >= CopyHard)
{
continue;
}
}
case Difficulty_Insane:
{
if (iCopyCount >= CopyInsane)
{
continue;
}
}
case Difficulty_Nightmare:
{
if (iCopyCount >= CopyNightmare)
{
continue;
}
}
case Difficulty_Apollyon:
{
if (iCopyCount >= CopyApollyon)
{
continue;
}
}
}
SF2NPC_BaseNPC NpcCopy = AddProfile(sProfile, _, Npc);
if (!NpcCopy.IsValid())
Expand Down Expand Up @@ -3390,7 +3438,7 @@ public void OnConVarChanged(Handle cvar, const char[] oldValue, const char[] int
{
g_b20Dollars = view_as<bool>(StringToInt(intValue));
}
else if (cvar == g_cvAllChat)
else if (cvar == g_cvAllChat || SF_IsBoxingMap())
{
if (g_bEnabled)
{
Expand Down Expand Up @@ -4501,15 +4549,15 @@ public void OnClientCookiesCached(int iClient)
if (count > 0)
g_iPlayerQueuePoints[iClient] = StringToInt(s2[0]);
if (count > 1)
g_iPlayerPreferences[iClient][PlayerPreference_ShowHints] = view_as<bool>(StringToInt(s2[1]));
g_iPlayerPreferences[iClient][PlayerPreference_PvPAutoSpawn] = view_as<bool>(StringToInt(s2[1]));
if (count > 2)
g_iPlayerPreferences[iClient][PlayerPreference_MuteMode] = view_as<MuteMode>(StringToInt(s2[2]));
g_iPlayerPreferences[iClient][PlayerPreference_ShowHints] = view_as<MuteMode>(StringToInt(s2[2]));
if (count > 3)
g_iPlayerPreferences[iClient][PlayerPreference_FilmGrain] = view_as<bool>(StringToInt(s2[3]));
g_iPlayerPreferences[iClient][PlayerPreference_MuteMode] = view_as<bool>(StringToInt(s2[3]));
if (count > 4)
g_iPlayerPreferences[iClient][PlayerPreference_EnableProxySelection] = view_as<bool>(StringToInt(s2[4]));
g_iPlayerPreferences[iClient][PlayerPreference_FilmGrain] = view_as<bool>(StringToInt(s2[4]));
if (count > 5)
g_iPlayerPreferences[iClient][PlayerPreference_PvPAutoSpawn] = view_as<bool>(StringToInt(s2[5]));
g_iPlayerPreferences[iClient][PlayerPreference_EnableProxySelection] = view_as<bool>(StringToInt(s2[5]));
if (count > 6)
g_iPlayerPreferences[iClient][PlayerPreference_FlashlightTemperature] = view_as<FlashlightTemperature>(StringToInt(s2[6]));
}
Expand Down
12 changes: 7 additions & 5 deletions addons/sourcemod/scripting/sf2/client.sp
Original file line number Diff line number Diff line change
Expand Up @@ -6330,7 +6330,7 @@ stock void ClientUpdateListeningFlags(int client, bool bReset=false)
{
if (i == client || !IsClientInGame(i) || IsClientSourceTV(i)) continue;

if (bReset || IsRoundEnding() || GetConVarBool(g_cvAllChat))
if (bReset || IsRoundEnding() || GetConVarBool(g_cvAllChat) || SF_IsBoxingMap())
{
SetListenOverride(client, i, Listen_Default);
continue;
Expand Down Expand Up @@ -6519,13 +6519,13 @@ void ClientSaveCookies(int client)

// Save and reset our queue points.
char s[64];
Format(s, sizeof(s), "%d ; %d ; %d ; %d ; %d ; %d", g_iPlayerQueuePoints[client],
Format(s, sizeof(s), "%d ; %d ; %d ; %d ; %d ; %d ; %d", g_iPlayerQueuePoints[client],
g_iPlayerPreferences[client][PlayerPreference_PvPAutoSpawn],
g_iPlayerPreferences[client][PlayerPreference_ShowHints],
g_iPlayerPreferences[client][PlayerPreference_MuteMode],
g_iPlayerPreferences[client][PlayerPreference_MuteMode],
g_iPlayerPreferences[client][PlayerPreference_FilmGrain],
g_iPlayerPreferences[client][PlayerPreference_EnableProxySelection],
g_iPlayerPreferences[client][PlayerPreference_FlashlightTemperature],
g_iPlayerPreferences[client][PlayerPreference_PvPAutoSpawn]);
g_iPlayerPreferences[client][PlayerPreference_FlashlightTemperature]);

SetClientCookie(client, g_hCookie, s);
}
Expand Down Expand Up @@ -6741,6 +6741,8 @@ public Action Timer_ClientPostWeapons(Handle timer, any userid)

if (IsClientInGame(client) && !IsPlayerAlive(client)) return;

if (!IsValidClient(client)) return;

if (timer != g_hPlayerPostWeaponsTimer[client]) return;

g_bPlayerHasRegenerationItem[client] = false;
Expand Down
63 changes: 62 additions & 1 deletion addons/sourcemod/scripting/sf2/menus.sp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,16 @@ public int Menu_VoteDifficulty(Handle menu, MenuAction action,int param1,int par
SetConVarInt(g_cvDifficulty, Difficulty_Insane);
}
else if ((!SF_SpecialRound(SPECIALROUND_INSANEDIFFICULTY) && GetRandomInt(1, 200) <= 2) || bPlayersCalledForNightmare)
SetConVarInt(g_cvDifficulty, Difficulty_Nightmare);
{
if (GetRandomInt(1, 2000) <= 1)
{
SetConVarInt(g_cvDifficulty, Difficulty_Apollyon);
}
else
{
SetConVarInt(g_cvDifficulty, Difficulty_Nightmare);
}
}
else if (IsSpecialRoundRunning() && (SF_SpecialRound(SPECIALROUND_NOGRACE) || SF_SpecialRound(SPECIALROUND_2DOOM)))
{
SetConVarInt(g_cvDifficulty, Difficulty_Hard);
Expand Down Expand Up @@ -418,6 +427,58 @@ public int Menu_VoteDifficulty(Handle menu, MenuAction action,int param1,int par
}
}
}
case Difficulty_Apollyon:
{
Format(sDisplay, sizeof(sDisplay), "Apollyon!");
strcopy(sColor, sizeof(sColor), "{darkgray}");
for (int i = 0; i < sizeof(g_strSoundNightmareMode)-1; i++)
EmitSoundToAll(g_strSoundNightmareMode[i]);
SpecialRoundGameText("Apollyon mode!", "leaderboard_streak");
int iRandomQuote = GetRandomInt(1, 8);
switch (iRandomQuote)
{
case 1:
{
EmitSoundToAll(HYPERSNATCHER_NIGHTAMRE_1);
CPrintToChatAll("{purple}Snatcher {default}: Oh no! You're not slipping out of your contract THAT easily.");
}
case 2:
{
EmitSoundToAll(HYPERSNATCHER_NIGHTAMRE_2);
CPrintToChatAll("{purple}Snatcher {default}: You ready to die some more? Great!");
}
case 3:
{
EmitSoundToAll(HYPERSNATCHER_NIGHTAMRE_3);
CPrintToChatAll("{purple}Snatcher {default}: Live fast, die young, and leave behind a pretty corpse, huh? At least you got two out of three right.");
}
case 4:
{
EmitSoundToAll(HYPERSNATCHER_NIGHTAMRE_4);
CPrintToChatAll("{purple}Snatcher {default}: I love the smell of DEATH in the morning.");
}
case 5:
{
EmitSoundToAll(HYPERSNATCHER_NIGHTAMRE_5);
CPrintToChatAll("{purple}Snatcher {default}: Oh ho ho! I hope you don't think one measely death gets you out of your contract. We're only getting started.");
}
case 6:
{
EmitSoundToAll(SNATCHER_APOLLYON_1);
CPrintToChatAll("{purple}Snatcher {default}: Ah! It gets better every time!");
}
case 7:
{
EmitSoundToAll(SNATCHER_APOLLYON_2);
CPrintToChatAll("{purple}Snatcher {default}: Hope you enjoyed that one kiddo, because theres a lot more where that came from!");
}
case 8:
{
EmitSoundToAll(SNATCHER_APOLLYON_3);
CPrintToChatAll("{purple}Snatcher {default}: Killing you is hard work, but it pays off. HA HA HA HA HA HA HA HA HA HA");
}
}
}
default:
{
Format(sDisplay, sizeof(sDisplay), "%t", "SF2 Normal Difficulty");
Expand Down
Loading

0 comments on commit 8e4efb5

Please sign in to comment.