Nuclide
Software Development Kit for id Tech
NSClient.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016-2024 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
22class
24{
25public:
26 void NSClient(void);
27
29 virtual void ProcessInput(void);
31 virtual void PreFrame(void);
33 virtual void PostFrame(void);
35 virtual bool IsFakeSpectator(void);
37 virtual bool IsRealSpectator(void);
39 virtual bool IsDead(void);
41 virtual bool IsPlayer(void);
43 virtual void SharedInputFrame(void);
44
45 /* overrides */
46 virtual void OnRemoveEntity(void);
47 virtual float GetForwardSpeed(void);
48 virtual float GetSideSpeed(void);
49 virtual float GetBackSpeed(void);
50
51#ifdef CLIENT
53 virtual void ClientInputFrame(void);
54
56 virtual void UpdateAliveCam(void);
57
59 virtual void UpdateDeathcam(void);
60
62 virtual void UpdateIntermissionCam(void);
63
64 /* overrides */
65 virtual float predraw(void);
66#endif
67
68#ifdef SERVER
70 virtual void ServerInputFrame(void);
71
72 /* overrides */
73 virtual void Save(float);
74 virtual void Restore(string,string);
75#endif
76
77private:
78 vector origin_net;
79 vector velocity_net;
80
81 NSXRSpace m_xrSpace;
82 NSXRInput m_xrInputHead;
83 NSXRInput m_xrInputLeft;
84 NSXRInput m_xrInputRight;
85
86#ifdef SERVER
87 float score;
88#endif
89};
A virtual multiplayer opponent.
Definition: NSBot.h:45
This entity class is the lowest client/player class.
Definition: NSClient.h:24
This class represents an input device in the world.
Definition: NSXRInput.h:56
This class represents a local client space in the world.
Definition: NSXRSpace.h:28
vector(vector) normalize