X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fctf%2Fsv_ctf.qh;h=adb061809fe053f56c36f763e31fb7195e0e3928;hb=99c3e6da047827e29ecd320cc39215ae3a951637;hp=4cffb0c488a30a332b12235b228cd606e7c97af4;hpb=f29ce8d347095c394b160ca62c5ff14110f05da8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh index 4cffb0c48..adb061809 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh @@ -1,11 +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(); @@ -26,12 +35,6 @@ void ctf_RespawnFlag(entity flag); // score rule declarations const int ST_CTF_CAPS = 1; -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; -STATIC_INIT(Flag) { CTF_FLAG = NEW(Flag); } void ctf_FlagTouch(entity this, entity toucher) { ITEM_HANDLE(Pickup, CTF_FLAG, this, toucher); } // flag constants // for most of these, there is just one question to be asked: WHYYYYY? @@ -75,6 +78,9 @@ const float VEHICLE_FLAG_SCALE = 1.0; .float score_return; .float score_team_capture; // shouldn't be too high +// property set on objects to point to the flag they're carrying (if any) +.entity flagcarried; + // effects .string toucheffect; .string passeffect; @@ -129,6 +135,7 @@ bool ctf_stalemate; // indicates that a stalemate is active float ctf_captimerecord; // record time for capturing the flag .float ctf_pickuptime; .float ctf_droptime; +.float ctf_landtime; .int ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) .entity ctf_dropper; // don't allow spam of dropping the flag .float next_take_time;