X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_ctf.qh;h=8ef860846e45d08077bbcc14259f77484dab207c;hp=45de46971f1c1efb005c43dd6a25ca400de8bc51;hb=53911d2ce2724f2da23fb6806e491ce795ae4326;hpb=5972fcfdf1ffe5bef1df9edc2de2944abbeba280 diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qh b/qcsrc/server/mutators/mutator/gamemode_ctf.qh index 45de46971..8ef860846 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qh +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qh @@ -8,16 +8,10 @@ void ctf_RespawnFlag(entity flag); // score rule declarations const int ST_CTF_CAPS = 1; -const int SP_CTF_CAPS = 4; -const int SP_CTF_CAPTIME = 5; -const int SP_CTF_PICKUPS = 6; -const int SP_CTF_DROPS = 7; -const int SP_CTF_FCKILLS = 8; -const int SP_CTF_RETURNS = 9; CLASS(Flag, Pickup) - ATTRIB(Flag, m_mins, vector, PL_MIN_CONST + '0 0 -13') - ATTRIB(Flag, m_maxs, vector, PL_MAX_CONST + '0 0 -13') + 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); } @@ -54,6 +48,14 @@ const float VEHICLE_FLAG_SCALE = 1.0; .string snd_flag_touch; .string snd_flag_pass; +// score fields +.float score_assist; +.float score_capture; +.float score_drop; // note: negated +.float score_pickup; +.float score_return; +.float score_team_capture; // shouldn't be too high + // effects .string toucheffect; .string passeffect; @@ -65,11 +67,11 @@ entity ctf_worldflaglist; .entity ctf_staleflagnext; // waypoint sprites -.entity bot_basewaypoint; // flag waypointsprite .entity wps_helpme; .entity wps_flagbase; .entity wps_flagcarrier; .entity wps_flagdropped; +.entity wps_flagreturn; .entity wps_enemyflagcarrier; .float wps_helpme_time; bool wpforenemy_announced; @@ -98,6 +100,8 @@ const int RETURN_DAMAGE = 3; const int RETURN_SPEEDRUN = 4; const int RETURN_NEEDKILL = 5; +bool ctf_Stalemate_Customize(entity this, entity client); + void ctf_Handle_Throw(entity player, entity receiver, float droptype); // flag properties @@ -110,7 +114,7 @@ float ctf_captimerecord; // record time for capturing the flag .entity ctf_dropper; // don't allow spam of dropping the flag .int max_flag_health; .float next_take_time; -.bool ctf_flagdamaged; +.bool ctf_flagdamaged_byworld; int ctf_teams; // passing/throwing properties @@ -141,9 +145,6 @@ const int HAVOCBOT_CTF_ROLE_ESCORT = 64; .bool havocbot_cantfindflag; -vector havocbot_ctf_middlepoint; -float havocbot_ctf_middlepoint_radius; - void havocbot_role_ctf_setrole(entity bot, int role); // team checking @@ -171,3 +172,4 @@ const int CTF_NEUTRAL_FLAG_LOST = 512; const int CTF_NEUTRAL_FLAG_CARRYING = 768; const int CTF_FLAG_NEUTRAL = 2048; const int CTF_SHIELDED = 4096; +const int CTF_STALEMATE = 8192;