|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "sv_keyhunt.qh"#include <common/checkextension.qh>#include <server/command/vote.qh>#include <server/gamelog.qh>#include <server/damage.qh>#include <server/items/items.qh>#include <common/mapobjects/triggers.qh>Go to the source code of this file.
| void havocbot_goalrating_kh | ( | entity | this, |
| float | ratingscale_team, | ||
| float | ratingscale_dropped, | ||
| float | ratingscale_enemy ) |
Definition at line 1032 of file sv_keyhunt.qc.
References entity(), havocbot_goalrating_items(), kh_waypointsprite_visible_for_bot(), kh_worldkeylist, navigation_routerating(), origin, and SAME_TEAM.
Referenced by havocbot_role_kh_carrier(), havocbot_role_kh_defense(), havocbot_role_kh_freelancer(), and havocbot_role_kh_offense().
Definition at line 1056 of file sv_keyhunt.qc.
References entity(), havocbot_goalrating_kh(), havocbot_role_kh_freelancer(), havocbot_role_timeout, IS_DEAD, kh_Key_AllOwnedByWhichTeam(), kh_next, LOG_TRACE, navigation_goalrating_end(), navigation_goalrating_start(), navigation_goalrating_timeout(), navigation_goalrating_timeout_set(), and team.
Referenced by havocbot_role_kh_defense(), havocbot_role_kh_freelancer(), havocbot_role_kh_offense(), and void().
Definition at line 1084 of file sv_keyhunt.qc.
References entity(), havocbot_goalrating_kh(), havocbot_role_kh_carrier(), havocbot_role_kh_freelancer(), havocbot_role_timeout, IS_DEAD, kh_Key_AllOwnedByWhichTeam(), kh_next, LOG_TRACE, navigation_goalrating_end(), navigation_goalrating_start(), navigation_goalrating_timeout(), navigation_goalrating_timeout_set(), random(), team, and time.
Referenced by havocbot_role_kh_freelancer(), and void().
Definition at line 1169 of file sv_keyhunt.qc.
References entity(), havocbot_goalrating_kh(), havocbot_role_kh_carrier(), havocbot_role_kh_defense(), havocbot_role_kh_offense(), havocbot_role_timeout, IS_DEAD, kh_Key_AllOwnedByWhichTeam(), kh_next, LOG_TRACE, navigation_goalrating_end(), navigation_goalrating_start(), navigation_goalrating_timeout(), navigation_goalrating_timeout_set(), random(), team, and time.
Referenced by havocbot_role_kh_carrier(), havocbot_role_kh_defense(), havocbot_role_kh_offense(), and void().
Definition at line 1126 of file sv_keyhunt.qc.
References entity(), havocbot_goalrating_kh(), havocbot_role_kh_carrier(), havocbot_role_kh_freelancer(), havocbot_role_timeout, IS_DEAD, kh_Key_AllOwnedByWhichTeam(), kh_next, LOG_TRACE, navigation_goalrating_end(), navigation_goalrating_start(), navigation_goalrating_timeout(), navigation_goalrating_timeout_set(), random(), team, and time.
Referenced by havocbot_role_kh_freelancer(), and void().
| if | ( | ! | IS_PLAYERfrag_attacker)||!IS_PLAYER(frag_target | ) |
References frag_target.
| if | ( | frag_attacker.kh_next ! | = NULL | ) |
Definition at line 1230 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_carrier_damage, autocvar_g_balance_keyhunt_carrier_force, frag_target, M_ARGV, NULL, and vector.
Definition at line 726 of file sv_keyhunt.qc.
References entity(), kh_Key_AssignTo(), kh_Key_Remove(), and NULL.
Referenced by kh_Key_Spawn().
Definition at line 214 of file sv_keyhunt.qc.
References entity(), makevectors, v_forward, v_right, v_up, and vector.
Referenced by kh_WinnerTeam().
| void kh_Controller_SetThink | ( | float | t, |
| kh_Think_t | func ) |
Definition at line 155 of file sv_keyhunt.qc.
References ceil(), kh_controller, kh_Controller_Thinkfunc, and time.
Referenced by kh_FinishRound(), kh_Initialize(), kh_StartRound(), and kh_WaitForPlayers().
Definition at line 163 of file sv_keyhunt.qc.
References cnt, entity(), game_stopped, getthink, kh_Controller_Thinkfunc, kh_WaitForPlayers(), nextthink, and time.
Referenced by kh_Initialize().
| void kh_EnableTrackingDevice | ( | ) |
Definition at line 900 of file sv_keyhunt.qc.
References kh_tracking_enabled, Kill_Notification(), and NULL.
Referenced by kh_StartRound().
| void kh_finalize | ( | ) |
Definition at line 1004 of file sv_keyhunt.qc.
References kh_controller, kh_FinishRound(), and NULL.
| void kh_FinishRound | ( | ) |
Definition at line 506 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_delay_round, entity(), FOR_EACH_KH_KEY, kh_Controller_SetThink(), kh_interferemsg_time, kh_Key_Remove(), kh_no_radar_circles, kh_StartRound(), NULL, and Send_Notification().
Referenced by kh_finalize(), kh_LoserTeam(), and kh_WinnerTeam().
| int kh_GetMissingTeams | ( | ) |
Definition at line 857 of file sv_keyhunt.qc.
References BIT, FOREACH_CLIENT, IS_DEAD, IS_PLAYER, kh_Team_ByID(), kh_teams, NumTeams(), PHYS_INPUT_BUTTON_CHAT, and players.
Referenced by kh_StartRound(), and kh_WaitForPlayers().
Definition at line 949 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_score_carrierfrag, autocvar_g_balance_keyhunt_score_collect, entity(), GameRules_scoring_add, kh_Scores_Event(), and NULL.
| void kh_Initialize | ( | ) |
Definition at line 974 of file sv_keyhunt.qc.
References autocvar_g_keyhunt_teams_override, BITS, bound(), cvar(), entity(), kh_controller, kh_Controller_SetThink(), kh_Controller_Think(), kh_key_carried, kh_key_dropped, kh_ScoreRules(), kh_teams, kh_WaitForPlayers(), new_pure, setmodel, setthink, and spawn.
Referenced by REGISTER_MUTATOR().
| int kh_Key_AllOwnedByWhichTeam | ( | ) |
Definition at line 786 of file sv_keyhunt.qc.
References entity(), FOR_EACH_KH_KEY, kh_teams, and NumTeams().
Referenced by havocbot_role_kh_carrier(), havocbot_role_kh_defense(), havocbot_role_kh_freelancer(), havocbot_role_kh_offense(), kh_Key_AssignTo(), and kh_Key_Think().
Definition at line 314 of file sv_keyhunt.qc.
References colormapPaletteColor, entity(), FOR_EACH_KH_KEY, FOREACH, kh_interferemsg_team, kh_interferemsg_time, kh_Key_AllOwnedByWhichTeam(), kh_Key_Attach(), kh_Key_Detach(), kh_KeyCarrier_waypointsprite_visible_for_player(), kh_no_radar_circles, kh_update_state(), NULL, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, NUM_TEAM_4, SPRITERULE_TEAMPLAY, time, WaypointSprite_AttachCarrier(), WaypointSprite_DetachCarrier(), WaypointSprite_Ping(), WaypointSprite_UpdateRule(), and WaypointSprite_UpdateSprites().
Referenced by key_reset(), kh_Key_Collect(), kh_Key_DropAll(), kh_Key_DropOne(), kh_Key_Remove(), and kh_Key_Spawn().
Definition at line 225 of file sv_keyhunt.qc.
References DAMAGE_NO, entity(), g_items, IL_CONTAINS(), IL_REMOVE(), kh_key_carried, KH_KEY_ZSHIFT, MOVETYPE_NONE, navigation_dynamicgoal_unset(), set_movetype(), SOLID_NOT, and time.
Referenced by kh_Key_AssignTo().
Definition at line 433 of file sv_keyhunt.qc.
References APP_TEAM_NUM, ATTEN_NORM, autocvar_g_balance_keyhunt_score_collect, CH_TRIGGER, entity(), GameRules_scoring_add, kh_Key_AssignTo(), kh_Scores_Event(), kh_Team_ByID(), NULL, Send_Notification(), sound, and VOL_BASE.
Referenced by kh_Key_Touch().
| void kh_Key_Damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | force ) |
Definition at line 417 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_delay_damage_return, bound(), entity(), IS_PLAYER, ITEM_DAMAGE_NEEDKILL, owner, pain_finished, pushltime, team, time, and vector.
Referenced by kh_Key_Spawn().
Definition at line 270 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_damageforcescale, autocvar_g_balance_keyhunt_delay_return, DAMAGE_YES, entity(), FL_ITEM, g_items, IL_CONTAINS(), IL_PUSH(), kh_key_dropped, MOVETYPE_TOSS, navigation_dynamicgoal_set(), NULL, set_movetype(), SOLID_TRIGGER, STAT, and time.
Referenced by kh_Key_AssignTo().
Definition at line 829 of file sv_keyhunt.qc.
References APP_TEAM_NUM, ATTEN_NORM, autocvar_g_balance_keyhunt_dropvelocity, autocvar_g_balance_keyhunt_protecttime, CH_TRIGGER, entity(), GameRules_scoring_add, kh_Key_AssignTo(), kh_Scores_Event(), kh_Team_ByID(), makevectors, NULL, random(), Send_Notification(), sound, time, v_forward, VOL_BASE, and W_CalculateProjectileVelocity().
Definition at line 806 of file sv_keyhunt.qc.
References APP_TEAM_NUM, ATTEN_NORM, autocvar_g_balance_keyhunt_protecttime, autocvar_g_balance_keyhunt_throwvelocity, CH_TRIGGER, entity(), GameRules_scoring_add, kh_Key_AssignTo(), kh_Scores_Event(), kh_Team_ByID(), makevectors, NULL, Send_Notification(), sound, time, v_forward, VOL_BASE, and W_CalculateProjectileVelocity().
Definition at line 475 of file sv_keyhunt.qc.
References entity(), kh_Key_AssignTo(), kh_update_state(), kh_worldkeylist, NULL, WaypointSprite_DetachCarrier(), and WaypointSprite_Kill().
Referenced by key_reset(), and kh_FinishRound().
Definition at line 732 of file sv_keyhunt.qc.
References APP_TEAM_NUM, autocvar_g_balance_keyhunt_return_when_unreachable, DAMAGE_YES, DPCONTENTS_BODY, DPCONTENTS_BOTCLIP, DPCONTENTS_PLAYERCLIP, DPCONTENTS_SOLID, entity(), key_reset(), kh_Key_AssignTo(), KH_KEY_BRIGHTNESS, kh_Key_Damage(), kh_key_dropped, KH_KEY_MAX, KH_KEY_MIN, kh_Key_Think(), kh_Key_Touch(), kh_Key_waypointsprite_visible_for_player(), KH_KEY_WP_ZSHIFT, kh_worldkeylist, navigation_dynamicgoal_init(), NULL, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, NUM_TEAM_4, random(), Send_Notification(), setthink, settouch, Team_ColorRGB(), time, waypointsprite_attachedforcarrier, and WaypointSprite_Spawn().
Referenced by kh_StartRound().
Definition at line 671 of file sv_keyhunt.qc.
References APP_TEAM_NUM, ATTEN_NORM, autocvar_g_balance_keyhunt_maxdist, CH_TRIGGER, cnt, entity(), FOR_EACH_KH_KEY, FOREACH_CLIENT, game_stopped, IS_PLAYER, kh_interferemsg_team, kh_interferemsg_time, kh_Key_AllOwnedByWhichTeam(), KH_KEY_XYDIST, KH_KEY_XYSPEED, kh_LoserTeam(), kh_WinnerTeam(), LABEL, makevectors, nextthink, origin, owner, pain_finished, Send_Notification(), siren_time, sound, team, time, v_forward, vdist, vector, and VOL_BASE.
Referenced by kh_Key_Spawn().
Definition at line 449 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_delay_collect, autocvar_g_balance_keyhunt_delay_damage_return, bound(), enemy, entity(), game_stopped, IS_DEAD, IS_INDEPENDENT_PLAYER, IS_PLAYER, ITEM_TOUCH_NEEDKILL, kh_droptime, kh_Key_Collect(), owner, pain_finished, time, and toucher.
Referenced by kh_Key_Spawn().
Definition at line 116 of file sv_keyhunt.qc.
References entity(), IS_SPEC, kh_tracking_enabled, owner, and warmup_stage.
Referenced by kh_Key_Spawn().
Definition at line 104 of file sv_keyhunt.qc.
References entity(), IS_INVISIBLE, IS_SPEC, kh_tracking_enabled, owner, SAME_TEAM, and warmup_stage.
Referenced by kh_Key_AssignTo().
Definition at line 585 of file sv_keyhunt.qc.
References APP_TEAM_NUM, autocvar_g_balance_keyhunt_score_destroyed, autocvar_g_balance_keyhunt_score_destroyed_ownfactor, autocvar_g_balance_keyhunt_score_push, DistributeEvenly_Get(), DistributeEvenly_Init(), entity(), FOR_EACH_KH_KEY, FOREACH_CLIENT, GameRules_scoring_add, IS_PLAYER, kh_FinishRound(), kh_Scores_Event(), kh_Team_ByID(), kh_teams, NULL, NumTeams(), play2all(), players, Send_Notification(), and SND.
Referenced by kh_Key_Think().
Definition at line 91 of file sv_keyhunt.qc.
References GameRules_scoring, SFL_LOWER_IS_BETTER, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_SECONDARY, ST_KH_CAPS, and teams.
Referenced by kh_Initialize().
| void kh_Scores_Event | ( | entity | player, |
| entity | key, | ||
| string | what, | ||
| float | frags_player, | ||
| float | frags_owner ) |
Definition at line 184 of file sv_keyhunt.qc.
References autocvar_sv_eventlog, entity(), float2int_decimal_fld, ftos(), game_stopped, GameLogEcho(), GameRules_scoring_add_team_float2int, and strcat().
Referenced by kh_HandleFrags(), kh_Key_Collect(), kh_Key_DropAll(), kh_Key_DropOne(), kh_LoserTeam(), and kh_WinnerTeam().
| void kh_StartRound | ( | ) |
Definition at line 908 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_delay_tracking, entity(), FOREACH_CLIENT, game_starttime, IS_DEAD, IS_PLAYER, kh_Controller_SetThink(), kh_EnableTrackingDevice(), kh_GetMissingTeams(), kh_Key_Spawn(), kh_Team_ByID(), kh_teams, kh_tracking_enabled, kh_WaitForPlayers(), Kill_Notification(), NULL, NumTeams(), PHYS_INPUT_BUTTON_CHAT, players, random(), Send_Notification(), and time.
Referenced by kh_FinishRound(), and kh_WaitForPlayers().
Definition at line 67 of file sv_keyhunt.qc.
References NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by kh_GetMissingTeams(), kh_Key_Collect(), kh_Key_DropAll(), kh_Key_DropOne(), kh_LoserTeam(), and kh_StartRound().
| void kh_update_state | ( | ) |
Definition at line 127 of file sv_keyhunt.qc.
References entity(), FOR_EACH_KH_KEY, FOREACH_CLIENT, and STAT.
Referenced by kh_Key_AssignTo(), and kh_Key_Remove().
| void kh_WaitForPlayers | ( | ) |
Definition at line 874 of file sv_keyhunt.qc.
References autocvar_g_balance_keyhunt_delay_round, game_starttime, kh_Controller_SetThink(), kh_GetMissingTeams(), kh_StartRound(), kh_WaitForPlayers(), missing_teams_mask, NULL, player_count, Send_Notification(), and time.
Referenced by kh_Controller_Think(), kh_Initialize(), kh_StartRound(), and kh_WaitForPlayers().
Definition at line 1020 of file sv_keyhunt.qc.
References checkpvs(), entity(), origin, view_ofs, and WaypointSprite_getviewentity().
Referenced by havocbot_goalrating_kh().
Definition at line 523 of file sv_keyhunt.qc.
References APP_TEAM_NUM, autocvar_g_balance_keyhunt_score_capture, autocvar_g_nades_bonus_score_high, DistributeEvenly_Get(), DistributeEvenly_Init(), entity(), FOR_EACH_KH_KEY, GameRules_scoring_add_team, kh_AttachedOrigin(), kh_FinishRound(), kh_Scores_Event(), kh_teams, nades_GiveBonus(), NULL, NumTeams(), play2all(), Send_Effect(), Send_Notification(), SND, strcat(), Team_ColorRGB(), and vector.
Referenced by kh_Key_Think().
Definition at line 434 of file sv_nades.qc.
Referenced by kh_WinnerTeam().
| void | ( | entity | this | ) |
| vector autocvar_g_balance_keyhunt_carrier_damage |
Definition at line 21 of file sv_keyhunt.qc.
Referenced by if().
| vector autocvar_g_balance_keyhunt_carrier_force |
Definition at line 22 of file sv_keyhunt.qc.
Referenced by if().
| float autocvar_g_balance_keyhunt_damageforcescale |
Definition at line 10 of file sv_keyhunt.qc.
Referenced by kh_Key_Detach().
| float autocvar_g_balance_keyhunt_delay_collect |
Definition at line 11 of file sv_keyhunt.qc.
Referenced by kh_Key_Touch().
| float autocvar_g_balance_keyhunt_delay_damage_return |
Definition at line 12 of file sv_keyhunt.qc.
Referenced by kh_Key_Damage(), and kh_Key_Touch().
| float autocvar_g_balance_keyhunt_delay_return |
Definition at line 13 of file sv_keyhunt.qc.
Referenced by kh_Key_Detach().
| float autocvar_g_balance_keyhunt_delay_round |
Definition at line 14 of file sv_keyhunt.qc.
Referenced by kh_FinishRound(), and kh_WaitForPlayers().
| float autocvar_g_balance_keyhunt_delay_tracking |
Definition at line 15 of file sv_keyhunt.qc.
Referenced by kh_StartRound().
| float autocvar_g_balance_keyhunt_dropvelocity |
Definition at line 17 of file sv_keyhunt.qc.
Referenced by kh_Key_DropAll().
| float autocvar_g_balance_keyhunt_maxdist |
Definition at line 18 of file sv_keyhunt.qc.
Referenced by kh_Key_Think().
| vector autocvar_g_balance_keyhunt_noncarrier_damage |
Definition at line 23 of file sv_keyhunt.qc.
| vector autocvar_g_balance_keyhunt_noncarrier_force |
Definition at line 24 of file sv_keyhunt.qc.
| float autocvar_g_balance_keyhunt_protecttime |
Definition at line 19 of file sv_keyhunt.qc.
Referenced by kh_Key_DropAll(), and kh_Key_DropOne().
| float autocvar_g_balance_keyhunt_return_when_unreachable |
Definition at line 16 of file sv_keyhunt.qc.
Referenced by kh_Key_Spawn().
| int autocvar_g_balance_keyhunt_score_capture |
Definition at line 26 of file sv_keyhunt.qc.
Referenced by kh_WinnerTeam().
| int autocvar_g_balance_keyhunt_score_carrierfrag |
Definition at line 27 of file sv_keyhunt.qc.
Referenced by kh_HandleFrags().
| int autocvar_g_balance_keyhunt_score_collect |
Definition at line 28 of file sv_keyhunt.qc.
Referenced by kh_HandleFrags(), and kh_Key_Collect().
| int autocvar_g_balance_keyhunt_score_destroyed |
Definition at line 29 of file sv_keyhunt.qc.
Referenced by kh_LoserTeam().
| int autocvar_g_balance_keyhunt_score_destroyed_ownfactor |
Definition at line 30 of file sv_keyhunt.qc.
Referenced by kh_LoserTeam().
| int autocvar_g_balance_keyhunt_score_push |
Definition at line 31 of file sv_keyhunt.qc.
Referenced by kh_LoserTeam().
| float autocvar_g_balance_keyhunt_throwvelocity |
Definition at line 32 of file sv_keyhunt.qc.
Referenced by kh_Key_DropOne().
| int autocvar_g_keyhunt_teams_override |
Definition at line 35 of file sv_keyhunt.qc.
Referenced by kh_Initialize().
| float float2int_decimal_fld |
Definition at line 183 of file sv_keyhunt.qc.
Definition at line 1224 of file sv_keyhunt.qc.
| entity kh_controller |
Definition at line 76 of file sv_keyhunt.qc.
Referenced by kh_Controller_SetThink(), kh_finalize(), and kh_Initialize().
| var kh_Think_t kh_Controller_Thinkfunc |
Definition at line 154 of file sv_keyhunt.qc.
Referenced by kh_Controller_SetThink(), and kh_Controller_Think().
| int kh_dropperteam |
Definition at line 82 of file sv_keyhunt.qc.
| float kh_droptime |
Definition at line 81 of file sv_keyhunt.qc.
Referenced by kh_Key_Touch().
| int kh_interferemsg_team |
Definition at line 78 of file sv_keyhunt.qc.
Referenced by kh_Key_AssignTo(), and kh_Key_Think().
| float kh_interferemsg_time |
Definition at line 79 of file sv_keyhunt.qc.
Referenced by kh_FinishRound(), kh_Key_AssignTo(), and kh_Key_Think().
| const float KH_KEY_BRIGHTNESS = 2 |
Definition at line 56 of file sv_keyhunt.qc.
Referenced by kh_Key_Spawn().
| int kh_key_carried |
Definition at line 86 of file sv_keyhunt.qc.
Referenced by kh_Initialize(), and kh_Key_Attach().
| int kh_key_dropped |
Definition at line 86 of file sv_keyhunt.qc.
Referenced by kh_Initialize(), kh_Key_Detach(), and kh_Key_Spawn().
| const vector KH_KEY_MAX = '25 25 4' |
Definition at line 55 of file sv_keyhunt.qc.
Referenced by kh_Key_Spawn().
| const vector KH_KEY_MIN = '-25 -25 -46' |
Definition at line 54 of file sv_keyhunt.qc.
Referenced by kh_Key_Spawn().
| const float KH_KEY_WP_ZSHIFT = 20 |
Definition at line 52 of file sv_keyhunt.qc.
Referenced by kh_Key_Spawn().
| const float KH_KEY_XYDIST = 24 |
Definition at line 49 of file sv_keyhunt.qc.
Referenced by kh_Key_Think().
| const float KH_KEY_XYSPEED = 45 |
Definition at line 50 of file sv_keyhunt.qc.
Referenced by kh_Key_Think().
| const float KH_KEY_ZSHIFT = 22 |
Definition at line 48 of file sv_keyhunt.qc.
Referenced by kh_Key_Attach().
| entity kh_next |
Definition at line 80 of file sv_keyhunt.qc.
Referenced by havocbot_role_kh_carrier(), havocbot_role_kh_defense(), havocbot_role_kh_freelancer(), and havocbot_role_kh_offense().
| bool kh_no_radar_circles |
Definition at line 58 of file sv_keyhunt.qc.
Referenced by kh_FinishRound(), and kh_Key_AssignTo().
| entity kh_prev |
Definition at line 80 of file sv_keyhunt.qc.
| int kh_previous_owner_playerid |
Definition at line 84 of file sv_keyhunt.qc.
| int kh_teams |
Definition at line 77 of file sv_keyhunt.qc.
Referenced by kh_GetMissingTeams(), kh_Initialize(), kh_Key_AllOwnedByWhichTeam(), kh_LoserTeam(), kh_StartRound(), and kh_WinnerTeam().
| entity previous_owner |
Definition at line 83 of file sv_keyhunt.qc.
| float siren_time |
Definition at line 65 of file sv_keyhunt.qc.
Referenced by kh_Key_Think().
| const int ST_KH_CAPS = 1 |
Definition at line 90 of file sv_keyhunt.qc.
Referenced by kh_ScoreRules().