Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions | Variables
fps.hpp File Reference
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/cube_vector.hpp"

Go to the source code of this file.

Namespaces

 game
 implementation of basic game functionsand cubescript bindings
 

Functions

bool game::clientoption (const char *arg)
 
fpsentgame::getclient (int cn)
 access fpsent object safely using index More...
 
fpsentgame::newclient (int cn)
 ensure new client is a valid entity More...
 
const char * game::colorname (fpsent *d, const char *name, const char *prefix, const char *alt)
 add colored client number in [] brackets behind the name in case another player has the same name (duplicated name) More...
 
const char * game::teamcolorname (fpsent *d, const char *alt)
 color name depending on my team in red or blue More...
 
const char * game::teamcolor (const char *name, bool sameteam, const char *alt)
 color player name blue if you have the same team f1 otherwise red f3 More...
 
const char * game::teamcolor (const char *name, const char *team, const char *alt)
 this function calls the function above but also validates that team is a valid char pointer it is not possible to return memory to an invalid char* pointer!7 More...
 
fpsentgame::pointatplayer ()
 Give me the player I am aiming at. More...
 
fpsentgame::hudplayer ()
 Give me the fpsent instance of the player whose coordinates will be used to calculate my camera's position. More...
 
fpsentgame::followingplayer ()
 Give me the fpsent instance of the player you are currently spectating. More...
 
void game::stopfollowing ()
 stop spectating a specific player and start free camery fly More...
 
void game::clientdisconnected (int cn, bool notify)
 notify my client to change data when another clients disconnect More...
 
void game::clearclients (bool notify)
 delete all clients More...
 
void game::startgame ()
 clear all game data to start a new game More...
 
void game::spawnplayer (fpsent *d)
 spawn yourself im the game world, also called for monsters/AI in singleplayer of course not used for other players in multiplayer because everyone determins his spawn point for himself. More...
 
void game::deathstate (fpsent *d, bool restore)
 mark players as dead and update their state data More...
 
void game::damaged (int damage, fpsent *d, fpsent *actor, bool local)
 an fpsent (player/monster/bot) took damage More...
 
void game::killed (fpsent *d, fpsent *actor)
 this callback is called when player actor kills d prints death messages to all kind of consoles More...
 
void game::timeupdate (int secs)
 update game session time display intermission statistics in console More...
 
void game::msgsound (int n, physent *d)
 play sound and send sound notification to server More...
 
void game::drawicon (int icon, float x, float y, float sz)
 draw (blit) item texture (weapon, flags, armours, quad) on screen at x,y More...
 
int game::getfollowingfov ()
 Receive the fov the currently followed player got or -1 on failure. More...
 
void game::updateworld ()
 called in game loop to the update game world More...
 
void game::initclient ()
 
void game::physicstrigger (physent *d, bool local, int floorlevel, int waterlevel, int material)
 trigger sound effects depending on the material you enter More...
 
void game::dynentcollide (physent *d, physent *o, const vec &dir)
 push monsters (or objects) together when they hit walls or other objects More...
 
const char * game::getclientmap ()
 get client map name More...
 
const char * game::getclientmode ()
 
void game::resetgamestate ()
 reset game state in singleplayer reset all monsters, triggers, bouncers, movables, and projectiles More...
 
void game::suicide (physent *d)
 suicide your player More...
 
void game::startmap (const char *name)
 called just after a map load send CRC32 to server More...
 
float game::abovegameplayhud (int w, int h)
 calculate distance of hud from bottom of my screen depending on player state referenced only in gl_drawhud in render.cpp More...
 
void game::gameplayhud (int w, int h)
 render game hud depending on hudplayer's state and "SPECTATOR" in spectator mode More...
 
bool game::canjump ()
 check if I am allowed to jump at the moment called every time before jump command is executed More...
 
bool game::allowmove (physent *d)
 check if I am allowed to move More...
 
void game::doattack (bool on)
 filter attack attempts not possible in intermission or if player's state is CS_DEAD More...
 
dynentgame::iterdynents (int i)
 iterate through all dynamic entities and return entity with index [i] You put the list in and get it through to return back The caller has to hand in a list which will get filled More...
 
int game::numdynents ()
 return the sum of dynamic entities currently in scene More...
 
void game::writegamedata (vector< char > &extras)
 
void game::readgamedata (vector< char > &extras)
 
int game::clipconsole (int w, int h)
 
const char * game::defaultcrosshair (int index)
 
int game::selectcrosshair (vec &color)
 switch crosshair depending on player state and player health More...
 
void game::lighteffects (dynent *e, vec &color, vec &dir)
 
void game::setupcamera ()
 initialise camera when entering spectator mode More...
 
bool game::detachcamera ()
 check if it is neccesary to detach the camera from first person view to third person view. More...
 
bool game::collidecamera ()
 check if camera collision detection is neccesary More...
 
bool game::needminimap ()
 checks if minimap is required for this game mode More...
 

Variables

SharedVar< int > game::smoothmove
 
SharedVar< int > game::smoothdist