Sync gamemode var on wave init
This commit is contained in:
@@ -406,8 +406,6 @@ enum struct BULKFIRE {
|
|||||||
}
|
}
|
||||||
BULKFIRE crusaderAtk[64];
|
BULKFIRE crusaderAtk[64];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Configure all variables
|
//Configure all variables
|
||||||
void SetupCoreData(){
|
void SetupCoreData(){
|
||||||
AssLogger(LOGLVL_INFO, "Setting up core data...");
|
AssLogger(LOGLVL_INFO, "Setting up core data...");
|
||||||
@@ -789,6 +787,17 @@ void SetupCoreData(){
|
|||||||
HookEventEx("player_hurt", Event_PlayerHurt, EventHookMode_Pre);
|
HookEventEx("player_hurt", Event_PlayerHurt, EventHookMode_Pre);
|
||||||
AssLogger(1, "Core data setup complete!");
|
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.
|
//Messages to be printed when the fail safe has been triggered.
|
||||||
char failsafe[][256] = {
|
char failsafe[][256] = {
|
||||||
"{orange}🔥Burnt Mocha🍵 {white}: FAILSAFE HAS BEEN TRIGGERED. ROBOT EXTERMINATION IN PROGRESS. [Failsafe Activated]",
|
"{orange}🔥Burnt Mocha🍵 {white}: FAILSAFE HAS BEEN TRIGGERED. ROBOT EXTERMINATION IN PROGRESS. [Failsafe Activated]",
|
||||||
|
@@ -13,6 +13,7 @@ void sudo(int task) {
|
|||||||
ServerCommand("fb_startmoney 50000");
|
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);
|
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);
|
FastFire2("rain", "Alpha", "0", 0.0, false);
|
||||||
|
UpdateGamemode();
|
||||||
}
|
}
|
||||||
//Wave init
|
//Wave init
|
||||||
case 2: {
|
case 2: {
|
||||||
@@ -1012,6 +1013,9 @@ public Action TimedOperator(Handle timer, int job) {
|
|||||||
CreateTimer(3.0, TimedOperator, 200);
|
CreateTimer(3.0, TimedOperator, 200);
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
}
|
}
|
||||||
|
case 420:{ //Init from Wave Null.
|
||||||
|
UpdateGamemode();
|
||||||
|
}
|
||||||
case 6969: {
|
case 6969: {
|
||||||
if (!core.isWave){
|
if (!core.isWave){
|
||||||
ExitEmergencyMode();
|
ExitEmergencyMode();
|
||||||
|
Reference in New Issue
Block a user