diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 9 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 34 | ||||
-rw-r--r-- | src/game/g_active.c | 63 | ||||
-rw-r--r-- | src/game/g_buildable.c | 23 | ||||
-rw-r--r-- | src/game/g_client.c | 12 | ||||
-rw-r--r-- | src/game/g_cmds.c | 21 | ||||
-rw-r--r-- | src/game/g_combat.c | 6 | ||||
-rw-r--r-- | src/game/g_local.h | 3 | ||||
-rw-r--r-- | src/game/g_main.c | 7 | ||||
-rw-r--r-- | src/game/g_maprotation.c | 2 | ||||
-rw-r--r-- | src/game/g_misc.c | 2 | ||||
-rw-r--r-- | src/game/g_mover.c | 7 | ||||
-rw-r--r-- | src/game/g_physics.c | 2 | ||||
-rw-r--r-- | src/game/g_ptr.c | 4 | ||||
-rw-r--r-- | src/game/g_spawn.c | 4 | ||||
-rw-r--r-- | src/game/g_weapon.c | 4 | ||||
-rw-r--r-- | src/game/q_math.c | 6 |
17 files changed, 50 insertions, 159 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 9c756e54..498db049 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -18,6 +18,12 @@ #include "q_shared.h" #include "bg_public.h" +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ); +void trap_FS_Read( void *buffer, int len, fileHandle_t f ); +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ); +void trap_FS_FCloseFile( fileHandle_t f ); +void trap_FS_Seek( fileHandle_t f, long offset, fsOrigin_t origin ); // fsOrigin_t + buildableAttributes_t bg_buildableList[ ] = { { @@ -1261,7 +1267,6 @@ static qboolean BG_ParseBuildableFile( const char *filename, buildableAttributeO char *token; char text[ 20000 ]; fileHandle_t f; - float scale = 0.0f; // load the file @@ -4479,7 +4484,6 @@ and after local prediction on the client void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap ) { int i; - vec3_t ceilingNormal = { 0, 0, -1 }; if( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR || ps->pm_type == PM_FREEZE ) s->eType = ET_INVISIBLE; @@ -4584,7 +4588,6 @@ and after local prediction on the client void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap ) { int i; - vec3_t ceilingNormal = { 0, 0, -1 }; if( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR || ps->pm_type == PM_FREEZE ) s->eType = ET_INVISIBLE; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index b2606c23..b28366be 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -344,7 +344,6 @@ static float PM_CmdScale( usercmd_t *cmd ) float total; float scale; float modifier = 1.0f; - int aForward, aRight; if( pm->ps->stats[ STAT_PTEAM ] == PTE_HUMANS && pm->ps->pm_type == PM_NORMAL ) { @@ -545,7 +544,7 @@ PM_CheckWallJump */ static qboolean PM_CheckWallJump( void ) { - vec3_t dir, forward, right, temp; + vec3_t dir, forward, right; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; float normalFraction = 1.5f; float cmdFraction = 1.0f; @@ -1025,34 +1024,6 @@ static void PM_AirMove( void ) /* =================== -PM_GrappleMove - -=================== -*/ -static void PM_GrappleMove( void ) -{ - vec3_t vel, v; - float vlen; - - VectorScale( pml.forward, -16, v ); - VectorAdd( pm->ps->grapplePoint, v, v ); - VectorSubtract( v, pm->ps->origin, vel ); - vlen = VectorLength( vel ); - VectorNormalize( vel ); - - if( vlen <= 100 ) - VectorScale( vel, 10 * vlen, vel ); - else - VectorScale( vel, 800, vel ); - - VectorCopy( vel, pm->ps->velocity ); - - pml.groundPlane = qfalse; -} - - -/* -=================== PM_ClimbMove =================== @@ -2009,11 +1980,10 @@ PM_GroundTrace */ static void PM_GroundTrace( void ) { - vec3_t point, srotAxis; + vec3_t point; vec3_t movedir; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; trace_t trace; - float srotAngle; if( BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_WALLCLIMBER ) ) { diff --git a/src/game/g_active.c b/src/game/g_active.c index 820586d9..b12f1e41 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -507,7 +507,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) //client is charging up for a pounce if( client->ps.weapon == WP_ALEVEL3 || client->ps.weapon == WP_ALEVEL3_UPG ) { - int pounceSpeed; + int pounceSpeed = 0; if( client->ps.weapon == WP_ALEVEL3 ) pounceSpeed = LEVEL3_POUNCE_SPEED; @@ -641,7 +641,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { int i; int seconds = ( ( level.time - client->lastPoisonTime ) / 1000 ) + 1; - int damage = ALIEN_POISON_DMG, damage2; + int damage = ALIEN_POISON_DMG, damage2 = 0; for( i = 0; i < seconds; i++ ) { @@ -662,7 +662,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { int entityList[ MAX_GENTITIES ]; vec3_t range = { LEVEL4_REGEN_RANGE, LEVEL4_REGEN_RANGE, LEVEL4_REGEN_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; gentity_t *alienPlayer; float modifier = 1.0f; @@ -743,13 +743,12 @@ but any server game effects are handled here */ void ClientEvents( gentity_t *ent, int oldEventSequence ) { - int i, j; + int i; int event; gclient_t *client; int damage; vec3_t dir; vec3_t point, mins; - gentity_t *drop; float fallDistance; pClass_t class; @@ -842,56 +841,6 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) } } -/* -============== -StuckInOtherClient -============== -*/ -static int StuckInOtherClient( gentity_t *ent ) -{ - int i; - gentity_t *ent2; - - ent2 = &g_entities[ 0 ]; - - for( i = 0; i < MAX_CLIENTS; i++, ent2++ ) - { - if( ent2 == ent ) - continue; - - if( !ent2->inuse ) - continue; - - if( !ent2->client ) - continue; - - if( ent2->health <= 0 ) - continue; - - // - if( ent2->r.absmin[ 0 ] > ent->r.absmax[ 0 ] ) - continue; - - if( ent2->r.absmin[ 1 ] > ent->r.absmax[ 1 ] ) - continue; - - if( ent2->r.absmin[ 2 ] > ent->r.absmax[ 2 ] ) - continue; - - if( ent2->r.absmax[ 0 ] < ent->r.absmin[ 0 ] ) - continue; - - if( ent2->r.absmax[ 1 ] < ent->r.absmin[ 1 ] ) - continue; - - if( ent2->r.absmax[ 2 ] < ent->r.absmin[ 2 ] ) - continue; - - return qtrue; - } - - return qfalse; -} /* ============== @@ -948,7 +897,6 @@ void ClientThink_real( gentity_t *ent ) int oldEventSequence; int msec; usercmd_t *ucmd; - float speed; client = ent->client; @@ -1252,7 +1200,7 @@ void ClientThink_real( gentity_t *ent ) int entityList[ MAX_GENTITIES ]; vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; int j; qboolean upgrade = qfalse; @@ -1463,7 +1411,6 @@ while a slow client may have multiple ClientEndFrame between ClientThink. */ void ClientEndFrame( gentity_t *ent ) { - int i; clientPersistant_t *pers; if( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index f74715ba..e24edc57 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -117,7 +117,7 @@ static qboolean findPower( gentity_t *self ) { int i; gentity_t *ent; - gentity_t *closestPower; + gentity_t *closestPower = NULL; int distance = 0; int minDistance = 10000; vec3_t temp_v; @@ -204,7 +204,7 @@ static qboolean findDCC( gentity_t *self ) { int i; gentity_t *ent; - gentity_t *closestDCC; + gentity_t *closestDCC = NULL; int distance = 0; int minDistance = 10000; vec3_t temp_v; @@ -333,7 +333,7 @@ static qboolean findCreep( gentity_t *self ) { int i; gentity_t *ent; - gentity_t *closestSpawn; + gentity_t *closestSpawn = NULL; int distance = 0; int minDistance = 10000; vec3_t temp_v; @@ -1264,7 +1264,6 @@ Used by ADef2_Think to fire at enemy void ADef_FireOnEnemy( gentity_t *self, int firespeed ) { vec3_t dirToTarget; - vec3_t target; vec3_t halfAcceleration, thirdJerk; float distanceToTarget = BG_FindRangeForBuildable( self->s.modelindex ); int i; @@ -1469,7 +1468,6 @@ Use for human power repeater void HRpt_Use( gentity_t *self, gentity_t *other, gentity_t *activator ) { int maxAmmo, maxClips; - int ammo, clips; weapon_t weapon; playerState_t *ps = &activator->client->ps; @@ -1864,7 +1862,6 @@ void HMGTurret_FindEnemy( gentity_t *self ) int entityList[ MAX_GENTITIES ]; vec3_t range; vec3_t mins, maxs; - vec3_t dir; int i, num; gentity_t *target; @@ -2338,7 +2335,7 @@ qboolean G_BuildableRange( vec3_t origin, float r, buildable_t buildable ) { int entityList[ MAX_GENTITIES ]; vec3_t range; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; gentity_t *ent; @@ -2374,9 +2371,7 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance trace_t tr1, tr2, tr3; int i; itemBuildError_t reason = IBE_NONE; - gentity_t *tempent, *closestPower; - int minDistance = 10000; - int templength; + gentity_t *tempent; float minNormal; qboolean invert; int contents; @@ -2715,10 +2710,10 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin if( built->s.generic1 < 0 ) built->s.generic1 = 0; - if( built->powered = findPower( built ) ) + if( ( built->powered = findPower( built ) ) ) built->s.generic1 |= B_POWERED_TOGGLEBIT; - if( built->dcced = findDCC( built ) ) + if( ( built->dcced = findDCC( built ) ) ) built->s.generic1 |= B_DCCED_TOGGLEBIT; built->s.generic1 &= ~B_SPAWNED_TOGGLEBIT; @@ -2744,7 +2739,6 @@ G_ValidateBuild */ qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable ) { - weapon_t weapon; float dist; vec3_t origin; @@ -2827,6 +2821,9 @@ qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable ) G_TriggerMenu( ent->client->ps.clientNum, MN_H_RPTWARN ); G_buildItem( ent, buildable, origin, ent->s.apos.trBase ); return qtrue; + + default: + break; } return qfalse; diff --git a/src/game/g_client.c b/src/game/g_client.c index 25bf0dac..0cc6ab05 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -431,7 +431,7 @@ Chooses a player start, deathmatch start, etc */ gentity_t *SelectTremulousSpawnPoint( pTeam_t team, vec3_t origin, vec3_t angles ) { - gentity_t *spot; + gentity_t *spot = NULL; if( team == PTE_ALIENS ) spot = SelectAlienSpawnPoint( ); @@ -623,7 +623,6 @@ void SpawnCorpse( gentity_t *ent ) int contents; vec3_t origin, dest; trace_t tr; - int i; float vDiff; VectorCopy( ent->r.currentOrigin, origin ); @@ -756,8 +755,6 @@ respawn */ void respawn( gentity_t *ent ) { - gentity_t *tent; - SpawnCorpse( ent ); //TA: Clients can't respawn - they must go thru the class cmd @@ -948,7 +945,7 @@ if desired. void ClientUserinfoChanged( int clientNum ) { gentity_t *ent; - int teamTask, teamLeader, team, health; + int teamTask, teamLeader, health; char *s; char model[ MAX_QPATH ]; char buffer[ MAX_QPATH ]; @@ -1244,14 +1241,13 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles clientPersistant_t saved; clientSession_t savedSess; int persistant[ MAX_PERSISTANT ]; - gentity_t *spawnPoint; + gentity_t *spawnPoint = NULL; int flags; int savedPing; - int ammoIndex, ammoSubIndex; int teamLocal; int eventSequence; char userinfo[ MAX_INFO_STRING ]; - vec3_t classMins, classMaxs, up = { 0.0f, 0.0f, 1.0f }; + vec3_t up = { 0.0f, 0.0f, 1.0f }; int ammo, clips, maxClips; weapon_t weapon; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 35bc1e5c..e8bf564f 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -238,8 +238,6 @@ void Cmd_Give_f( gentity_t *ent ) char *name; int i; qboolean give_all; - gentity_t *it_ent; - trace_t trace; if( !CheatsOk( ent ) ) return; @@ -1084,15 +1082,10 @@ Cmd_Class_f void Cmd_Class_f( gentity_t *ent ) { char s[ MAX_TOKEN_CHARS ]; - qboolean dontSpawn = qfalse; int clientNum; - gentity_t *spawn; - vec3_t spawn_origin, spawn_angles; - vec3_t up = { 0.0f, 0.0f, 1.0f }; - int length = 4096; int i; trace_t tr, tr2; - vec3_t infestOrigin, infestAngles; + vec3_t infestOrigin; int allowedClasses[ PCL_NUM_CLASSES ]; int numClasses = 0; @@ -1102,7 +1095,7 @@ void Cmd_Class_f( gentity_t *ent ) int entityList[ MAX_GENTITIES ]; vec3_t range = { AS_OVER_RT3, AS_OVER_RT3, AS_OVER_RT3 }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int num; gentity_t *other; @@ -1573,8 +1566,6 @@ void Cmd_Buy_f( gentity_t *ent ) } else if( upgrade != UP_NONE ) { - weapon_t weaponAmmo; - //already got this? if( BG_InventoryContainsUpgrade( upgrade, ent->client->ps.stats ) ) { @@ -1689,7 +1680,6 @@ void Cmd_Sell_f( gentity_t *ent ) char s[ MAX_TOKEN_CHARS ]; int i; int weapon, upgrade; - int quan, clips, maxClips; trap_Argv( 1, s, sizeof( s ) ); @@ -1852,9 +1842,7 @@ Cmd_Build_f void Cmd_Build_f( gentity_t *ent ) { char s[ MAX_TOKEN_CHARS ]; - char s1[ MAX_TOKEN_CHARS ]; buildable_t buildable; - weapon_t weapon; float dist; vec3_t origin; pTeam_t team; @@ -1917,6 +1905,9 @@ void Cmd_Build_f( gentity_t *ent ) case IBE_NODCC: G_TriggerMenu( ent->client->ps.clientNum, MN_H_NODCC ); break; + + default: + break; } } else @@ -2252,7 +2243,7 @@ void Cmd_Evolve_Debug_f( gentity_t *ent ) int entityList[ MAX_GENTITIES ]; vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; int j; qboolean upgrade = qfalse; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index d89adadc..9d13fd16 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -149,7 +149,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int { gentity_t *ent; int anim; - int contents; int killer; int i, j; char *killerName, *obit; @@ -323,7 +322,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int for( i = 0; i < unclaimedFrags; i++ ) { int maximum = 0; - int topClient; + int topClient = 0; for( j = 0; j < MAX_CLIENTS; j++ ) { @@ -902,9 +901,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, gclient_t *client; int take; int save; - int asave; + int asave = 0; int knockback; - int max; if( !targ->takedamage ) return; diff --git a/src/game/g_local.h b/src/game/g_local.h index b974cf7d..4a12e3c0 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -693,6 +693,8 @@ const char *BuildShaderStateConfig(); void G_TriggerMenu( int clientNum, dynMenu_t menu ); void G_CloseMenus( int clientNum ); +qboolean G_Visible( gentity_t *ent1, gentity_t *ent2 ); + // // g_combat.c // @@ -740,6 +742,7 @@ gentity_t *launch_grenade( gentity_t *self, vec3_t start, vec3_t dir ); // void G_RunMover( gentity_t *ent ); void Touch_DoorTrigger( gentity_t *ent, gentity_t *other, trace_t *trace ); +void manualTriggerSpectator( gentity_t *trigger, gentity_t *player ); // // g_trigger.c diff --git a/src/game/g_main.c b/src/game/g_main.c index 239b46d9..77de3f01 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -860,8 +860,8 @@ void G_SpawnClients( pTeam_t team ) int clientNum; gentity_t *ent, *spawn; vec3_t spawn_origin, spawn_angles; - spawnQueue_t *sq; - int numSpawns; + spawnQueue_t *sq = NULL; + int numSpawns = 0; if( team == PTE_ALIENS ) { @@ -935,7 +935,6 @@ Recalculate the quantity of building points available to the teams void G_CalculateBuildPoints( void ) { int i; - int bclass; buildable_t buildable; gentity_t *ent; int localHTP = g_humanBuildPoints.integer, @@ -1578,8 +1577,6 @@ can see the last frag. */ void CheckExitRules( void ) { - int i; - gclient_t *cl; char s[ MAX_STRING_CHARS ]; trap_Cvar_VariableStringBuffer( "mapname", s, sizeof( s ) ); diff --git a/src/game/g_maprotation.c b/src/game/g_maprotation.c index b5f55522..c6010c34 100644 --- a/src/game/g_maprotation.c +++ b/src/game/g_maprotation.c @@ -78,7 +78,7 @@ static qboolean G_ParseMapRotation( mapRotation_t *mr, char **text_p ) { char *token; qboolean mnSet = qfalse; - mapRotationEntry_t *mre; + mapRotationEntry_t *mre = NULL; mapRotationCondition_t *mrc; // read optional parameters diff --git a/src/game/g_misc.c b/src/game/g_misc.c index 21c918d0..3c5314b4 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -264,8 +264,6 @@ Spawn function for spriter */ void SP_misc_spriter( gentity_t *self ) { - vec3_t accel; - G_SetOrigin( self, self->s.origin ); //set a bunch of stuff to be visible client side diff --git a/src/game/g_mover.c b/src/game/g_mover.c index 82de7360..822b8129 100644 --- a/src/game/g_mover.c +++ b/src/game/g_mover.c @@ -528,6 +528,9 @@ void SetMoverState( gentity_t *ent, moverState_t moverState, int time ) case MODEL_POS2: break; + + default: + break; } if( moverState >= MOVER_POS1 && moverState <= MOVER_2TO1 ) @@ -1604,15 +1607,11 @@ NOMONSTER monsters will not trigger this door */ void SP_func_door_model( gentity_t *ent ) { - vec3_t abs_movedir; - float distance; - vec3_t size; char *s; float light; vec3_t color; qboolean lightSet, colorSet; char *sound; - gentity_t *door; gentity_t *clipBrush; G_SpawnString( "sound2to1", "sound/movers/doors/dr1_strt.wav", &s ); diff --git a/src/game/g_physics.c b/src/game/g_physics.c index 856fcadb..63abaf9e 100644 --- a/src/game/g_physics.c +++ b/src/game/g_physics.c @@ -28,7 +28,7 @@ static void G_Bounce( gentity_t *ent, trace_t *trace ) float dot; int hitTime; float minNormal; - qboolean invert; + qboolean invert = qfalse; // reflect the velocity on the trace plane hitTime = level.previousTime + ( level.time - level.previousTime ) * trace->fraction; diff --git a/src/game/g_ptr.c b/src/game/g_ptr.c index ba8c095a..861f4b87 100644 --- a/src/game/g_ptr.c +++ b/src/game/g_ptr.c @@ -67,11 +67,9 @@ connectionRecord_t *G_GenerateNewConnection( gclient_t *client ) { int code = 0; int i; - qtime_t time; // this should be really random - trap_RealTime( &time ); - srand( time.tm_sec + time.tm_min + time.tm_hour ); + srand( trap_Milliseconds( ) ); // there is a very very small possibility that this // will loop infinitely diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index f31c9dde..b737a8ab 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -479,10 +479,6 @@ void G_SpawnGEntityFromSpawnVars( void ) { int i; gentity_t *ent; - char *s, *value, *gametypeName; - static char *gametypeNames[ ] = { "ffa", "tournament", "single", - "team", "ctf", "oneflag", - "obelisk", "harvester", "teamtournament" }; // get the next free entity ent = G_Spawn( ); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index ddb5e0a7..aca895d6 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -514,7 +514,6 @@ void teslaFire( gentity_t *ent ) trace_t tr; vec3_t end; gentity_t *traceEnt, *tent; - int i, passent; VectorMA( muzzle, TESLAGEN_RANGE, forward, end ); @@ -696,7 +695,6 @@ qboolean CheckVenomAttack( gentity_t *ent ) vec3_t end; gentity_t *tent; gentity_t *traceEnt; - int damage; vec3_t mins, maxs; VectorSet( mins, -LEVEL0_BITE_WIDTH, -LEVEL0_BITE_WIDTH, -LEVEL0_BITE_WIDTH ); @@ -809,7 +807,7 @@ void poisonCloud( gentity_t *ent ) { int entityList[ MAX_GENTITIES ]; vec3_t range = { LEVEL1_PCLOUD_RANGE, LEVEL1_PCLOUD_RANGE, LEVEL1_PCLOUD_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; gentity_t *humanPlayer; trace_t tr; diff --git a/src/game/q_math.c b/src/game/q_math.c index cbc7fdac..2600459c 100644 --- a/src/game/q_math.c +++ b/src/game/q_math.c @@ -465,7 +465,7 @@ TA: takes an axis (forward + right + up) */ void AxisToAngles( vec3_t axis[3], vec3_t angles ) { float length1; - float yaw, pitch, roll; + float yaw, pitch, roll = 0.0f; if ( axis[0][1] == 0 && axis[0][0] == 0 ) { yaw = 0; @@ -1362,8 +1362,8 @@ Distance from a point to some line */ float pointToLineDistance( const vec3_t p0, const vec3_t p1, const vec3_t p2 ) { - vec3_t v, w, x, y; - float c1, c2, b; + vec3_t v, w, y; + float c1, c2; VectorSubtract( p2, p1, v ); VectorSubtract( p1, p0, w ); |