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
24class
26{
27public:
28 void NSClient(void);
29
31 virtual void ProcessInput(void);
33 virtual void PreFrame(void);
35 virtual void PostFrame(void);
37 virtual bool IsFakeSpectator(void);
39 virtual bool IsRealSpectator(void);
41 virtual bool IsDead(void);
43 virtual bool IsPlayer(void);
45 virtual void SharedInputFrame(void);
46
47 /* overrides */
48 virtual void OnRemoveEntity(void);
49 virtual float GetForwardSpeed(void);
50 virtual float GetSideSpeed(void);
51 virtual float GetBackSpeed(void);
52
53#ifdef CLIENT
55 virtual void ClientInputFrame(void);
56
58 virtual void UpdateAliveCam(void);
59
61 virtual void UpdateDeathcam(void);
62
64 virtual void UpdateIntermissionCam(void);
65
66 /* overrides */
67 virtual float predraw(void);
68#endif
69
70#ifdef SERVER
72 virtual void ServerInputFrame(void);
73
74 /* overrides */
75 virtual void Save(float);
76 virtual void Restore(string,string);
77#endif
78
79private:
80 vector origin_net;
81 vector velocity_net;
82
83 NSXRSpace m_xrSpace;
84 NSXRInput m_xrInputHead;
85 NSXRInput m_xrInputLeft;
86 NSXRInput m_xrInputRight;
87
88#ifdef SERVER
89 float score;
90#endif
91};
A virtual multiplayer opponent.
Definition: NSBot.h:53
This entity class is the lowest client/player class.
Definition: NSClient.h:26
This class represents an input device in the world.
Definition: NSXRInput.h:58
This class represents a local client space in the world.
Definition: NSXRSpace.h:30