codemp/game/bg_local.h

Go to the documentation of this file.
00001 // Copyright (C) 1999-2000 Id Software, Inc.
00002 //
00003 // bg_local.h -- local definitions for the bg (both games) files
00004 
00005 #define MIN_WALK_NORMAL 0.7f            // can't walk on very steep slopes
00006 
00007 #define TIMER_LAND              130
00008 #define TIMER_GESTURE   (34*66+50)
00009 
00010 #define OVERCLIP                1.001f
00011 
00012 // all of the locals will be zeroed before each
00013 // pmove, just to make damn sure we don't have
00014 // any differences when running on client or server
00015 typedef struct 
00016 {
00017         vec3_t          forward, right, up;
00018         float           frametime;
00019 
00020         int                     msec;
00021 
00022         qboolean        walking;
00023         qboolean        groundPlane;
00024         trace_t         groundTrace;
00025 
00026         float           impactSpeed;
00027 
00028         vec3_t          previous_origin;
00029         vec3_t          previous_velocity;
00030         int                     previous_waterlevel;
00031 } pml_t;
00032 
00033 #include "../namespace_begin.h"
00034 
00035 extern  pml_t           pml;
00036 
00037 // movement parameters
00038 extern  float   pm_stopspeed;
00039 extern  float   pm_duckScale;
00040 extern  float   pm_swimScale;
00041 extern  float   pm_wadeScale;
00042 
00043 extern  float   pm_accelerate;
00044 extern  float   pm_airaccelerate;
00045 extern  float   pm_wateraccelerate;
00046 extern  float   pm_flyaccelerate;
00047 
00048 extern  float   pm_friction;
00049 extern  float   pm_waterfriction;
00050 extern  float   pm_flightfriction;
00051 
00052 extern  int             c_pmove;
00053 
00054 extern int forcePowerNeeded[NUM_FORCE_POWER_LEVELS][NUM_FORCE_POWERS];
00055 
00056 // Had to add these here because there was no file access within the BG right now.
00057 int             trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode );
00058 void    trap_FS_Read( void *buffer, int len, fileHandle_t f );
00059 void    trap_FS_Write( const void *buffer, int len, fileHandle_t f );
00060 void    trap_FS_FCloseFile( fileHandle_t f );
00061 #include "../namespace_end.h"
00062 
00063 //PM anim utility functions:
00064 #include "../namespace_begin.h"
00065 qboolean PM_SaberInParry( int move );
00066 qboolean PM_SaberInKnockaway( int move );
00067 qboolean PM_SaberInReflect( int move );
00068 qboolean PM_SaberInStart( int move );
00069 qboolean PM_InSaberAnim( int anim );
00070 qboolean PM_InKnockDown( playerState_t *ps );
00071 qboolean PM_PainAnim( int anim );
00072 qboolean PM_JumpingAnim( int anim );
00073 qboolean PM_LandingAnim( int anim );
00074 qboolean PM_SpinningAnim( int anim );
00075 qboolean PM_InOnGroundAnim ( int anim );
00076 qboolean PM_InRollComplete( playerState_t *ps, int anim );
00077 
00078 int PM_AnimLength( int index, animNumber_t anim );
00079 
00080 int PM_GetSaberStance(void);
00081 float PM_GroundDistance(void);
00082 qboolean PM_SomeoneInFront(trace_t *tr);
00083 saberMoveName_t PM_SaberFlipOverAttackMove(void);
00084 saberMoveName_t PM_SaberJumpAttackMove( void );
00085 
00086 void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce );
00087 void PM_AddTouchEnt( int entityNum );
00088 void PM_AddEvent( int newEvent );
00089 
00090 qboolean        PM_SlideMove( qboolean gravity );
00091 void            PM_StepSlideMove( qboolean gravity );
00092 
00093 void PM_StartTorsoAnim( int anim );
00094 void PM_ContinueLegsAnim( int anim );
00095 void PM_ForceLegsAnim( int anim );
00096 
00097 void PM_BeginWeaponChange( int weapon );
00098 void PM_FinishWeaponChange( void );
00099 
00100 void PM_SetAnim(int setAnimParts,int anim,int setAnimFlags, int blendTime);
00101 
00102 void PM_WeaponLightsaber(void);
00103 void PM_SetSaberMove(short newMove);
00104 
00105 void PM_SetForceJumpZStart(float value);
00106 
00107 void BG_CycleInven(playerState_t *ps, int direction);
00108 
00109 #include "../namespace_end.h"