g_phys.c File Reference

Misc physic functions. More...

#include "g_local.h"
Include dependency graph for g_phys.c:

Go to the source code of this file.

Functions

void G_PhysicsStep (edict_t *ent)
static qboolean G_PhysicsThink (edict_t *ent)
 Runs thinking code for this frame if necessary.
void G_PhysicsRun (void)
 Handles door and other objects.

Detailed Description

Misc physic functions.

Note:
G_PhysicsRun is called every frame to handle physics stuff

Definition in file g_phys.c.


Function Documentation

void G_PhysicsRun ( void   ) 

Handles door and other objects.

See also:
G_RunFrame

Definition at line 109 of file g_phys.c.

References level_locals_t::framenum, G_EdictsGetNextInUse(), G_MatchIsRunning(), G_PhysicsThink(), level, and edict_s::think.

Referenced by G_RunFrame().

void G_PhysicsStep ( edict_t ent  ) 
Todo:
Use this function to enable footsteps over network
Note:
Only play the water sounds if actor is not in STATE_CROUCHED mode we can assume, that moving slower and more carefully would also not produce the water sounds

Todo:
don't play foot step sounds for flying units.

Definition at line 34 of file g_phys.c.

References moveinfo_t::contentFlags, edict_s::contentFlags, CONTENTS_WATER, moveinfo_t::currentStep, level_locals_t::framenum, G_IsCrouched, G_Trace(), G_VisToPM(), game_import_t::GetFootstepSound(), gi, level, MASK_SOLID, edict_s::moveinfo, cBspSurface_s::name, edict_s::nextthink, edict_s::origin, SERVER_FRAME_SECONDS, moveinfo_t::steps, trace_s::surface, edict_s::think, UNIT_HEIGHT, VectorCopy, and moveinfo_t::visflags.

Referenced by G_ClientMove().

static qboolean G_PhysicsThink ( edict_t ent  )  [static]

Runs thinking code for this frame if necessary.

Definition at line 90 of file g_phys.c.

References gi, level, edict_s::nextthink, qfalse, qtrue, SERVER_FRAME_SECONDS, edict_s::think, and level_locals_t::time.

Referenced by G_PhysicsRun().


Generated by  doxygen 1.6.2