Nuclide
Software Development Kit for id Technology (BETA)
ncClient Class Reference

About this class

This entity class is the lowest client/player class.

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

Inheritance diagram for ncClient:
ncBot ncSpectator ncPlayer

Public Member Functions

void ncClient (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 ncIO::SpawnKey() but for save-game fields. More...
 

Constructor & Destructor Documentation

◆ ncClient()

void ncClient::ncClient ( void  )

Member Function Documentation

◆ ClientInputFrame()

void ncClient::ClientInputFrame ( void  )
virtual

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

Reimplemented in ncPlayer, and ncSpectator.

◆ GetBackSpeed()

float ncClient::GetBackSpeed ( void  )
virtual

Overridable: Returns the desired maximum backwardss movement speed.

Reimplemented from ncBot.

◆ GetForwardSpeed()

float ncClient::GetForwardSpeed ( void  )
virtual

Overridable: Returns the desired maximum forward movement speed.

Reimplemented from ncBot.

◆ GetSideSpeed()

float ncClient::GetSideSpeed ( void  )
virtual

Overridable: Returns the desired maximum side movement speed.

Reimplemented from ncBot.

◆ IsDead()

bool ncClient::IsDead ( void  )
virtual

Returns if we're considered 'dead'.

ncClient, ncSpectator will always return false.

Reimplemented in ncPlayer, and ncSpectator.

◆ IsFakeSpectator()

bool ncClient::IsFakeSpectator ( void  )
virtual

Returns if we're a 'fake' spectator.

This is a regular player acting as a spectator.

Reimplemented in ncPlayer, and ncSpectator.

◆ IsPlayer()

bool ncClient::IsPlayer ( void  )
virtual

Returns if we're a player.

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

Reimplemented in ncPlayer, and ncSpectator.

◆ IsRealSpectator()

bool ncClient::IsRealSpectator ( void  )
virtual

Returns if we're a 'real' spectator.

That is a client that can only spectate.

Reimplemented in ncPlayer, and ncSpectator.

◆ OnRemoveEntity()

void ncClient::OnRemoveEntity ( void  )
virtual

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

Reimplemented from ncIO.

Reimplemented in ncPlayer.

◆ PostFrame()

void ncClient::PostFrame ( void  )
virtual

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

Reimplemented in ncPlayer, and ncSpectator.

◆ predraw()

float ncClient::predraw ( void  )
virtual

Reimplemented from ncSurfacePropEntity.

Reimplemented in ncPlayer, and ncSpectator.

◆ PreFrame()

void ncClient::PreFrame ( void  )
virtual

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

Reimplemented in ncPlayer, and ncSpectator.

◆ ProcessInput()

void ncClient::ProcessInput ( void  )
virtual

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

Reimplemented in ncPlayer, and ncSpectator.

◆ Restore()

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

Similar to ncIO::SpawnKey() but for save-game fields.

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

Reimplemented from ncActor.

Reimplemented in ncPlayer, and ncSpectator.

◆ Save()

void ncClient::Save ( float  handle)
virtual

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

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

Reimplemented from ncActor.

Reimplemented in ncPlayer, and ncSpectator.

◆ ServerInputFrame()

void ncClient::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 ncPlayer, and ncSpectator.

◆ SharedInputFrame()

void ncClient::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 ncPlayer, and ncSpectator.

◆ UpdateAliveCam()

void ncClient::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 ncView.

Reimplemented in ncPlayer.

◆ UpdateDeathcam()

void ncClient::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 ncView.

◆ UpdateIntermissionCam()

void ncClient::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 ncView.


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