Nuclide
Software Development Kit for id Tech
|
This entity class represents every spectator client. More...
#include <NSClientSpectator.h>
Public Member Functions | |
void | NSClientSpectator (void) |
virtual void | ProcessInput (void) |
Called within the class to deal with the final input handling of the client. More... | |
virtual void | PreFrame (void) |
Run once, every frame, before physics are run on the player. More... | |
virtual void | PostFrame (void) |
Run once, every frame, after physics are run on the player. More... | |
virtual bool | IsFakeSpectator (void) |
Returns if we're a 'fake' spectator. More... | |
virtual bool | IsRealSpectator (void) |
Returns if we're a 'real' spectator. More... | |
virtual bool | IsDead (void) |
Returns if we're considered 'dead'. More... | |
virtual bool | IsPlayer (void) |
Returns if we're a player. More... | |
virtual void | SharedInputFrame (void) |
Like ClientInputFrame and ServerInputFrame, but run on both client and server at the same time. More... | |
virtual void | InputNext (void) |
Call to spectate the next spectating target. More... | |
virtual void | InputPrevious (void) |
Call to spectate the previous player target. More... | |
virtual void | InputMode (void) |
Call to change the spectating mode. More... | |
virtual void | WarpToTarget (void) |
Re-teleport to the target we're spectating. More... | |
virtual void | SpectatorTrackPlayer (void) |
Called every frame to track with our target player. More... | |
virtual void | ClientInputFrame (void) |
Client: Called on the client to give a chance to override input_* variables before networking them takes place. More... | |
virtual void | ReceiveEntity (float, float) |
Client: Handles network updates from the server for the associated entity. More... | |
virtual float | predraw (void) |
virtual void | Save (float) |
Handles saving a copy of this entity to a given filehandle. More... | |
virtual void | Restore (string, string) |
Similar to NSIO::SpawnKey but for save-game fields. More... | |
virtual void | EvaluateEntity (void) |
Run each tic after physics are run to determine if we need to send updates over the network. More... | |
virtual float | SendEntity (entity, float) |
Called by the engine whenever we need to send a client an update about this entity. More... | |
virtual void | ServerInputFrame (void) |
Server: This is where the input* variables arrive after sending them out from the client (see ClientInputFrame). More... | |
nonvirtual void | SpectatorDeathcam (NSRenderableEntity, NSEntity, float) |
This entity class represents every spectator client.
These types of clients are not meant to interfere with the gameplay, they are merely observers.
NSClientPlayer is a sub-class which has the ability to interact with games.
When clients connect via the spectate
command, they will findthemselves of type NSClientSpectator.
Client: Called on the client to give a chance to override input_* variables before networking them takes place.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from NSSurfacePropEntity.
Reimplemented in NSClientPlayer.
|
virtual |
Returns if we're considered 'dead'.
NSClient, NSClientSpectator will always return false.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
|
virtual |
Returns if we're a 'fake' spectator.
This is a regular player acting as a spectator.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
|
virtual |
Returns if we're a player.
That is a type of client that is built on top of NSClientPlayer.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
|
virtual |
Returns if we're a 'real' spectator.
That is a client that can only spectate.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Run once, every frame, after physics are run on the player.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Run once, every frame, before physics are run on the player.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Called within the class to deal with the final input handling of the client.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Client: Handles network updates from the server for the associated entity.
Reimplemented from NSSurfacePropEntity.
Reimplemented in NSClientPlayer.
Similar to NSIO::SpawnKey
but for save-game fields.
Whatever you write into file handles within your NSIO::Save()
method needs to be read back in here.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Handles saving a copy of this entity to a given filehandle.
Within you want to use the NSIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from NSSurfacePropEntity.
Reimplemented in NSClientPlayer.
Server: This is where the input* variables arrive after sending them out from the client (see ClientInputFrame).
This is also where we will instruct the server to run physics on the client.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
Like ClientInputFrame and ServerInputFrame, but run on both client and server at the same time.
It is run before ClientInputFrame and ServerInputFrame. When overriding, Make sure to call the super method to enable Nuclide to handle spectator controls properly.
Reimplemented from NSClient.
Reimplemented in NSClientPlayer.
void NSClientSpectator::SpectatorDeathcam | ( | NSRenderableEntity | ourCorpse, |
NSEntity | trackEntity, | ||
float | waitTime | ||
) |
Called every frame to track with our target player.
Re-teleport to the target we're spectating.
Called once by InputNext/Previous.