commit 4e82f5c251ad5e116bc3991fc4349f05aa9fffaa Author: devhc Date: Wed May 25 22:42:56 2011 +0200 REFACTOR diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index 7d5fe06..aff2cf9 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -181,7 +181,7 @@ static void CG_AddTestModel( void ) return; } - // if testing a gun, set the origin reletive to the view origin + // if testing a gun, set the origin relative to the view origin if( cg.testGun ) { VectorCopy( cg.refdef.vieworg, cg.testModelEntity.origin ); @@ -1319,7 +1319,7 @@ static int CG_CalcViewValues( void ) CG_OffsetFirstPersonView( ); } - // position eye reletive to origin + // position eye relative to origin AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); if( cg.hyperspace ) diff --git a/src/game/bg_local.h b/src/game/bg_local.h index 4ebae00..83801d4 100644 --- a/src/game/bg_local.h +++ b/src/game/bg_local.h @@ -73,6 +73,7 @@ extern float pm_flyaccelerate; extern float pm_friction; extern float pm_waterfriction; extern float pm_flightfriction; +extern float pm_spectatorfriction; extern int c_pmove; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 5c40aea..b26a488 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -500,7 +500,7 @@ static float PM_CmdScale( usercmd_t *cmd ) ================ PM_SetMovementDir -Determine the rotation of the legs reletive +Determine the rotation of the legs relative to the facing dir ================ */ @@ -676,10 +676,7 @@ static qboolean PM_CheckWallJump( void ) !( trace.surfaceFlags & ( SURF_SKY | SURF_SLICK ) ) && trace.plane.normal[ 2 ] < MIN_WALK_NORMAL ) { - if( !VectorCompare( trace.plane.normal, pm->ps->grapplePoint ) ) - { - VectorCopy( trace.plane.normal, pm->ps->grapplePoint ); - } + VectorCopy( trace.plane.normal, pm->ps->grapplePoint ); } else return qfalse; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 6ba46f6..1732e05 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -429,13 +429,8 @@ typedef enum BA_NUM_BUILDABLES } buildable_t; -// reward sounds (stored in ps->persistant[PERS_PLAYEREVENTS]) -#define PLAYEREVENT_DENIEDREWARD 0x0001 -#define PLAYEREVENT_GAUNTLETREWARD 0x0002 -#define PLAYEREVENT_HOLYSHIT 0x0004 - // entityState_t->event values -// entity events are for effects that take place reletive +// entity events are for effects that take place relative // to an existing entities origin. Very network efficient. // two bits at the top of the entityState->event field diff --git a/src/game/g_local.h b/src/game/g_local.h index 9fa46ae..4c60a56 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -37,11 +37,8 @@ typedef struct gclient_s gclient_t; #define INFINITE 1000000 #define FRAMETIME 100 // msec -#define CARNAGE_REWARD_TIME 3000 -#define REWARD_SPRITE_TIME 2000 #define INTERMISSION_DELAY_TIME 1000 -#define SP_INTERMISSION_DELAY_TIME 5000 // gentity->flags #define FL_GODMODE 0x00000010 @@ -72,8 +69,6 @@ typedef enum MODEL_2TO1 } moverState_t; -#define SP_PODIUM_MODEL "models/mapobjects/podium/podium4.md3" - //============================================================================ struct gentity_s @@ -253,11 +248,6 @@ typedef enum CON_CONNECTED } clientConnected_t; -// the auto following clients don't follow a specific client -// number, but instead follow the first two active players -#define FOLLOW_ACTIVE1 -1 -#define FOLLOW_ACTIVE2 -2 - // client data that stays across multiple levels or tournament restarts // this is achieved by writing all the data to cvar strings at game shutdown // time and reading them back at connection time. Anything added here @@ -838,9 +828,7 @@ void G_FreeEntity( gentity_t *e ); qboolean G_EntitiesFree( void ); void G_TouchTriggers( gentity_t *ent ); -void G_TouchSolids( gentity_t *ent ); -float *tv( float x, float y, float z ); char *vtos( const vec3_t v ); float vectoyaw( const vec3_t vec ); @@ -848,7 +836,7 @@ float vectoyaw( const vec3_t vec ); void G_AddPredictableEvent( gentity_t *ent, int event, int eventParm ); void G_AddEvent( gentity_t *ent, int event, int eventParm ); void G_BroadcastEvent( int event, int eventParm ); -void G_SetOrigin( gentity_t *ent, vec3_t origin ); +void G_SetOrigin( gentity_t *ent, const vec3_t origin ); void AddRemap(const char *oldShader, const char *newShader, float timeOffset); const char *BuildShaderStateConfig( void ); @@ -875,7 +863,6 @@ qboolean G_RadiusDamage( vec3_t origin, gentity_t *attacker, float damage, floa qboolean G_SelectiveRadiusDamage( vec3_t origin, gentity_t *attacker, float damage, float radius, gentity_t *ignore, int mod, int team ); float G_RewardAttackers( gentity_t *self ); -void body_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath ); void AddScore( gentity_t *ent, int score ); void G_LogDestruction( gentity_t *self, gentity_t *actor, int mod ); @@ -958,7 +945,6 @@ void G_UpdateZaps( int msec ); // g_client.c // void G_AddCreditToClient( gclient_t *client, short credit, qboolean cap ); -team_t TeamCount( int ignoreClientNum, int team ); void G_SetClientViewAngle( gentity_t *ent, vec3_t angle ); gentity_t *G_SelectTremulousSpawnPoint( team_t team, vec3_t preference, vec3_t origin, vec3_t angles ); gentity_t *G_SelectSpawnPoint( vec3_t avoidPoint, vec3_t origin, vec3_t angles ); @@ -1216,8 +1202,6 @@ void trap_LinkEntity( gentity_t *ent ); void trap_UnlinkEntity( gentity_t *ent ); int trap_EntitiesInBox( const vec3_t mins, const vec3_t maxs, int *entityList, int maxcount ); qboolean trap_EntityContact( const vec3_t mins, const vec3_t maxs, const gentity_t *ent ); -int trap_BotAllocateClient( void ); -void trap_BotFreeClient( int clientNum ); void trap_GetUsercmd( int clientNum, usercmd_t *cmd ); qboolean trap_GetEntityToken( char *buffer, int bufferSize ); diff --git a/src/game/g_mover.c b/src/game/g_mover.c index c081e9e..39a3999 100644 --- a/src/game/g_mover.c +++ b/src/game/g_mover.c @@ -33,8 +33,6 @@ PUSHMOVE =============================================================================== */ -void MatchTeam( gentity_t *teamLeader, int moverState, int time ); - typedef struct { gentity_t *ent; diff --git a/src/game/g_target.c b/src/game/g_target.c index a3be4ff..bd12c72 100644 --- a/src/game/g_target.c +++ b/src/game/g_target.c @@ -159,7 +159,7 @@ void SP_target_speaker( gentity_t *ent ) if( !G_SpawnString( "noise", "NOSOUND", &s ) ) G_Error( "target_speaker without a noise key at %s", vtos( ent->s.origin ) ); - // force all client reletive sounds to be "activator" speakers that + // force all client relative sounds to be "activator" speakers that // play on the entity that activates it if( s[ 0 ] == '*' ) ent->spawnflags |= 8; diff --git a/src/game/g_utils.c b/src/game/g_utils.c index d4a9ef6..12d52d0 100644 --- a/src/game/g_utils.c +++ b/src/game/g_utils.c @@ -701,7 +701,7 @@ G_SetOrigin Sets the pos trajectory for a fixed position ================ */ -void G_SetOrigin( gentity_t *ent, vec3_t origin ) +void G_SetOrigin( gentity_t *ent, const vec3_t origin ) { VectorCopy( origin, ent->s.pos.trBase ); ent->s.pos.trType = TR_STATIONARY; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 7327fa6..673c459 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -501,12 +501,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define BSUIT_POISON_PROTECTION 3 #define BSUIT_PCLOUD_PROTECTION 3000 -#define MGCLIP_PRICE 0 - -#define CGAMMO_PRICE 0 - -#define GAS_PRICE 0 - #define MEDKIT_POISON_IMMUNITY_TIME 0 #define MEDKIT_STARTUP_TIME 4000 #define MEDKIT_STARTUP_SPEED 5 @@ -519,7 +513,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * _SPLASHDAMGE - the amount of damage caused by this buildable when it blows up * _SPLASHRADIUS - the radius around which it does this damage * - * REACTOR_BASESIZE - the maximum distance a buildable can be from an reactor + * REACTOR_BASESIZE - the maximum distance a buildable can be from a reactor * REPEATER_BASESIZE - the maximum distance a buildable can be from a repeater * HUMAN_BHLTH_MODIFIER - overall health modifier for coarse tuning *