// these are needed since mutators are compiled last #ifdef SVQC // used in cheats.qc void ctf_RespawnFlag(entity flag); // score rule declarations const float ST_CTF_CAPS = 1; const float SP_CTF_CAPS = 4; const float SP_CTF_CAPTIME = 5; const float SP_CTF_PICKUPS = 6; const float SP_CTF_DROPS = 7; const float SP_CTF_FCKILLS = 8; const float 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') #define FLAG_MAX (PL_MAX + '0 0 -13') const float FLAG_SCALE = 0.6; const float FLAG_THINKRATE = 0.2; const float FLAG_TOUCHRATE = 0.5; const float WPFE_THINKRATE = 0.5; #define FLAG_DROP_OFFSET ('0 0 32') #define FLAG_CARRY_OFFSET ('-16 0 8') #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') const float VEHICLE_FLAG_SCALE = 1.0; // waypoint colors #define WPCOLOR_ENEMYFC(t) (colormapPaletteColor(t - 1, false) * 0.75) #define WPCOLOR_FLAGCARRIER(t) ('0.8 0.8 0') #define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5) // sounds #define snd_flag_taken noise #define snd_flag_returned noise1 #define snd_flag_capture noise2 #define snd_flag_respawn noise3 .string snd_flag_dropped; .string snd_flag_touch; .string snd_flag_pass; // effects .string toucheffect; .string passeffect; .string capeffect; // list of flags on the map entity ctf_worldflaglist; .entity ctf_worldflagnext; .entity ctf_staleflagnext; // waypoint sprites .entity bot_basewaypoint; // flag waypointsprite .entity wps_helpme; .entity wps_flagbase; .entity wps_flagcarrier; .entity wps_flagdropped; .entity wps_enemyflagcarrier; .float wps_helpme_time; float wpforenemy_announced; float wpforenemy_nextthink; // statuses const float FLAG_BASE = 1; const float FLAG_DROPPED = 2; const float FLAG_CARRY = 3; const float FLAG_PASSING = 4; const float DROP_NORMAL = 1; const float DROP_THROW = 2; const float DROP_PASS = 3; const float DROP_RESET = 4; const float PICKUP_BASE = 1; const float PICKUP_DROPPED = 2; const float CAPTURE_NORMAL = 1; const float CAPTURE_DROPPED = 2; const float RETURN_TIMEOUT = 1; const float RETURN_DROPPED = 2; const float RETURN_DAMAGE = 3; const float RETURN_SPEEDRUN = 4; const float RETURN_NEEDKILL = 5; // flag properties #define ctf_spawnorigin dropped_origin float 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_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 max_flag_health; .float next_take_time; // 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 const float HAVOCBOT_CTF_ROLE_NONE = 0; const float HAVOCBOT_CTF_ROLE_DEFENSE = 2; const float HAVOCBOT_CTF_ROLE_MIDDLE = 4; const float HAVOCBOT_CTF_ROLE_OFFENSE = 8; const float HAVOCBOT_CTF_ROLE_CARRIER = 16; const float HAVOCBOT_CTF_ROLE_RETRIEVER = 32; const float 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); #endif