From: Mario Date: Fri, 14 Mar 2025 19:12:31 +0000 (+1000) Subject: Merge branch 'master' into Mario/frozen_status_effect X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FMario%2Ffrozen_status_effect;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into Mario/frozen_status_effect --- b9de0f3a3f706c0f2c78aaf19691bd79b7bd37e1 diff --cc mutators.cfg index a09c9441d,8521d811c..8306751ec --- a/mutators.cfg +++ b/mutators.cfg @@@ -258,8 -262,9 +262,8 @@@ set g_nades_napalm_fountain_edgedamage set g_nades_napalm_fountain_radius 130 "distance from the fountain" // Ice (3) - set g_nades_ice 1 "Ice nade: freezes and reduces health" // script-ignore + set g_nades_ice 1 "Ice nade: freezes and reduces health; \"1\" = allow client selection of this nade type" // script-ignore set g_nades_ice_freeze_time 3 "how long the ice field will last" -set g_nades_ice_health 0 "how much health the player will have after being unfrozen" set g_nades_ice_explode 0 "whether the ice nade should explode again once the ice field dissipated" set g_nades_ice_teamcheck 2 "\"0\" = freezes everyone including the player who threw the nade, \"1\" = freezes enemies and teammates, \"2\" = freezes only enemies" diff --cc qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index bab20b65b,e61edf851..4d8e82a24 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@@ -116,10 -124,9 +124,9 @@@ void ka_TouchEvent(entity this, entity ka_RespawnBall(this); return; } + // TODO: mutator hook to prevent picking up objectives - if(toucher.ballcarried) { return; } if(IS_INDEPENDENT_PLAYER(toucher)) { return; } if(IS_DEAD(toucher)) { return; } - if(STAT(FROZEN, toucher)) { return; } if (!IS_PLAYER(toucher)) { // The ball just touched an object, most likely the world Send_Effect(EFFECT_BALL_SPARKS, this.origin, '0 0 0', 1); diff --cc qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc index e59ead16c,7bb60c93e..107cdeb12 --- a/qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc +++ b/qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc @@@ -93,9 -115,9 +115,8 @@@ void tka_TouchEvent(entity this, entit tka_RespawnBall(this); return; } - if(toucher.ballcarried) { return; } if(IS_INDEPENDENT_PLAYER(toucher)) { return; } if(IS_DEAD(toucher)) { return; } - if(STAT(FROZEN, toucher)) { return; } if (!IS_PLAYER(toucher)) { // The ball just touched an object, most likely the world Send_Effect(EFFECT_BALL_SPARKS, this.origin, '0 0 0', 1); diff --cc qcsrc/server/utils.qh index 94aa70f63,fee006ab2..89feab815 --- a/qcsrc/server/utils.qh +++ b/qcsrc/server/utils.qh @@@ -22,8 -22,9 +22,9 @@@ const string STR_OBSERVER = "observer" #define IS_VEHICLE(v) (v.vehicle_flags & VHF_ISVEHICLE) #define IS_TURRET(v) (v.turret_flags & TUR_FLAG_ISTURRET) -#define IS_MOVABLE(v) ((IS_PLAYER(v) || IS_MONSTER(v)) && !STAT(FROZEN, v)) +#define IS_MOVABLE(v) ((IS_PLAYER(v) || IS_MONSTER(v)) && !STAT(FROZEN, v) && !StatusEffects_active(STATUSEFFECT_Frozen, v)) #define IS_DEAD(s) ((s).deadflag != DEAD_NO) + #define IS_INVISIBLE(v) (v.alpha <= 0.25 || StatusEffects_active(STATUSEFFECT_Invisibility, v) || MUTATOR_IS_ENABLED(cloaked)) #define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))