From: Mario Date: Thu, 9 Jul 2015 03:38:08 +0000 (+1000) Subject: Start with most weapons & ammo in freeze tag X-Git-Tag: xonotic-v0.8.1~49 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=44968fcb5b31c35a0e662906a8b9542ab3933561;p=xonotic%2Fxonotic-data.pk3dir.git Start with most weapons & ammo in freeze tag --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index e8a1529e4..7951b2959 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -580,7 +580,7 @@ void readplayerstartcvars() s = cvar_string("g_weaponarena"); if (s == "0" || s == "") { - if(g_ca) + if(g_ca || g_freezetag) s = "most"; } @@ -709,7 +709,7 @@ void readplayerstartcvars() warmup_start_weapons_default = start_weapons_default; warmup_start_weapons_defaultmask = start_weapons_defaultmask; - if (!g_weaponarena && !g_ca) + if (!g_weaponarena && !g_ca && !g_freezetag) { warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells"); warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails"); diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 3b251e73b..fd3a9deb4 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -524,6 +524,21 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink) return 1; } +MUTATOR_HOOKFUNCTION(freezetag_SetStartItems) +{ + start_items &= ~IT_UNLIMITED_AMMO; + //start_health = warmup_start_health = cvar("g_lms_start_health"); + //start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor"); + start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells"); + start_ammo_nails = warmup_start_ammo_nails = cvar("g_lms_start_ammo_nails"); + start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_lms_start_ammo_rockets"); + start_ammo_cells = warmup_start_ammo_cells = cvar("g_lms_start_ammo_cells"); + start_ammo_plasma = warmup_start_ammo_plasma = cvar("g_lms_start_ammo_plasma"); + start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_lms_start_ammo_fuel"); + + return 0; +} + MUTATOR_HOOKFUNCTION(freezetag_BotRoles) { if (!self.deadflag) @@ -571,6 +586,7 @@ MUTATOR_DEFINITION(gamemode_freezetag) MUTATOR_HOOK(reset_map_players, freezetag_reset_map_players, CBC_ORDER_ANY); MUTATOR_HOOK(GiveFragsForKill, freezetag_GiveFragsForKill, CBC_ORDER_FIRST); MUTATOR_HOOK(PlayerPreThink, freezetag_PlayerPreThink, CBC_ORDER_FIRST); + MUTATOR_HOOK(SetStartItems, freezetag_SetStartItems, CBC_ORDER_ANY); MUTATOR_HOOK(HavocBot_ChooseRole, freezetag_BotRoles, CBC_ORDER_ANY); MUTATOR_HOOK(GetTeamCount, freezetag_GetTeamCount, CBC_ORDER_EXCLUSIVE);