::ROOT <- getroottable(); if (!("ConstantNamingConvention" in ROOT)) // make sure folding is only done once { foreach (a,b in Constants) foreach (k,v in b) if (v == null) ROOT[k] <- 0; else ROOT[k] <- v; } foreach (k, v in NetProps.getclass()) if (k != "IsValid") ROOT[k] <- NetProps[k].bindenv(NetProps); ::TF_STUN_MOVEMENT <- 1 ::TF_STUN_CONTROLS <- 2 ::TF_STUN_NO_EFFECTS <- 32 ::CogFront <- { Cleanup = function() { // cleanup any persistent changes here printl("Cleaning up CogFront...") EntFire("cog_in_her_face","UnpauseBotSpawning",0.03) // keep this at the end delete ::CogFront } // mandatory events OnGameEvent_recalculate_holidays = function(_) { if (GetRoundState() == 3) Cleanup() } OnGameEvent_mvm_wave_complete = function(_) { Cleanup() } ALL_PLAYERS = MaxClients().tointeger() BossDeath = function(sTag) { for (local i = 1; i <= ALL_PLAYERS ; i++) //For all bots except those with sTag, { local hPlayer = PlayerInstanceFromIndex(i) if (hPlayer == null) continue if ( !(hPlayer.IsBotOfType(TF_BOT_TYPE)) ) continue if ( !(hPlayer.IsAlive()) ) continue if ( hPlayer.HasBotTag(sTag) ) continue; // Stun all living bots for 15 seconds; reduce movespeed by 100%. hPlayer.StunPlayer(15, 1, TF_STUN_MOVEMENT | TF_STUN_CONTROLS | TF_STUN_NO_EFFECTS, hPlayer) } hInterface.AcceptInput("PauseBotSpawning","",null,null) EntFire("cog_in_her_face","UnpauseBotSpawning","",10) } } __CollectGameEventCallbacks(CogFront); if ("hInterface" in CogFront) CogFront.hInterface = SpawnEntityFromTable("point_populator_interface", { targetname = "cog_in_her_face" })