Xonotic
|
#include "ctf.qh"
#include <common/items/item/pickup.qh>
#include <common/mutators/base.qh>
#include <common/gamemodes/sv_rules.qh>
Go to the source code of this file.
Classes | |
class | Flag |
Macros | |
#define | CTF_DIFFTEAM(a, b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b)) |
#define | CTF_SAMETEAM(a, b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b)) |
#define | ctf_spawnorigin dropped_origin |
#define | FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) |
#define | snd_flag_capture noise2 |
#define | snd_flag_respawn noise3 |
#define | snd_flag_returned noise1 |
#define | snd_flag_taken noise |
#define | WPCOLOR_DROPPEDFLAG(t) ((t) ? ('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5 : '1 1 1') |
#define | WPCOLOR_ENEMYFC(t) ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') |
#define | WPCOLOR_FLAGCARRIER(t) ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') |
Functions | |
void | ctf_FlagTouch (entity this, entity toucher) |
void | ctf_Handle_Throw (entity player, entity receiver, float droptype) |
void | ctf_Initialize () |
void | ctf_RespawnFlag (entity flag) |
bool | ctf_Stalemate_Customize (entity this, entity client) |
void | havocbot_role_ctf_setrole (entity bot, int role) |
REGISTER_MUTATOR (ctf, false) | |
#define CTF_DIFFTEAM | ( | a, | |
b | |||
) | ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b)) |
Definition at line 177 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), ctf_Handle_Capture(), ctf_Handle_Pickup(), havocbot_ctf_find_enemy_flag(), havocbot_goalrating_ctf_enemyflag(), and MUTATOR_HOOKFUNCTION().
#define CTF_SAMETEAM | ( | a, | |
b | |||
) | ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b)) |
Definition at line 176 of file sv_ctf.qh.
Referenced by ctf_CaptureShield_Customize(), ctf_CaptureShield_Touch(), ctf_FlagBase_Customize(), ctf_FlagcarrierWaypoints(), ctf_FlagThink(), ctf_Handle_Pickup(), havocbot_ctf_find_flag(), havocbot_ctf_teamcount(), and havocbot_goalrating_ctf_ourbase().
#define ctf_spawnorigin dropped_origin |
Definition at line 133 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
#define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) |
Definition at line 50 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
#define snd_flag_capture noise2 |
Definition at line 67 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
#define snd_flag_respawn noise3 |
Definition at line 68 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
#define snd_flag_returned noise1 |
Definition at line 66 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
#define snd_flag_taken noise |
Definition at line 65 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
#define WPCOLOR_DROPPEDFLAG | ( | t | ) | ((t) ? ('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5 : '1 1 1') |
Definition at line 62 of file sv_ctf.qh.
Referenced by ctf_Handle_Drop().
#define WPCOLOR_ENEMYFC | ( | t | ) | ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') |
Definition at line 59 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), and ctf_FlagcarrierWaypoints().
#define WPCOLOR_FLAGCARRIER | ( | t | ) | ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') |
Definition at line 60 of file sv_ctf.qh.
Referenced by ctf_FlagcarrierWaypoints().
Definition at line 38 of file sv_ctf.qh.
References CTF_FLAG, and ITEM_HANDLE.
Referenced by ctf_FlagSetup().
void ctf_Initialize | ( | ) |
Definition at line 2820 of file sv_ctf.qc.
References autocvar_g_ctf_shield_force, autocvar_g_ctf_shield_max_ratio, autocvar_g_ctf_shield_min_negscore, ctf_captimerecord, ctf_captureshield_force, ctf_captureshield_max_ratio, ctf_captureshield_min_negscore, ctf_DelayedInit(), CTF_FLAG, CTF_RECORD, db_get(), GetMapname(), InitializeEntity(), NEW, NULL, record_type, ServerProgsDB, stof(), and strcat().
Referenced by REGISTER_MUTATOR().
Definition at line 1163 of file sv_ctf.qc.
References backtrace, CONTENT_EMPTY, ctf_CheckStalemate(), ctf_FakeTimeLimit(), DAMAGE_NO, FL_ITEM, FL_NOTARGET, FLAG_BASE, FLAG_DROPPED, FLAG_SCALE, GameRules_scoring_vip(), MOVETYPE_NONE, navigation_dynamicgoal_unset(), NULL, RES_HEALTH, set_movetype(), setorigin(), SetResourceExplicit(), SOLID_TRIGGER, and time.
Referenced by ctf_CheckFlagReturn(), ctf_Handle_Capture(), ctf_Handle_Return(), ctf_Handle_Throw(), ctf_Reset(), MUTATOR_HOOKFUNCTION(), and REGISTER_MUTATOR().
Definition at line 822 of file sv_ctf.qc.
References entity(), IS_PLAYER, owner, and SAME_TEAM.
Referenced by ctf_CheckStalemate(), and ctf_FlagcarrierWaypoints().
Definition at line 2102 of file sv_ctf.qc.
References HAVOCBOT_CTF_ROLE_CARRIER, HAVOCBOT_CTF_ROLE_DEFENSE, HAVOCBOT_CTF_ROLE_ESCORT, HAVOCBOT_CTF_ROLE_MIDDLE, HAVOCBOT_CTF_ROLE_OFFENSE, HAVOCBOT_CTF_ROLE_RETRIEVER, havocbot_role_ctf_carrier(), havocbot_role_ctf_defense(), havocbot_role_ctf_escort(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), havocbot_role_ctf_retriever(), LOG_TRACE, navigation_goalrating_timeout_expire(), navigation_goalrating_timeout_force(), and time.
Referenced by havocbot_ctf_reset_role(), havocbot_role_ctf_defense(), havocbot_role_ctf_escort(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), and havocbot_role_ctf_retriever().
REGISTER_MUTATOR | ( | ctf | , |
false | |||
) |
Definition at line 18 of file sv_ctf.qh.
References ctf_Initialize(), ctf_RespawnFlag(), entity(), GameRules_limit_lead(), GameRules_limit_score(), GameRules_teams(), MUTATOR_ONADD, and MUTATOR_STATIC.
const int CAPTURE_DROPPED = 2 |
Definition at line 120 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), and ctf_Handle_Capture().
const int CAPTURE_NORMAL = 1 |
Definition at line 119 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), and ctf_Handle_Capture().
float ctf_captimerecord |
Definition at line 135 of file sv_ctf.qh.
Referenced by ctf_CaptureRecord(), ctf_CheckFlagReturn(), ctf_FlagThink(), ctf_Handle_Pickup(), and ctf_Initialize().
float ctf_captureshield_force |
Definition at line 157 of file sv_ctf.qh.
Referenced by ctf_CaptureShield_Touch(), and ctf_Initialize().
float ctf_captureshield_max_ratio |
Definition at line 156 of file sv_ctf.qh.
Referenced by ctf_CaptureShield_CheckStatus(), and ctf_Initialize().
float ctf_captureshield_min_negscore |
Definition at line 155 of file sv_ctf.qh.
Referenced by ctf_CaptureShield_CheckStatus(), and ctf_Initialize().
float ctf_droptime |
Definition at line 137 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
Flag CTF_FLAG |
Definition at line 12 of file sv_ctf.qh.
Referenced by ctf_FlagSetup(), ctf_FlagTouch(), and ctf_Initialize().
bool ctf_flagdamaged_byworld |
Definition at line 141 of file sv_ctf.qh.
Referenced by ctf_FlagDamage(), and ctf_FlagThink().
bool ctf_oneflag |
Definition at line 160 of file sv_ctf.qh.
Referenced by ctf_CaptureRecord(), ctf_CheckStalemate(), ctf_DelayedInit(), ctf_FlagcarrierWaypoints(), ctf_FlagThink(), ctf_Handle_Capture(), DoesQ3ARemoveThisEntity(), havocbot_ctf_find_enemy_flag(), havocbot_goalrating_ctf_enemyflag(), havocbot_role_ctf_carrier(), and HUD_Mod_CTF().
float ctf_pickuptime |
Definition at line 136 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
bool ctf_stalemate |
Definition at line 134 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), ctf_FlagcarrierWaypoints(), ctf_Handle_Pickup(), HUD_Mod_CTF(), and MUTATOR_HOOKFUNCTION().
int ctf_status |
Definition at line 138 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
int ctf_teams |
Definition at line 142 of file sv_ctf.qh.
Referenced by ctf_DelayedInit(), and MUTATOR_HOOKFUNCTION().
entity ctf_worldflaglist |
Definition at line 90 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), ctf_DelayedInit(), ctf_FlagSetup(), ctf_FlagThink(), ctf_Handle_Capture(), ctf_RemovePlayer(), havocbot_ctf_calculate_middlepoint(), havocbot_ctf_find_enemy_flag(), havocbot_ctf_find_flag(), havocbot_ctf_is_basewaypoint(), havocbot_ctf_teamcount(), havocbot_goalrating_ctf_droppedflags(), havocbot_goalrating_ctf_enemyflag(), havocbot_goalrating_ctf_ourbase(), and MUTATOR_HOOKFUNCTION().
const int DROP_NORMAL = 1 |
Definition at line 111 of file sv_ctf.qh.
Referenced by ctf_Handle_Throw(), ctf_RemovePlayer(), and MUTATOR_HOOKFUNCTION().
const int DROP_PASS = 3 |
Definition at line 113 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), ctf_Handle_Drop(), ctf_Handle_Throw(), and MUTATOR_HOOKFUNCTION().
const int DROP_RESET = 4 |
Definition at line 114 of file sv_ctf.qh.
Referenced by ctf_Handle_Throw(), and ctf_Reset().
const int DROP_THROW = 2 |
Definition at line 112 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), ctf_Handle_Throw(), and MUTATOR_HOOKFUNCTION().
entity enemy |
Definition at line 143 of file sv_ctf.qh.
Referenced by assault_objective_decrease_use(), assault_setenemytoobjective(), assault_wall_think(), ball_customize(), bot_aim(), buff_Vengeance_DelayedDamage(), ctf_Reset(), DelayThink(), dompoint_captured(), dompointthink(), dompointtouch(), DragBox_Think(), havocbot_ai(), havocbot_aim(), havocbot_chooseenemy(), havocbot_chooseweapon(), havocbot_movetogoal(), jumppad_push(), kh_Key_Touch(), LinkDoors(), Monster_Appear(), Monster_Attack_Leap_Check(), Monster_Damage(), Monster_Dead(), Monster_Enemy_Check(), Monster_FindTarget(), Monster_Frozen_Think(), Monster_Move(), Monster_Move_Target(), Monster_Reset(), Monster_Spawn(), Monster_Think(), Monster_Touch(), Monster_Use(), Monster_ValidTarget(), NET_HANDLE(), ons_CaptureShield_Customize(), ons_CaptureShield_Reset(), ons_CaptureShield_Touch(), ons_DelayedLinkSetup(), ons_Link_CheckUpdate(), ons_Link_Send(), plat_center_touch(), plat_outside_touch(), Portal_Think(), Portal_Touch(), PutClientInServer(), SetSpectatee(), spawnfunc(), SpectateNext(), SpectatePrev(), SpectateSet(), SpectateUpdate(), superspec_hello(), teleport_findtarget(), Teleport_Touch(), test_weapons_hurt(), train_wait(), trigger_push_test(), trigger_push_touch(), vehicles_damage(), W_Nexball_Think(), WarpZone_Projectile_Touch(), WarpZone_Touch(), Weapon_whereis(), and write_damagetext().
const int FLAG_BASE = 1 |
Definition at line 106 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), ctf_FlagSetup(), ctf_FlagThink(), ctf_RespawnFlag(), havocbot_ctf_reset_role(), havocbot_goalrating_ctf_droppedflags(), havocbot_goalrating_ctf_ourstolenflag(), havocbot_role_ctf_carrier(), havocbot_role_ctf_defense(), havocbot_role_ctf_escort(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), havocbot_role_ctf_retriever(), and MUTATOR_HOOKFUNCTION().
const int FLAG_CARRY = 3 |
Definition at line 108 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), ctf_Handle_Pickup(), ctf_Handle_Retrieve(), havocbot_goalrating_ctf_enemyflag(), and MUTATOR_HOOKFUNCTION().
const vector FLAG_CARRY_OFFSET = ('-16 0 8') |
Definition at line 49 of file sv_ctf.qh.
Referenced by ctf_Handle_Pickup(), ctf_Handle_Retrieve(), and MUTATOR_HOOKFUNCTION().
const vector FLAG_DROP_OFFSET = ('0 0 32') |
Definition at line 48 of file sv_ctf.qh.
Referenced by ctf_Handle_Throw().
const int FLAG_DROPPED = 2 |
Definition at line 107 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), ctf_FlagThink(), ctf_Handle_Drop(), ctf_RespawnFlag(), havocbot_role_ctf_escort(), and MUTATOR_HOOKFUNCTION().
const int FLAG_FLOAT_OFFSET_Z = 32 |
Definition at line 52 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
const int FLAG_PASS_ARC_OFFSET_Z = -10 |
Definition at line 53 of file sv_ctf.qh.
Referenced by ctf_CalculatePassVelocity().
const int FLAG_PASSING = 4 |
Definition at line 109 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), ctf_FlagThink(), ctf_Handle_Throw(), and MUTATOR_HOOKFUNCTION().
const float FLAG_SCALE = 0.6 |
Definition at line 42 of file sv_ctf.qh.
Referenced by ctf_FlagSetup(), ctf_RespawnFlag(), and MUTATOR_HOOKFUNCTION().
const float FLAG_THINKRATE = 0.2 |
Definition at line 44 of file sv_ctf.qh.
Referenced by ctf_FlagSetup(), and ctf_FlagThink().
const float FLAG_TOUCHRATE = 0.5 |
Definition at line 45 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
const vector FLAG_WAYPOINT_OFFSET = ('0 0 64') |
Definition at line 51 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), ctf_DelayedFlagSetup(), ctf_FlagcarrierWaypoints(), ctf_Handle_Drop(), and MUTATOR_HOOKFUNCTION().
entity flagcarried |
Definition at line 82 of file sv_ctf.qh.
Referenced by bot_cmd_eval(), havocbot_ctf_reset_role(), havocbot_goalrating_ctf_enemyflag(), havocbot_goalrating_ctf_ourbase(), havocbot_role_ctf_carrier(), havocbot_role_ctf_defense(), havocbot_role_ctf_escort(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), and havocbot_role_ctf_retriever().
bool havocbot_cantfindflag |
Definition at line 171 of file sv_ctf.qh.
Referenced by havocbot_role_ctf_carrier().
const int HAVOCBOT_CTF_ROLE_CARRIER = 16 |
Definition at line 167 of file sv_ctf.qh.
Referenced by havocbot_ctf_reset_role(), havocbot_role_ctf_defense(), havocbot_role_ctf_escort(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), havocbot_role_ctf_retriever(), and havocbot_role_ctf_setrole().
const int HAVOCBOT_CTF_ROLE_DEFENSE = 2 |
Definition at line 164 of file sv_ctf.qh.
Referenced by havocbot_ctf_reset_role(), havocbot_role_ctf_escort(), and havocbot_role_ctf_setrole().
const int HAVOCBOT_CTF_ROLE_ESCORT = 64 |
Definition at line 169 of file sv_ctf.qh.
Referenced by havocbot_role_ctf_offense(), and havocbot_role_ctf_setrole().
const int HAVOCBOT_CTF_ROLE_MIDDLE = 4 |
Definition at line 165 of file sv_ctf.qh.
Referenced by havocbot_ctf_reset_role(), and havocbot_role_ctf_setrole().
const int HAVOCBOT_CTF_ROLE_OFFENSE = 8 |
Definition at line 166 of file sv_ctf.qh.
Referenced by havocbot_ctf_reset_role(), and havocbot_role_ctf_setrole().
const int HAVOCBOT_CTF_ROLE_RETRIEVER = 32 |
Definition at line 168 of file sv_ctf.qh.
Referenced by havocbot_ctf_reset_role(), havocbot_role_ctf_defense(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), and havocbot_role_ctf_setrole().
entity pass_target |
Definition at line 148 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
const int PICKUP_BASE = 1 |
Definition at line 116 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), and ctf_Handle_Pickup().
const int PICKUP_DROPPED = 2 |
Definition at line 117 of file sv_ctf.qh.
Referenced by ctf_FlagThink(), and ctf_Handle_Pickup().
const int RETURN_DAMAGE = 3 |
Definition at line 124 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), and ctf_FlagDamage().
const int RETURN_DROPPED = 2 |
Definition at line 123 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), and ctf_FlagThink().
const int RETURN_NEEDKILL = 5 |
Definition at line 126 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), ctf_FlagDamage(), and ctf_FlagThink().
const int RETURN_SPEEDRUN = 4 |
Definition at line 125 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), and ctf_FlagThink().
const int RETURN_TIMEOUT = 1 |
Definition at line 122 of file sv_ctf.qh.
Referenced by ctf_CheckFlagReturn(), and ctf_FlagThink().
string snd_flag_dropped |
Definition at line 69 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
string snd_flag_pass |
Definition at line 71 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
string snd_flag_touch |
Definition at line 70 of file sv_ctf.qh.
Referenced by ctf_FlagSetup().
const int ST_CTF_CAPS = 1 |
Definition at line 36 of file sv_ctf.qh.
Referenced by ctf_ScoreRules().
const vector VEHICLE_FLAG_OFFSET = ('0 0 96') |
Definition at line 55 of file sv_ctf.qh.
Referenced by ctf_Handle_Pickup(), ctf_Handle_Retrieve(), and MUTATOR_HOOKFUNCTION().
const float VEHICLE_FLAG_SCALE = 1.0 |
Definition at line 56 of file sv_ctf.qh.
Referenced by ctf_Handle_Pickup(), ctf_Handle_Retrieve(), and MUTATOR_HOOKFUNCTION().
const float WPFE_THINKRATE = 0.5 |
Definition at line 46 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
bool wpforenemy_announced |
Definition at line 102 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), and Onslaught_CheckWinner().
float wpforenemy_nextthink |
Definition at line 103 of file sv_ctf.qh.
Referenced by ctf_FlagThink().
entity wps_enemyflagcarrier |
Definition at line 100 of file sv_ctf.qh.
Referenced by ctf_CheckStalemate(), and ctf_FlagcarrierWaypoints().
entity wps_flagbase |
Definition at line 96 of file sv_ctf.qh.
Referenced by ctf_DelayedFlagSetup().
entity wps_flagcarrier |
Definition at line 97 of file sv_ctf.qh.
Referenced by ctf_FlagcarrierWaypoints().
entity wps_flagdropped |
Definition at line 98 of file sv_ctf.qh.
Referenced by ctf_Handle_Drop().
entity wps_flagreturn |
Definition at line 99 of file sv_ctf.qh.
Referenced by ctf_FlagcarrierWaypoints().
entity wps_helpme |
Definition at line 95 of file sv_ctf.qh.
Referenced by MUTATOR_HOOKFUNCTION().