Nuclide
Software Development Kit for id Technology (BETA)
Main Page
Related Pages
Modules
Classes
InputDevice.h
1
/*
2
* Copyright (c) 2025 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
40
class
ncInputDevice
:
ncVehicle
41
{
42
public
:
43
void
ncInputDevice
(
void
);
44
45
virtual
void
Spawned
(
void
);
46
virtual
void
WeaponInput
(
void
);
47
virtual
void
PlayerInput
(
void
);
48
49
#ifdef CLIENT
50
virtual
bool
HideViewWeapon
(
void
);
51
virtual
void
UpdateView
(
void
);
52
virtual
void
PredictPreFrame
(
void
);
53
virtual
void
PredictPostFrame
(
void
);
54
virtual
void
ReceiveEntity
(
float
flNew,
float
flSendFlags);
55
#endif
56
57
#ifdef SERVER
58
virtual
void
Respawn
(
void
);
59
virtual
void
OnPlayerUse
(
void
);
60
virtual
void
EvaluateEntity
(
void
);
61
virtual
float
SendEntity
(entity,
float
);
62
virtual
void
SpawnKey
(
string
keyName,
string
setValue);
63
#endif
64
65
private
:
66
NETWORKED_VECTOR(m_vecSeatOffest)
67
NETWORKED_FLOAT(m_flUseTime)
68
};
69
ncInputDevice
Shared-Entity: Electronics Input Device.
Definition:
InputDevice.h:41
ncInputDevice::UpdateView
virtual void UpdateView(void)
Definition:
InputDevice.qc:32
ncInputDevice::WeaponInput
virtual void WeaponInput(void)
Definition:
InputDevice.qc:70
ncInputDevice::ReceiveEntity
virtual void ReceiveEntity(float flNew, float flSendFlags)
Client: Handles network updates from the server for the associated entity.
Definition:
InputDevice.qc:123
ncInputDevice::Respawn
virtual void Respawn(void)
Server: Called when the entity first spawns or when game-logic requests the entity to return to its o...
Definition:
InputDevice.qc:104
ncInputDevice::OnPlayerUse
virtual void OnPlayerUse(void)
Definition:
InputDevice.qc:88
ncInputDevice::Spawned
virtual void Spawned(void)
Called when the entity is fully initialized.
Definition:
InputDevice.qc:255
ncInputDevice::PredictPreFrame
virtual void PredictPreFrame(void)
Definition:
InputDevice.qc:47
ncInputDevice::SpawnKey
virtual void SpawnKey(string keyName, string setValue)
This method handles entity key/value pairs on map load.
Definition:
InputDevice.qc:171
ncInputDevice::EvaluateEntity
virtual void EvaluateEntity(void)
Run each tic after physics are run to determine if we need to send updates over the network.
Definition:
InputDevice.qc:181
ncInputDevice::SendEntity
virtual float SendEntity(entity, float)
Called by the engine whenever we need to send a client an update about this entity.
Definition:
InputDevice.qc:210
ncInputDevice::PlayerInput
virtual void PlayerInput(void)
Definition:
InputDevice.qc:76
ncInputDevice::PredictPostFrame
virtual void PredictPostFrame(void)
Definition:
InputDevice.qc:58
ncInputDevice::ncInputDevice
void ncInputDevice(void)
Definition:
InputDevice.qc:18
ncInputDevice::HideViewWeapon
virtual bool HideViewWeapon(void)
Definition:
InputDevice.qc:26
ncVehicle
This entity class represents vehicles that are predicted across the network.
Definition:
Vehicle.h:33
src
shared
electronics
InputDevice.h
2009-2025 (C) Nuclide is a project by
Vera Visions, L.L.C.
and is available under the
ISC License
.