X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fgamemode_ctf.qh;h=1c5898bd1ad99afc1e3d773984620de82a2f288d;hb=0f6085c8ea46125d87ca81ec7f5e82f73c08f958;hp=fc91e94a453af269718d5189fa736f4f4dca253c;hpb=a1edee842c5cb193b7c2d43c4fb6f5dbfc4782fe;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index fc91e94a4..1c5898bd1 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -1,16 +1,16 @@ // these are needed since mutators are compiled last // used in cheats.qc -void ctf_RespawnFlag(entity flag) +void ctf_RespawnFlag(entity flag); -// used in t_quake3.qc -void spawnfunc_info_player_team1(); -void spawnfunc_info_player_team2(); -void spawnfunc_info_player_team3(); -void spawnfunc_info_player_team4(); -void spawnfunc_item_flag_team1(); -void spawnfunc_item_flag_team2(); -void spawnfunc_ctf_team(); +// score rule declarations +#define ST_CTF_CAPS 1 +#define SP_CTF_CAPS 4 +#define SP_CTF_CAPTIME 5 +#define SP_CTF_PICKUPS 6 +#define SP_CTF_DROPS 7 +#define SP_CTF_FCKILLS 8 +#define SP_CTF_RETURNS 9 // flag constants // for most of these, there is just one question to be asked: WHYYYYY? #define FLAG_MIN (PL_MIN + '0 0 -13') @@ -27,6 +27,7 @@ void spawnfunc_ctf_team(); #define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_z - 13)) #define FLAG_WAYPOINT_OFFSET ('0 0 64') #define FLAG_FLOAT_OFFSET ('0 0 32') +#define FLAG_PASS_ARC_OFFSET ('0 0 -10') #define VEHICLE_FLAG_OFFSET ('0 0 96') #define VEHICLE_FLAG_SCALE 1.0 @@ -47,6 +48,8 @@ void spawnfunc_ctf_team(); // effects .string toucheffect; +.string passeffect; +.string capeffect; // list of flags on the map entity ctf_worldflaglist; @@ -60,6 +63,7 @@ entity ctf_worldflaglist; .entity wps_flagcarrier; .entity wps_flagdropped; .entity wps_enemyflagcarrier; +.float wps_helpme_time; float wpforenemy_announced; float wpforenemy_nextthink; @@ -93,18 +97,36 @@ float ctf_captimerecord; // record time for capturing the flag .float ctf_pickuptime; .float ctf_droptime; .float ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) -.entity ctf_carrier; .entity ctf_dropper; // don't allow spam of dropping the flag .float max_flag_health; .float next_take_time; -// passing properties +// passing/throwing properties +.float pass_distance; .entity pass_sender; .entity pass_target; .float throw_antispam; +.float throw_prevtime; +.float throw_count; // CaptureShield: If the player is too bad to be allowed to capture, shield them from taking the flag. .float ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture float ctf_captureshield_min_negscore; // punish at -20 points float ctf_captureshield_max_ratio; // punish at most 30% of each team float ctf_captureshield_force; // push force of the shield + +// bot player logic +#define HAVOCBOT_CTF_ROLE_NONE 0 +#define HAVOCBOT_CTF_ROLE_DEFENSE 2 +#define HAVOCBOT_CTF_ROLE_MIDDLE 4 +#define HAVOCBOT_CTF_ROLE_OFFENSE 8 +#define HAVOCBOT_CTF_ROLE_CARRIER 16 +#define HAVOCBOT_CTF_ROLE_RETRIEVER 32 +#define HAVOCBOT_CTF_ROLE_ESCORT 64 + +.float havocbot_cantfindflag; + +vector havocbot_ctf_middlepoint; +float havocbot_ctf_middlepoint_radius; + +void havocbot_role_ctf_setrole(entity bot, float role);