From: terencehill Date: Wed, 10 Mar 2021 22:52:25 +0000 (+0100) Subject: Merge branch 'master' into terencehill/less_entities X-Git-Tag: xonotic-v0.8.5~507^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ac7deb97b1a0e73ceea4684be73e72912fb3f1aa;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into terencehill/less_entities --- ac7deb97b1a0e73ceea4684be73e72912fb3f1aa diff --cc qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh index 492da41b1,58954905c..5c55350cb --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh @@@ -1,14 -1,16 +1,20 @@@ #pragma once #include "ctf.qh" - + #include + #include + #include +CLASS(Flag, Pickup) + ATTRIB(Flag, m_mins, vector, (PL_MIN_CONST + '0 0 -13') * 1.4); // scaling be damned + ATTRIB(Flag, m_maxs, vector, (PL_MAX_CONST + '0 0 -13') * 1.4); +ENDCLASS(Flag) +Flag CTF_FLAG; void ctf_Initialize(); + int autocvar_captureleadlimit_override; + int autocvar_capturelimit_override; + REGISTER_MUTATOR(ctf, false) { MUTATOR_STATIC(); diff --cc qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc index bb1c9aee9,993eb936f..1d872bb7f --- a/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc +++ b/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc @@@ -4,8 -5,20 +5,10 @@@ #include #include + #include + #include #include -IntrusiveList g_invasion_roundends; -IntrusiveList g_invasion_waves; -IntrusiveList g_invasion_spawns; -STATIC_INIT(g_invasion) -{ - g_invasion_roundends = IL_NEW(); - g_invasion_waves = IL_NEW(); - g_invasion_spawns = IL_NEW(); -} - float autocvar_g_invasion_round_timelimit; float autocvar_g_invasion_spawnpoint_spawn_delay; float autocvar_g_invasion_warmup; diff --cc qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qh index 52eec4abc,363c0e39f..d472dd999 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qh +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qh @@@ -1,7 -1,8 +1,9 @@@ #pragma once + #include + float autocvar_g_onslaught_point_limit; +IntrusiveList g_onsshields; void ons_Initialize(); REGISTER_MUTATOR(ons, false) diff --cc qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index a9eac2423,13403b9e3..34a16b8a7 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@@ -14,9 -14,18 +14,8 @@@ bool autocvar_g_instagib_ammo_convert_c bool autocvar_g_instagib_ammo_convert_rockets; bool autocvar_g_instagib_ammo_convert_shells; bool autocvar_g_instagib_ammo_convert_bullets; - int autocvar_g_instagib_extralives; float autocvar_g_instagib_speed_highspeed; -IntrusiveList g_instagib_items; -STATIC_INIT(instagib) -{ - g_instagib_items = IL_NEW(); - IL_PUSH(g_instagib_items, ITEM_VaporizerCells); - IL_PUSH(g_instagib_items, ITEM_ExtraLife); - IL_PUSH(g_instagib_items, ITEM_Invisibility); - IL_PUSH(g_instagib_items, ITEM_Speed); -} - void instagib_invisibility(entity this) { this.strength_finished = autocvar_g_instagib_invisibility_time; diff --cc qcsrc/common/mutators/mutator/instagib/sv_instagib.qh index d01abd080,f50f0f947..5467a44ee --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qh +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qh @@@ -7,9 -30,8 +30,9 @@@ int autocvar_g_instagib_extralives void instagib_invisibility(entity this); void instagib_extralife(entity this); void instagib_speed(entity this); +IntrusiveList g_instagib_items; - REGISTER_MUTATOR(mutator_instagib, autocvar_g_instagib && !g_nexball) + REGISTER_MUTATOR(mutator_instagib, autocvar_g_instagib && !MapInfo_LoadedGametype.m_weaponarena) { MUTATOR_ONADD { diff --cc qcsrc/common/mutators/mutator/overkill/sv_overkill.qh index 9ee809df6,4712ec2fa..32f48ea15 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qh +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qh @@@ -7,9 -7,8 +7,9 @@@ bool autocvar_g_overkill_filter_armorbi bool autocvar_g_overkill_filter_armormega; .float ok_item; +IntrusiveList g_overkill_items; - REGISTER_MUTATOR(ok, expr_evaluate(autocvar_g_overkill) && !MUTATOR_IS_ENABLED(mutator_instagib) && !g_nexball && cvar_string("g_mod_balance") == "Overkill") + REGISTER_MUTATOR(ok, expr_evaluate(autocvar_g_overkill) && !MUTATOR_IS_ENABLED(mutator_instagib) && !MapInfo_LoadedGametype.m_weaponarena && cvar_string("g_mod_balance") == "Overkill") { MUTATOR_ONADD { diff --cc qcsrc/server/teamplay.qc index 81c97fcab,7b2027589..6c45ab431 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@@ -46,13 -46,11 +46,13 @@@ string autocvar_g_forced_team_pink entity g_team_entities[NUM_TEAMS]; ///< Holds global team entities. -STATIC_INIT(g_team_entities) +void Team_InitTeams() { + if (g_team_entities[0]) + return; for (int i = 0; i < NUM_TEAMS; ++i) { - g_team_entities[i] = spawn(); + g_team_entities[i] = new_pure(); } }