Xonotic
|
#include "utils.qh"
#include <server/intermission.qh>
#include <common/replicate.qh>
#include <common/sounds/all.qh>
Go to the source code of this file.
Classes | |
class | Client |
class | Observer |
class | Player |
class | Spectator |
Macros | |
#define | GAMETYPE_DEFAULTED_SETTING(str) |
#define | INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players) |
#define | IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER) |
#define | MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME)) |
#define | SPECTATE_COPY() ACCUMULATE void SpectateCopy(entity this, entity spectatee) |
#define | SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); } |
#define | UNWIND(class) MACRO_BEGIN if (this.instanceOf##class) { METHOD_REFERENCE(class, dtorimpl)(this); } MACRO_END |
#define GAMETYPE_DEFAULTED_SETTING | ( | str | ) |
Definition at line 352 of file client.qh.
Referenced by calculate_player_respawn_time().
#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players) |
Definition at line 313 of file client.qh.
Referenced by PutPlayerInServer(), and ScoreRules_basics().
#define IS_INDEPENDENT_PLAYER | ( | e | ) | ((e).solid == SOLID_TRIGGER) |
Definition at line 314 of file client.qh.
Referenced by accuracy_add(), buff_Inferno_CalculateTime(), buff_Touch(), calculate_player_respawn_time(), Damage(), Fire_ApplyDamage(), havocbot_ai(), havocbot_chooseenemy(), MUTATOR_HOOKFUNCTION(), PlayerPreThink(), PlayerUseKey(), Portal_Customize(), Portal_Damage(), Portal_Think(), Portal_Touch(), and target_init_use().
#define MAKE_INDEPENDENT_PLAYER | ( | e | ) | (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME)) |
Definition at line 315 of file client.qh.
Referenced by PutPlayerInServer(), race_AbandonRaceCheck(), and race_SendTime().
#define SPECTATE_COPY | ( | ) | ACCUMULATE void SpectateCopy(entity this, entity spectatee) |
#define SPECTATE_COPYFIELD | ( | fld | ) | SPECTATE_COPY() { this.(fld) = spectatee.(fld); } |
#define UNWIND | ( | class | ) | MACRO_BEGIN if (this.instanceOf##class) { METHOD_REFERENCE(class, dtorimpl)(this); } MACRO_END |
Referenced by Player::Player ::~ Player().
Definition at line 1315 of file client.qc.
References autocvar_g_forced_respawn, ceil(), FOREACH_CLIENT, GAMETYPE_DEFAULTED_SETTING, IS_INDEPENDENT_PLAYER, IS_PLAYER, MUTATOR_CALLHOOK, respawn_countdown, respawn_flags, RESPAWN_FORCE, respawn_time, respawn_time_max, teamplay, and time.
Referenced by PlayerDamage().
Definition at line 171 of file client.qc.
References CS(), entity(), FOREACH_CLIENT, IS_REAL_CLIENT, and IS_SPEC.
Referenced by race_AbandonRaceCheck(), race_SendTime(), SetSpectatee(), SetSpectatee_status(), SetZoomState(), and SpectateSet().
Definition at line 855 of file client.qc.
References autocvar_g_trueaim_minrange, autocvar_sv_foginterval, cnt, compressShotOrigin(), count, g_nexball_meter_period, hook_shotorigin, MSG_ONE, serverflags, world, WriteByte(), WriteCoord(), and WriteString().
Referenced by ClientInit_SendEntity(), and STATIC_INIT().
void ClientInit_Spawn | ( | ) |
Definition at line 894 of file client.qc.
References ClientInit_CheckUpdate(), ClientInit_SendEntity(), entity(), new_pure, and setthink.
Referenced by spawnfunc(), and STATIC_INIT().
Definition at line 46 of file state.qc.
References _cs, accuracy_free(), accuracy_init(), anticheat_init(), anticheat_report_to_eventlog(), bot_clientdisconnect(), ClientData_Attach(), ClientData_Detach(), DecodeLevelParms(), entcs_attach(), entcs_detach(), entity(), InventoryStorage_attach(), NEW, PlayerScore_Attach(), PlayerScore_Detach(), W_HitPlotClose(), and W_HitPlotOpen().
Referenced by Client::Client ::Client().
Definition at line 947 of file client.qc.
References autocvar_g_antilag, FixClientCvars(), MUTATOR_CALLHOOK, and stuffcmd.
Referenced by ClientConnect(), FixClientCvars(), and MapVote_Finished().
Definition at line 423 of file client.qc.
References argv(), autocvar_sv_defaultcharacter, autocvar_sv_defaultcharacterskin, autocvar_sv_defaultplayercolors, autocvar_sv_defaultplayermodel, autocvar_sv_defaultplayermodel_blue, autocvar_sv_defaultplayermodel_pink, autocvar_sv_defaultplayermodel_red, autocvar_sv_defaultplayermodel_yellow, autocvar_sv_defaultplayerskin, autocvar_sv_defaultplayerskin_blue, autocvar_sv_defaultplayerskin_pink, autocvar_sv_defaultplayerskin_red, autocvar_sv_defaultplayerskin_yellow, CheckPlayerModel(), CS(), FixPlayermodel(), floor(), M_ARGV, model_randomizer, MUTATOR_CALLHOOK, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, NUM_TEAM_4, oldskin, player_getspecies(), setcolor, setplayermodel(), stof(), strcat(), strlen(), strstrofs, substring(), teamplay, tokenize_console, UpdatePlayerSounds(), and vector().
Referenced by FixPlayermodel(), PlayerThink(), PutObserverInServer(), PutPlayerInServer(), and STATIC_INIT().
int GetPlayerLimit | ( | ) |
Definition at line 1990 of file client.qc.
References autocvar_g_maxplayers, g_duel, GetPlayerLimit(), M_ARGV, and MUTATOR_CALLHOOK.
Referenced by bot_fixcount(), GetPlayerLimit(), MapHasRightSize(), nJoinAllowed(), and STATIC_INIT().
Definition at line 1966 of file client.qc.
References autocvar_g_balance_teams, autocvar_g_campaign, campaign_bots_may_start, IS_PLAYER, netname, NULL, PutClientInServer(), team, team_selected, TeamBalance_JoinBestTeam(), teamplay, and TRANSMUTE().
Referenced by ClientCommand_join(), ObserverOrSpectatorThink(), and PlayerPreThink().
Definition at line 2108 of file client.qc.
References CS(), jointime, lockteams, MIN_SPEC_TIME, MUTATOR_CALLHOOK, nJoinAllowed(), ShowTeamSelection(), teamplay, and time.
Referenced by ClientCommand_join(), ObserverOrSpectatorThink(), and PlayerPreThink().
Determines whether the player is allowed to join.
This depends on cvar g_maxplayers, if it isn't used this function always return true, otherwise it checks whether the number of currently playing players exceeds g_maxplayers.
Definition at line 2006 of file client.qc.
References autocvar_g_forced_team_otherwise, FOREACH_CLIENT, GetPlayerLimit(), INGAME, IS_PLAYER, IS_REAL_CLIENT, maxclients, min(), Player_GetForcedTeamIndex(), TEAM_FORCE_SPECTATOR, and time.
Referenced by joinAllowed(), and WinningConditionHelper().
Definition at line 1447 of file client.qc.
References ATTEN_NORM, CH_INFO, floor(), frametime, IS_REAL_CLIENT, sound, TC, time, and VOL_BASE.
Referenced by player_powerups(), and STATIC_INIT().
Definition at line 1457 of file client.qc.
References ATTEN_NORM, CH_INFO, CH_TRIGGER_SINGLE, IS_CLIENT, items, sound, time, and VOL_BASE.
Referenced by ClientDisconnect(), player_powerups(), PutObserverInServer(), reset_map(), and STATIC_INIT().
Definition at line 995 of file client.qc.
References autocvar_sv_eventlog, boolean, entity(), etof(), GameLogEcho(), IS_REAL_CLIENT, netaddress, playerid, PlayerInIDList(), and PlayerInIPList().
Referenced by Player_DetermineForcedTeam().
Definition at line 2349 of file client.qc.
References DAMAGE_NO, entity(), IS_DEAD, IS_INDEPENDENT_PLAYER, IS_PLAYER, IS_VEHICLE, MUTATOR_CALLHOOK, NULL, origin, PlayerUseKey(), SAME_TEAM, vehicle, vehicles_enter(), vehicles_exit(), VHF_MULTISLOT, vlen2, and WarpZone_FindRadius().
Referenced by IMPULSE(), PlayerPreThink(), and PlayerUseKey().
putting a client as observer in the server
Definition at line 238 of file client.qc.
References accuracy_resend(), alivetime, alpha, angles, autocvar_g_balance_armor_start, autocvar_g_playerclip_collisions, AuxiliaryXhair, avelocity, bot_attack, bot_relinkplayerlist(), CHAT_NOSPECTATORS, CS(), DAMAGE_NO, damagedbycontents, damageforcescale, DEAD_NO, deadflag, death_time, DPCONTENTS_PLAYERCLIP, DPCONTENTS_SOLID, dphitcontentsmask, drag_undraggable(), drawonlytoclient, effects, entity(), etof(), fade_time, fixangle, FixPlayermodel(), FL_CLIENT, FL_NOTARGET, flags, frags, FRAGS_SPECTATOR, func_null(), g_bot_targets, g_damagedbycontents, g_monster_targets, GetResource(), IL_REMOVE(), IS_PLAYER, IS_REAL_CLIENT, iscreature, istypefrag, items, just_joined, killcount, LOG_FATAL, MAX_AXH, MAX_WEAPONSLOTS, model, monster_attack, MOVETYPE_FLY_WORLDONLY, msg_entity, MSG_ONE, MUTATOR_CALLHOOK, nextthink, NULL, oldvelocity, origin, pain_finished, pauseregen_finished, pauserotarmor_finished, pauserothealth_finished, player_powerups_remove_all(), PlayerState_detach(), Portal_ClearAll(), punchangle, punchvector, pushltime, ready, ReadyCount(), RemoveGrapplingHooks(), RES_HEALTH, respawn_flags, respawn_time, revival_time, scale, SelectSpawnPoint(), set_movetype(), setmodel, setorigin(), SetPlayerTeam(), SetResourceExplicit(), SetSpectatee(), SetSpectatee_status(), setthink, solid, SOLID_NOT, SVC_SETVIEW, takedamage, TEAM_CHANGE_SPECTATOR, TELEPORT_SIMPLE, teleportable, time, TRANSMUTE(), Unfreeze(), UNSET_DUCKED, vec2, vehicle, vehicles_exit(), velocity, view_ofs, viewloc, vote_called, VoteCount(), warmup_stage, weaponentities, weaponmodel, WriteByte(), and WriteEntity().
Referenced by ClientKill_Now_TeamChange(), GameCommand_allspec(), GameCommand_moveplayer(), minigame_addplayer(), ObserverOrSpectatorThink(), PlayerPostThink(), PutClientInServer(), SpectateSet(), and STATIC_INIT().
Definition at line 1836 of file client.qc.
References ClientData_Touch(), enemy, entity(), etof(), IS_BOT_CLIENT, MAX_WEAPONSLOTS, SetSpectatee_status(), and weaponentities.
Referenced by ClientDisconnect(), PutClientInServer(), PutObserverInServer(), Spectate(), SpectateNext(), SpectatePrev(), SpectateUpdate(), and STATIC_INIT().
Definition at line 1819 of file client.qc.
References ClientData_Touch(), CS(), g_cts, g_race, race_InitSpectator(), and spectatee_status.
Referenced by PutObserverInServer(), PutPlayerInServer(), SetSpectatee(), and STATIC_INIT().
Definition at line 1873 of file client.qc.
References entity(), M_ARGV, MUTATOR_CALLHOOK, SetSpectatee(), and SpectateSet().
Referenced by ClientCommand_spectate(), STATIC_INIT(), and superspec_Spectate().
STATIC_INIT | ( | g_initforplayer | ) |
Definition at line 374 of file client.qh.
References ClientInit_misc(), ClientInit_Spawn(), FixPlayermodel(), GetPlayerLimit(), IL_NEW, play_countdown(), player_powerups_remove_all(), PutObserverInServer(), RotRegen(), SetSpectatee(), SetSpectatee_status(), and Spectate().
float alivetime |
Definition at line 66 of file client.qh.
Referenced by PlayerDamage(), PutObserverInServer(), and PutPlayerInServer().
bool autocvar__notarget |
Definition at line 9 of file client.qh.
Referenced by PutPlayerInServer().
int autocvar_g_balance_armor_start |
Definition at line 10 of file client.qh.
Referenced by PutObserverInServer().
float autocvar_g_balance_pause_armor_rot_spawn |
Definition at line 11 of file client.qh.
Referenced by PutPlayerInServer().
float autocvar_g_balance_pause_fuel_rot_spawn |
Definition at line 12 of file client.qh.
Referenced by PutPlayerInServer().
float autocvar_g_balance_pause_health_regen_spawn |
Definition at line 13 of file client.qh.
Referenced by PutPlayerInServer().
float autocvar_g_balance_pause_health_rot_spawn |
Definition at line 14 of file client.qh.
Referenced by PutPlayerInServer().
bool autocvar_g_botclip_collisions |
Definition at line 15 of file client.qh.
Referenced by PutPlayerInServer().
bool autocvar_g_forced_respawn |
Definition at line 42 of file client.qh.
Referenced by calculate_player_respawn_time().
bool autocvar_g_fullbrightplayers |
Definition at line 16 of file client.qh.
Referenced by Monster_Spawn(), player_powerups(), vehicle_initialize(), and vehicles_reset_colors().
int autocvar_g_maxplayers |
Definition at line 43 of file client.qh.
Referenced by GetPlayerLimit().
float autocvar_g_maxplayers_spectator_blocktime |
Definition at line 44 of file client.qh.
Referenced by ClientConnect(), ClientKill_Now_TeamChange(), GameCommand_nospectators(), and PlayerPreThink().
string autocvar_g_mutatormsg |
Definition at line 34 of file client.qh.
Referenced by getwelcomemessage().
bool autocvar_g_nodepthtestplayers |
Definition at line 33 of file client.qh.
Referenced by Monster_Spawn(), player_powerups(), vehicle_initialize(), and vehicles_reset_colors().
float autocvar_g_player_alpha |
Definition at line 18 of file client.qh.
Referenced by SetDefaultAlpha().
float autocvar_g_player_brightness |
Definition at line 19 of file client.qh.
Referenced by PutPlayerInServer().
float autocvar_g_player_damageforcescale = 2 |
Definition at line 20 of file client.qh.
Referenced by PutPlayerInServer().
bool autocvar_g_playerclip_collisions |
Definition at line 17 of file client.qh.
Referenced by Monster_Spawn(), PutObserverInServer(), PutPlayerInServer(), and vehicle_initialize().
float autocvar_g_respawn_ghosts_alpha = 1 |
float autocvar_g_respawn_ghosts_fadetime = 1.5 |
float autocvar_g_respawn_ghosts_speed |
float autocvar_g_respawn_ghosts_time = 4.5 |
string autocvar_g_xonoticversion |
Definition at line 45 of file client.qh.
Referenced by GetClientVersionMessage(), PlayerPreThink(), and WinningConditionHelper().
float autocvar_gameversion |
Definition at line 46 of file client.qh.
Referenced by GetClientVersionMessage().
float autocvar_gameversion_max |
Definition at line 48 of file client.qh.
Referenced by ClientCommand_clientversion().
float autocvar_gameversion_min |
Definition at line 47 of file client.qh.
Referenced by ClientCommand_clientversion().
string autocvar_hostname |
Definition at line 49 of file client.qh.
Referenced by getwelcomemessage(), OnlineBanList_SendBan(), OnlineBanList_SendUnban(), OnlineBanList_Think(), and WeaponStats_ready().
int autocvar_spawn_debug |
Definition at line 50 of file client.qh.
Referenced by _StartItem(), PutPlayerInServer(), and SelectSpawnPoint().
float autocvar_sv_foginterval |
Definition at line 35 of file client.qh.
Referenced by ClientConnect(), and ClientInit_misc().
float autocvar_sv_maxidle |
Definition at line 36 of file client.qh.
Referenced by DecodeLevelParms(), PlayerPostThink(), and sys_phys_monitor().
bool autocvar_sv_maxidle_alsokickspectators |
Definition at line 39 of file client.qh.
Referenced by PlayerPostThink().
int autocvar_sv_maxidle_minplayers = 2 |
Definition at line 37 of file client.qh.
Referenced by PlayerPostThink().
float autocvar_sv_maxidle_playertospectator = 60 |
Definition at line 38 of file client.qh.
Referenced by PlayerPostThink(), SetPlayerTeam(), and sys_phys_monitor().
int autocvar_sv_maxidle_slots |
Definition at line 40 of file client.qh.
Referenced by PlayerPostThink().
bool autocvar_sv_maxidle_slots_countbots |
Definition at line 41 of file client.qh.
Referenced by PlayerPostThink().
string autocvar_sv_motd |
Definition at line 51 of file client.qh.
Referenced by getwelcomemessage().
int autocvar_sv_name_maxlength = 64 |
Definition at line 52 of file client.qh.
Referenced by PlayerPreThink().
float autocvar_sv_player_scale |
Definition at line 56 of file client.qh.
Referenced by PutPlayerInServer().
bool autocvar_sv_servermodelsonly |
Definition at line 53 of file client.qh.
Referenced by CheckPlayerModel().
bool autocvar_sv_showspectators |
Definition at line 57 of file client.qh.
Referenced by ClientData_Send().
int autocvar_sv_spectate |
Definition at line 54 of file client.qh.
Referenced by ClientCommand_clientversion(), ClientCommand_spectate(), MUTATOR_HOOKFUNCTION(), and PlayerPreThink().
bool autocvar_sv_teamnagger |
Definition at line 55 of file client.qh.
Referenced by ClientConnect().
float blockSpectators |
Definition at line 334 of file client.qh.
Referenced by ClientConnect(), ClientKill_Now_TeamChange(), GameCommand_nospectators(), and PlayerPreThink().
entity clientdata |
Definition at line 62 of file client.qh.
Referenced by ClientData_Attach().
IntrusiveList g_initforplayer |
Definition at line 373 of file client.qh.
Referenced by ClientConnect().
IntrusiveList g_players |
Definition at line 85 of file client.qh.
Referenced by StartFrame().
bool independent_players |
Definition at line 312 of file client.qh.
Referenced by invasion_DelayedInit(), MUTATOR_HOOKFUNCTION(), rc_SetLimits(), and REGISTER_MUTATOR().
float jointime |
Definition at line 64 of file client.qh.
Referenced by ClientCommand_join(), CommonCommand_who(), DumpStats(), havocbot_ctf_reset_role(), joinAllowed(), MUTATOR_HOOKFUNCTION(), ObserverOrSpectatorThink(), and PlayerPreThink().
bool just_joined |
Definition at line 74 of file client.qh.
Referenced by PutObserverInServer(), and SetPlayerTeam().
int killcount |
Definition at line 317 of file client.qh.
Referenced by Damage(), Heal(), lms_RemovePlayer(), MUTATOR_HOOKFUNCTION(), Obituary(), PutObserverInServer(), and PutPlayerInServer().
const int MIN_SPEC_TIME = 1 |
Definition at line 399 of file client.qh.
Referenced by ClientCommand_join(), joinAllowed(), ObserverOrSpectatorThink(), and PlayerPreThink().
float motd_actived_time |
Definition at line 67 of file client.qh.
Referenced by PrintWelcomeMessage().
float nickspamcount |
Definition at line 321 of file client.qh.
Referenced by PM_check_nickspam().
float nickspamtime |
Definition at line 320 of file client.qh.
Referenced by PM_check_nickspam().
float pauseregen_finished |
Definition at line 342 of file client.qh.
Referenced by CheatImpulse(), GiveItems(), player_regen(), PlayerCorpseDamage(), PlayerDamage(), PM_jetpack(), PutObserverInServer(), and PutPlayerInServer().
float pauserotarmor_finished |
Definition at line 344 of file client.qh.
Referenced by CheatImpulse(), GiveItems(), player_regen(), PutObserverInServer(), and PutPlayerInServer().
float pauserotfuel_finished |
Definition at line 345 of file client.qh.
Referenced by CheatImpulse(), GiveItems(), player_regen(), and PutPlayerInServer().
float pauserothealth_finished |
Definition at line 343 of file client.qh.
Referenced by CheatImpulse(), GiveItems(), player_regen(), PutObserverInServer(), and PutPlayerInServer().
bool player_blocked |
Definition at line 337 of file client.qh.
Referenced by ClientKill(), PlayerJump(), and PM_check_blocked().
int playerid |
Definition at line 78 of file client.qh.
Referenced by anticheat_report_to_eventlog(), ClientConnect(), ClientDisconnect(), MapVote_Suggest(), PlayerInList(), and PlayerPreThink().
int pressedkeys |
Definition at line 76 of file client.qh.
Referenced by HUD_PressedKeys(), and PM_dodging().
float respawn_countdown |
Definition at line 328 of file client.qh.
Referenced by calculate_player_respawn_time(), and ShowRespawnCountdown().
Definition at line 332 of file client.qh.
Referenced by PlayerThink().
int respawn_flags |
Definition at line 324 of file client.qh.
Referenced by calculate_player_respawn_time(), PlayerThink(), PutObserverInServer(), and PutPlayerInServer().
Definition at line 330 of file client.qh.
Referenced by calculate_player_respawn_time(), MUTATOR_HOOKFUNCTION(), and PlayerThink().
Definition at line 331 of file client.qh.
Referenced by MUTATOR_HOOKFUNCTION(), and PlayerThink().
float respawn_time |
Definition at line 325 of file client.qh.
Referenced by calculate_player_respawn_time(), PlayerDamage(), PlayerThink(), PutObserverInServer(), PutPlayerInServer(), and ShowRespawnCountdown().
float respawn_time_max |
Definition at line 326 of file client.qh.
Referenced by calculate_player_respawn_time(), and PlayerThink().
float spectatortime |
Definition at line 335 of file client.qh.
Referenced by PlayerPreThink().
const int SVC_SETVIEW = 5 |
Definition at line 339 of file client.qh.
Referenced by PutClientInServer(), PutObserverInServer(), and SpectateSet().
bool wasplayer |
Definition at line 69 of file client.qh.
Referenced by ClientCommand_selectteam(), Player_SetTeamIndexChecked(), and ShowTeamSelection().
string weaponorder_byimpulse |
Definition at line 60 of file client.qh.
Referenced by ClientDisconnect(), W_Model(), W_NextWeapon(), and W_PreviousWeapon().
bool zoomstate |
Definition at line 72 of file client.qh.
Referenced by ClientData_Send(), SetZoomState(), and SpectateCopy().