Nuclide
Software Development Kit for id Tech
NSClient Class Reference

This entity class is the lowest client/player class. More...

#include <NSClient.h>

Inheritance diagram for NSClient:
NSBot NSClientSpectator NSClientPlayer

Public Member Functions

void NSClient (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 OnRemoveEntity (void)
 Handles what happens before the entity gets removed from the client game. More...
 
virtual float GetForwardSpeed (void)
 Overridable: Returns the desired maximum forward movement speed. More...
 
virtual float GetSideSpeed (void)
 Overridable: Returns the desired maximum side movement speed. More...
 
virtual float GetBackSpeed (void)
 Overridable: Returns the desired maximum backwardss movement speed. 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 UpdateAliveCam (void)
 Client: Called every single client frame when this client is alive. More...
 
virtual void UpdateDeathcam (void)
 Client: Called every single client frame when this client is dead. More...
 
virtual void UpdateIntermissionCam (void)
 Client: Called every single client frame during intermission. More...
 
virtual float predraw (void)
 
virtual void ServerInputFrame (void)
 Server: This is where the input* variables arrive after sending them out from the client (see ClientInputFrame). More...
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ::SpawnKey but for save-game fields. More...
 

Detailed Description

This entity class is the lowest client/player class.

It is mostly concerned with the features shared between players and spectating clients alike.

Constructor & Destructor Documentation

◆ NSClient()

void NSClient::NSClient ( void  )

Member Function Documentation

◆ ClientInputFrame()

void NSClient::ClientInputFrame ( void  )
virtual

Client: Called on the client to give a chance to override input_* variables before networking them takes place.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ GetBackSpeed()

float NSClient::GetBackSpeed ( void  )
virtual

Overridable: Returns the desired maximum backwardss movement speed.

Reimplemented from NSBot.

◆ GetForwardSpeed()

float NSClient::GetForwardSpeed ( void  )
virtual

Overridable: Returns the desired maximum forward movement speed.

Reimplemented from NSBot.

◆ GetSideSpeed()

float NSClient::GetSideSpeed ( void  )
virtual

Overridable: Returns the desired maximum side movement speed.

Reimplemented from NSBot.

◆ IsDead()

bool NSClient::IsDead ( void  )
virtual

Returns if we're considered 'dead'.

NSClient, NSClientSpectator will always return false.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ IsFakeSpectator()

bool NSClient::IsFakeSpectator ( void  )
virtual

Returns if we're a 'fake' spectator.

This is a regular player acting as a spectator.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ IsPlayer()

bool NSClient::IsPlayer ( void  )
virtual

Returns if we're a player.

That is a type of client that is built on top of NSClientPlayer.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ IsRealSpectator()

bool NSClient::IsRealSpectator ( void  )
virtual

Returns if we're a 'real' spectator.

That is a client that can only spectate.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ OnRemoveEntity()

void NSClient::OnRemoveEntity ( void  )
virtual

Handles what happens before the entity gets removed from the client game.

Reimplemented from NSEntity.

Reimplemented in NSClientPlayer.

◆ PostFrame()

void NSClient::PostFrame ( void  )
virtual

Run once, every frame, after physics are run on the player.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ predraw()

float NSClient::predraw ( void  )
virtual

Reimplemented from NSSurfacePropEntity.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ PreFrame()

void NSClient::PreFrame ( void  )
virtual

Run once, every frame, before physics are run on the player.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ ProcessInput()

void NSClient::ProcessInput ( void  )
virtual

Called within the class to deal with the final input handling of the client.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ Restore()

void NSClient::Restore ( string  strKey,
string  strValue 
)
virtual

Similar to ::SpawnKey but for save-game fields.

Whatever you write into file handles within your ::Save() method needs to be read back in here.

Reimplemented from NSNavAI.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ Save()

void NSClient::Save ( float  handle)
virtual

Handles saving a copy of this entity to a given filehandle.

Within you want to use the ::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.

Reimplemented from NSNavAI.

Reimplemented in NSClientPlayer, and NSClientSpectator.

◆ ServerInputFrame()

void NSClient::ServerInputFrame ( void  )
virtual

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 in NSClientPlayer, and NSClientSpectator.

◆ SharedInputFrame()

void NSClient::SharedInputFrame ( void  )
virtual

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 in NSClientPlayer, and NSClientSpectator.

◆ UpdateAliveCam()

void NSClient::UpdateAliveCam ( void  )
virtual

Client: Called every single client frame when this client is alive.

You are expected to manipulate the g_view global here, which is of type NSView.

Reimplemented in NSClientPlayer.

◆ UpdateDeathcam()

void NSClient::UpdateDeathcam ( void  )
virtual

Client: Called every single client frame when this client is dead.

You are expected to manipulate the g_view global here, which is of type NSView.

◆ UpdateIntermissionCam()

void NSClient::UpdateIntermissionCam ( void  )
virtual

Client: Called every single client frame during intermission.

You are expected to manipulate the g_view global here, which is of type NSView.


The documentation for this class was generated from the following files: