Fix various warnings
This commit is contained in:
1 parent
549b686e22
commit
f976711fb4
58 files changed
+384
-425
No files matched your search
+11
-11
@@ -322,22 +322,22 @@ void ShotgunPattern( vec3_t origin, vec3_t origin2, int seed, gentity_t *ent ) {
|
||||
int i;
|
||||
float r, u;
|
||||
vec3_t end;
|
||||
vec3_t forward, right, up;
|
||||
vec3_t localForward, localRight, localUp;
|
||||
qboolean hitClient = qfalse;
|
||||
|
||||
// derive the right and up vectors from the forward vector, because
|
||||
// the client won't have any other information
|
||||
VectorNormalize2( origin2, forward );
|
||||
PerpendicularVector( right, forward );
|
||||
CrossProduct( forward, right, up );
|
||||
VectorNormalize2( origin2, localForward );
|
||||
PerpendicularVector( localRight, localForward );
|
||||
CrossProduct( localForward, localRight, localUp );
|
||||
|
||||
// generate the "random" spread pattern
|
||||
for ( i = 0 ; i < DEFAULT_SHOTGUN_COUNT ; i++ ) {
|
||||
r = Q_crandom( &seed ) * DEFAULT_SHOTGUN_SPREAD * 16;
|
||||
u = Q_crandom( &seed ) * DEFAULT_SHOTGUN_SPREAD * 16;
|
||||
VectorMA( origin, 8192 * 16, forward, end);
|
||||
VectorMA (end, r, right, end);
|
||||
VectorMA (end, u, up, end);
|
||||
VectorMA( origin, 8192 * 16, localForward, end);
|
||||
VectorMA (end, r, localRight, end);
|
||||
VectorMA (end, u, localUp, end);
|
||||
if( ShotgunPellet( origin, end, ent ) && !hitClient ) {
|
||||
hitClient = qtrue;
|
||||
ent->client->accuracy_hits++;
|
||||
@@ -769,10 +769,10 @@ CalcMuzzlePoint
|
||||
set muzzle location relative to pivoting eye
|
||||
===============
|
||||
*/
|
||||
void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) {
|
||||
void CalcMuzzlePoint ( gentity_t *ent, vec3_t localForward, vec3_t localRight, vec3_t localUp, vec3_t muzzlePoint ) {
|
||||
VectorCopy( ent->s.pos.trBase, muzzlePoint );
|
||||
muzzlePoint[2] += ent->client->ps.viewheight;
|
||||
VectorMA( muzzlePoint, 14, forward, muzzlePoint );
|
||||
VectorMA( muzzlePoint, 14, localForward, muzzlePoint );
|
||||
// snap to integer coordinates for more efficient network bandwidth usage
|
||||
SnapVector( muzzlePoint );
|
||||
}
|
||||
@@ -784,10 +784,10 @@ CalcMuzzlePointOrigin
|
||||
set muzzle location relative to pivoting eye
|
||||
===============
|
||||
*/
|
||||
void CalcMuzzlePointOrigin ( gentity_t *ent, vec3_t origin, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) {
|
||||
void CalcMuzzlePointOrigin ( gentity_t *ent, vec3_t origin, vec3_t localForward, vec3_t localRight, vec3_t localUp, vec3_t muzzlePoint ) {
|
||||
VectorCopy( ent->s.pos.trBase, muzzlePoint );
|
||||
muzzlePoint[2] += ent->client->ps.viewheight;
|
||||
VectorMA( muzzlePoint, 14, forward, muzzlePoint );
|
||||
VectorMA( muzzlePoint, 14, localForward, muzzlePoint );
|
||||
// snap to integer coordinates for more efficient network bandwidth usage
|
||||
SnapVector( muzzlePoint );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user