diff --git a/scripting/include/fartsy/ass_helper.inc b/scripting/include/fartsy/ass_helper.inc index eee43a2..b55e0f7 100644 --- a/scripting/include/fartsy/ass_helper.inc +++ b/scripting/include/fartsy/ass_helper.inc @@ -406,8 +406,6 @@ enum struct BULKFIRE { } BULKFIRE crusaderAtk[64]; - - //Configure all variables void SetupCoreData(){ AssLogger(LOGLVL_INFO, "Setting up core data..."); @@ -789,6 +787,17 @@ void SetupCoreData(){ HookEventEx("player_hurt", Event_PlayerHurt, EventHookMode_Pre); AssLogger(1, "Core data setup complete!"); } + +void UpdateGamemode(){ + char logdata[256]; + char popfile[128]; + int ent = FindEntityByClassname(-1, "tf_objective_resource"); + if (ent == -1) return; + GetEntPropString(ent, Prop_Send, "m_iszMvMPopfileName", popfile, sizeof(popfile)); + core.gamemode = (StrContains(popfile, "tacobell") != -1 ? 1 : (StrContains(popfile, "wavenull") != -1) ? 2 : 0); + Format(logdata, sizeof(logdata), "Testing if popfile contains tacobell or wavenull, result %i", core.gamemode); + AssLogger(LOGLVL_DEBUG, logdata); +} //Messages to be printed when the fail safe has been triggered. char failsafe[][256] = { "{orange}šŸ”„Burnt MochašŸµ {white}: FAILSAFE HAS BEEN TRIGGERED. ROBOT EXTERMINATION IN PROGRESS. [Failsafe Activated]", diff --git a/scripting/include/fartsy/ass_sudo.inc b/scripting/include/fartsy/ass_sudo.inc index 5f1e452..df85bac 100644 --- a/scripting/include/fartsy/ass_sudo.inc +++ b/scripting/include/fartsy/ass_sudo.inc @@ -13,6 +13,7 @@ void sudo(int task) { ServerCommand("fb_startmoney 50000"); CPrintToChatAll("{darkviolet}[{yellow}INFO{darkviolet}] {red}PROFESSOR'S ASS {white}v0x20 (Core-v%s). Prepare yourself for the unpredictable... [{limegreen}by TTV/ProfessorFartsalot{white}]", PLUGIN_VERSION); FastFire2("rain", "Alpha", "0", 0.0, false); + UpdateGamemode(); } //Wave init case 2: { @@ -1012,6 +1013,9 @@ public Action TimedOperator(Handle timer, int job) { CreateTimer(3.0, TimedOperator, 200); return Plugin_Stop; } + case 420:{ //Init from Wave Null. + UpdateGamemode(); + } case 6969: { if (!core.isWave){ ExitEmergencyMode();