X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qh;h=e288bebfcb27ad10248c46fdd8ec2acbb22f1ecd;hb=HEAD;hp=8c607cf9af6af6911098007d0eb5f56a41af7c32;hpb=90b21340c6f5678a7b0ea3dda116ec7f4fa4352e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 8c607cf9a..e8fcd5ffe 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -7,6 +7,7 @@ #include bool autocvar__notarget; +bool autocvar_sv_show_entnum; int autocvar_g_balance_armor_start; float autocvar_g_balance_pause_armor_rot_spawn; float autocvar_g_balance_pause_fuel_rot_spawn; @@ -71,7 +72,9 @@ float autocvar_sv_player_scale; .int spectatee_status; .bool zoomstate; +.bool team_selected; .bool just_joined; +.bool wants_join; .int pressedkeys; @@ -82,9 +85,6 @@ float autocvar_sv_player_scale; void ClientState_attach(entity this); -IntrusiveList g_players; -STATIC_INIT(g_players) { g_players = IL_NEW(); } - CLASS(Client, Object) /** Client name */ ATTRIB(Client, netname, string, this.netname); @@ -160,6 +160,7 @@ CLASS(Client, Object) ATTRIB(Client, teamkill_soundsource, entity, this.teamkill_soundsource); ATTRIB(Client, usekeypressed, bool, this.usekeypressed); ATTRIB(Client, jointime, float, this.jointime); + ATTRIB(Client, wants_join, bool, this.wants_join); ATTRIB(Client, spectatortime, float, this.spectatortime); ATTRIB(Client, startplaytime, float, this.startplaytime); ATTRIB(Client, version_nagtime, float, this.version_nagtime); @@ -277,10 +278,8 @@ CLASS(Player, Client) INIT(Player) { this.classname = STR_PLAYER; - IL_PUSH(g_players, this); } DESTRUCTOR(Player) { - IL_REMOVE(g_players, this); } ENDCLASS(Player) @@ -365,8 +364,6 @@ bool PlayerInIPList(entity p, string iplist); void ClientData_Touch(entity e); -int nJoinAllowed(entity this, entity ignore); - void PlayerUseKey(entity this); void FixClientCvars(entity e); @@ -403,8 +400,12 @@ void ClientInit_misc(entity this); int GetPlayerLimit(); const int MIN_SPEC_TIME = 1; +void Join(entity this, bool queued_join); +int nJoinAllowed(entity this, entity ignore); +bool queuePlayer(entity this, int team_index); bool joinAllowed(entity this); -void Join(entity this); + +void PlayerFrame (entity this); #define SPECTATE_COPY() ACCUMULATE void SpectateCopy(entity this, entity spectatee) #define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); }