Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
state.qh
Go to the documentation of this file.
1#pragma once
2
11 {
13 this.m_client = client;
14 }
16
17.PlayerState _ps;
18#define PS(this) ((this)._ps)
19
20// TODO: renew on death
21void PlayerState_attach(entity this);
22void PlayerState_detach(entity this);
23
32 {
34 this.m_client = client;
35 }
37 {
38 TC(PlayerState, this);
39 }
41
42.ClientState _cs;
43
44#if NDEBUG
45 #define CS(this) (this._cs)
46#else
47 ClientState CS(Client this) { TC(Client, this); assert(this._cs); return this._cs; }
48#endif
49
50// NOTE: this exists to ease migration later on - ClientState does not exist early enough for replicated cvars!
51#define CS_CVAR(this) (this)
52
53void ClientState_attach(entity this);
54void ClientState_detach(entity this);
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Purpose: common client state, usable on client and server Client: singleton representing the viewed p...
Definition state.qh:29
ATTRIB(ClientState, m_client, entity)
ClientState(entity client)
Definition state.qh:31
virtual void PlayerState::ps_push()
Definition state.qh:36
Purpose: common player state, usable on client and server Client: singleton representing the viewed p...
Definition state.qh:8
PlayerState(entity client)
Definition state.qh:10
ATTRIB(PlayerState, m_client, entity)
#define TC(T, sym)
Definition _all.inc:82
#define assert(expr,...)
Definition log.qh:8
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define CONSTRUCTOR(cname,...)
Definition oo.qh:213
#define CONSTRUCT(cname,...)
Definition oo.qh:123
ClientState _cs
Definition state.qh:42
void PlayerState_attach(entity this)
Definition state.qc:12
PlayerState _ps
Definition state.qh:17
void ClientState_detach(entity this)
Definition state.qc:73
void PlayerState_detach(entity this)
Definition state.qc:22
void ClientState_attach(entity this)
Definition state.qc:46
ClientState CS(Client this)
Definition state.qh:47