Skip to content

Commit

Permalink
1.6.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Mentrillum committed Mar 8, 2021
1 parent c172cf7 commit 3e54ce6
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 241 deletions.
17 changes: 17 additions & 0 deletions addons/sourcemod/configs/sf2/profiles_documentation.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,23 @@
// "cloak_off_sound" - String (256) - Determines the sound that plays when the boss decloaks. Defaults to "weapons/medi_shield_retract.wav".
//
// =============================================================
// PROXY WEAPONS
// =============================================================
// This system is intended to provide Proxies with a single additional weapon to make life harder for RED.
// Stats are based on the TF2Items format for assigning attributes. An example: "<attribute index> ; <attribute value>".
// ";" is used as the divider between each number in a sequence. There can only be a set amount of attributes assigned (8?).
// Here is a list of resources to help with obtaining the required data for this system.
// Attribute List: https://wiki.teamfortress.com/wiki/List_of_item_attributes
// Item Index & Class List: https://wiki.alliedmods.net/Team_fortress_2_item_definition_indexes
// Proxies will gain their weapons 1 second after spawning to avoid any possible item restrictions.
// -----------------------------------------------------------------------------------------------------------------------------------------------------
// "proxies_weapon" - Boolean (0/1) - Determins if the boss provides weapons to it's proxies. Defaults to ("0").
//
// "proxies_weapon_class_<classname>" - String (128) - Determins the class type for the weapon. (Must be set).
// "proxies_weapon_stats_<classname>" - String (128) - Determins the attribute stats for the weapon. (Optional).
// "proxies_weapon_index_<classname>" - Int - Determins the index for the weapon. (Must be set & must match the weapon slot).
//
// =============================================================
// DAMAGE EFFECTS
// =============================================================
// Upon attacking a boss, these values will be checked to determin if the boss should apply some form of condition to the player.
Expand Down
38 changes: 14 additions & 24 deletions addons/sourcemod/scripting/sf2.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <dhooks>
#include <navmesh>
#include <nativevotes>
#include <collisionhook>

#pragma semicolon 1

Expand All @@ -32,8 +33,8 @@ bool steamworks;
#include <sf2>
#pragma newdecls required

#define PLUGIN_VERSION "1.6.03 Modified"
#define PLUGIN_VERSION_DISPLAY "1.6.03 Modified"
#define PLUGIN_VERSION "1.6.04 Modified"
#define PLUGIN_VERSION_DISPLAY "1.6.04 Modified"

#define TFTeam_Spectator 1
#define TFTeam_Red 2
Expand Down Expand Up @@ -163,7 +164,7 @@ public Plugin myinfo =

#define NULLSOUND "misc/null.wav"

//#define NINETYSMUSIC "slender/sf2modified_runninginthe90s.wav"
#define NINETYSMUSIC "slender/sf2modified_runninginthe90s_v2.wav"
#define TRIPLEBOSSESMUSIC "slender/sf2modified_triplebosses_v2.wav"

#define TRAP_DEPLOY "slender/modified_traps/beartrap/trap_deploy.mp3"
Expand Down Expand Up @@ -619,10 +620,9 @@ Handle g_hPlayer20DollarsMusicTimer[MAXPLAYERS + 1][MAX_BOSSES];
int g_iPlayer20DollarsMusicMaster[MAXPLAYERS + 1] = { -1, ... };


//char g_strPlayer90sMusic[MAXPLAYERS + 1][PLATFORM_MAX_PATH];
//float g_flPlayer90sMusicVolumes[MAXPLAYERS + 1];
//Handle g_hPlayer90sMusicTimer[MAXPLAYERS + 1];
//int g_iPlayer90sMusicMaster[MAXPLAYERS + 1];
char g_strPlayer90sMusic[MAXPLAYERS + 1][PLATFORM_MAX_PATH];
float g_flPlayer90sMusicVolumes[MAXPLAYERS + 1];
Handle g_hPlayer90sMusicTimer[MAXPLAYERS + 1];


SF2RoundState g_iRoundState = SF2RoundState_Invalid;
Expand Down Expand Up @@ -1709,16 +1709,6 @@ static void StartPlugin()
hCvar = FindConVar("tf_base_boss_max_turn_rate");
if (hCvar != view_as<ConVar>(INVALID_HANDLE) && GetConVarInt(hCvar) < 720) SetConVarInt(hCvar, 720);

//New CollisionHooks, or replacement, I don't judge.
hCvar = FindConVar("tf_avoidteammates");
if (hCvar != view_as<ConVar>(INVALID_HANDLE)) SetConVarBool(hCvar, true);

hCvar = FindConVar("tf_avoidteammates_pushaway");
if (hCvar != view_as<ConVar>(INVALID_HANDLE)) SetConVarBool(hCvar, false);

hCvar = FindConVar("sv_noclipspeed");
if (hCvar != view_as<ConVar>(INVALID_HANDLE) && GetConVarInt(hCvar) < 2) SetConVarInt(hCvar, 2);

g_flGravity = GetConVarFloat(g_cvGravity);

g_b20Dollars = GetConVarBool(g_cv20Dollars);
Expand Down Expand Up @@ -1895,7 +1885,7 @@ static void PrecacheStuff()
PrecacheSound2(SNATCHER_APOLLYON_2);
PrecacheSound2(SNATCHER_APOLLYON_3);

//PrecacheSound2(NINETYSMUSIC);
PrecacheSound2(NINETYSMUSIC);
PrecacheSound2(TRIPLEBOSSESMUSIC);

PrecacheSound2(TRAP_CLOSE);
Expand Down Expand Up @@ -2059,7 +2049,7 @@ public void CleanTimerHandles()
g_hPlayerCampingTimer[i] = INVALID_HANDLE;
g_hPlayerBlinkTimer[i] = INVALID_HANDLE;
g_hPlayerMusicTimer[i] = INVALID_HANDLE;
//g_hPlayer90sMusicTimer[i] = INVALID_HANDLE;
g_hPlayer90sMusicTimer[i] = INVALID_HANDLE;
g_hPlayerFlashlightBatteryTimer[i] = INVALID_HANDLE;
}
for (int iBossIndex = 0; iBossIndex < MAX_BOSSES; iBossIndex++)
Expand Down Expand Up @@ -5268,7 +5258,7 @@ public void OnClientPutInServer(int iClient)
ClientChaseMusicSeeReset(iClient);
ClientAlertMusicReset(iClient);
Client20DollarsMusicReset(iClient);
//Client90sMusicReset(iClient);
Client90sMusicReset(iClient);
ClientMusicReset(iClient);
ClientResetProxy(iClient);
ClientResetHints(iClient);
Expand Down Expand Up @@ -6604,7 +6594,7 @@ void SetPageCount(int iNum)
{
flAverageTime += (flTimes[i3]/GetRandomFloat(10.0, 20.0));
}
PrintToChatAll("%f", flAverageTime);
PrintToChatAll("Time before bosses spawn: %f seconds", flAverageTime);
CreateTimer(flAverageTime, Timer_SlaughterRunSpawnBosses, _, TIMER_FLAG_NO_MAPCHANGE);
}
}
Expand Down Expand Up @@ -7405,7 +7395,7 @@ public Action Event_PlayerSpawn(Handle event, const char[] name, bool dB)
ClientChaseMusicSeeReset(iClient);
ClientAlertMusicReset(iClient);
Client20DollarsMusicReset(iClient);
//Client90sMusicReset(iClient);
Client90sMusicReset(iClient);
ClientMusicReset(iClient);
ClientResetProxy(iClient);
ClientResetHints(iClient);
Expand Down Expand Up @@ -7486,7 +7476,7 @@ public Action Event_PlayerSpawn(Handle event, const char[] name, bool dB)
ClientChaseMusicSeeReset(iClient);
ClientAlertMusicReset(iClient);
Client20DollarsMusicReset(iClient);
//Client90sMusicReset(iClient);
Client90sMusicReset(iClient);
ClientMusicReset(iClient);
ClientResetProxy(iClient);
ClientResetHints(iClient);
Expand Down Expand Up @@ -7911,7 +7901,7 @@ public Action Event_PlayerDeath(Handle event, const char[] name, bool dB)
ClientChaseMusicSeeReset(iClient);
ClientAlertMusicReset(iClient);
Client20DollarsMusicReset(iClient);
//Client90sMusicReset(iClient);
Client90sMusicReset(iClient);
ClientMusicReset(iClient);

ClientResetFlashlight(iClient);
Expand Down
Loading

0 comments on commit 3e54ce6

Please sign in to comment.