X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fctf%2Fsv_ctf.qh;h=9fe2f0a543a210dbdcc3bed3f5c983139b6c538b;hb=aafb3956d4321d56a6c34ccb1796b8bf6fa89458;hp=350ad8c4ff6e0eed2304964fc4bd1c9ec31e5d7c;hpb=ba7c5c7aa1351282377f6c4afc4653a130409255;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 350ad8c4f..9fe2f0a54 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh @@ -2,6 +2,10 @@ #include "ctf.qh" +#include +#include +#include + void ctf_Initialize(); REGISTER_MUTATOR(ctf, false) @@ -28,7 +32,8 @@ 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); } +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? @@ -72,6 +77,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; @@ -128,7 +136,6 @@ float ctf_captimerecord; // record time for capturing the flag .float ctf_droptime; .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 -.int max_flag_health; .float next_take_time; .bool ctf_flagdamaged_byworld; int ctf_teams;