::__potato.RefundFix <- { // Pending an update to rafmod, this fixes an exploit where players could refund during a // wave to restore accumulated spent cash from previous mission runs. function OnGameEvent_mvm_begin_wave(_) { Convars.SetValue("tf_mvm_respec_enabled", false) local menu_hack = SpawnEntityFromTable("logic_case", { case16 = "|0.02|Cancel" }) for (local p; p = Entities.FindByClassname(p, "player");) { if (p.IsBotOfType(Constants.EBotType.TF_BOT_TYPE)) continue if (NetProps.GetPropBool(p, "m_Shared.m_bInUpgradeZone")) menu_hack.AcceptInput("$DisplayMenu", "!activator", p, null) } menu_hack.Kill() } function OnGameEvent_mvm_wave_complete(_) Convars.SetValue("tf_mvm_respec_enabled", true) function OnGameEvent_recalculate_holidays(_) { if (GetRoundState() != Constants.ERoundState.GR_STATE_PREROUND) return Convars.SetValue("tf_mvm_respec_enabled", true) } } __CollectGameEventCallbacks(::__potato.RefundFix)