Fix various warnings
This commit is contained in:
1 parent
549b686e22
commit
f976711fb4
58 files changed
+384
-425
No files matched your search
@@ -618,9 +618,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||
GibEntity( self, killer );
|
||||
} else {
|
||||
// normal death
|
||||
static int i;
|
||||
static int lastDeath;
|
||||
|
||||
switch ( i ) {
|
||||
switch ( lastDeath ) {
|
||||
case 0:
|
||||
anim = BOTH_DEATH1;
|
||||
break;
|
||||
@@ -644,13 +644,13 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||
self->client->ps.torsoAnim =
|
||||
( ( self->client->ps.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | anim;
|
||||
|
||||
G_AddEvent( self, EV_DEATH1 + i, killer );
|
||||
G_AddEvent( self, EV_DEATH1 + lastDeath, killer );
|
||||
|
||||
// the body can still be gibbed
|
||||
self->die = body_die;
|
||||
|
||||
// globally cycle through the different death animations
|
||||
i = ( i + 1 ) % 3;
|
||||
lastDeath = ( lastDeath + 1 ) % 3;
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if (self->s.eFlags & EF_KAMIKAZE) {
|
||||
|
||||
+2
-2
@@ -690,8 +690,8 @@ void FinishSpawningItem( gentity_t *ent ) {
|
||||
G_SetOrigin( ent, tr.endpos );
|
||||
}
|
||||
|
||||
// team slaves and targeted items aren't present at start
|
||||
if ( ( ent->flags & FL_TEAMSLAVE ) || ent->targetname ) {
|
||||
// team members and targeted items aren't present at start
|
||||
if ( ( ent->flags & FL_TEAMMEMBER ) || ent->targetname ) {
|
||||
ent->s.eFlags |= EF_NODRAW;
|
||||
ent->r.contents = 0;
|
||||
return;
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
// gentity->flags
|
||||
#define FL_GODMODE 0x00000010
|
||||
#define FL_NOTARGET 0x00000020
|
||||
#define FL_TEAMSLAVE 0x00000400 // not the first on the team
|
||||
#define FL_TEAMMEMBER 0x00000400 // not the first on the team
|
||||
#define FL_NO_KNOCKBACK 0x00000800
|
||||
#define FL_DROPPED_ITEM 0x00001000
|
||||
#define FL_NO_BOTS 0x00002000 // spawn point not for bot use
|
||||
|
||||
+5
-5
@@ -266,7 +266,7 @@ G_FindTeams
|
||||
Chain together all entities with a matching team field.
|
||||
Entity teams are used for item groups and multi-entity mover groups.
|
||||
|
||||
All but the first will have the FL_TEAMSLAVE flag set and teammaster field set
|
||||
All but the first will have the FL_TEAMMEMBER flag set and teammaster field set
|
||||
All but the last will have the teamchain field set to the next one
|
||||
================
|
||||
*/
|
||||
@@ -282,7 +282,7 @@ void G_FindTeams( void ) {
|
||||
continue;
|
||||
if (!e->team)
|
||||
continue;
|
||||
if (e->flags & FL_TEAMSLAVE)
|
||||
if (e->flags & FL_TEAMMEMBER)
|
||||
continue;
|
||||
e->teammaster = e;
|
||||
c++;
|
||||
@@ -293,7 +293,7 @@ void G_FindTeams( void ) {
|
||||
continue;
|
||||
if (!e2->team)
|
||||
continue;
|
||||
if (e2->flags & FL_TEAMSLAVE)
|
||||
if (e2->flags & FL_TEAMMEMBER)
|
||||
continue;
|
||||
if (!strcmp(e->team, e2->team))
|
||||
{
|
||||
@@ -301,7 +301,7 @@ void G_FindTeams( void ) {
|
||||
e2->teamchain = e->teamchain;
|
||||
e->teamchain = e2;
|
||||
e2->teammaster = e;
|
||||
e2->flags |= FL_TEAMSLAVE;
|
||||
e2->flags |= FL_TEAMMEMBER;
|
||||
|
||||
// make sure that targets only point at the master
|
||||
if ( e2->targetname ) {
|
||||
@@ -540,7 +540,7 @@ void G_ShutdownGame( int restart ) {
|
||||
|
||||
//===================================================================
|
||||
|
||||
void QDECL Com_Error ( int level, const char *error, ... ) {
|
||||
void QDECL Com_Error ( int logLevel, const char *error, ... ) {
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
||||
|
||||
+8
-8
@@ -424,7 +424,7 @@ void G_MoverTeam( gentity_t *ent ) {
|
||||
|
||||
obstacle = NULL;
|
||||
|
||||
// make sure all team slaves can move before committing
|
||||
// make sure all team members can move before committing
|
||||
// any moves or calling any think functions
|
||||
// if the move is blocked, all moved objects will be backed out
|
||||
pushed_p = pushed;
|
||||
@@ -478,7 +478,7 @@ G_RunMover
|
||||
void G_RunMover( gentity_t *ent ) {
|
||||
// if not a team captain, don't do anything, because
|
||||
// the captain will handle everything
|
||||
if ( ent->flags & FL_TEAMSLAVE ) {
|
||||
if ( ent->flags & FL_TEAMMEMBER ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -550,10 +550,10 @@ in the same amount of time
|
||||
================
|
||||
*/
|
||||
void MatchTeam( gentity_t *teamLeader, int moverState, int time ) {
|
||||
gentity_t *slave;
|
||||
gentity_t *member;
|
||||
|
||||
for ( slave = teamLeader ; slave ; slave = slave->teamchain ) {
|
||||
SetMoverState( slave, moverState, time );
|
||||
for ( member = teamLeader ; member ; member = member->teamchain ) {
|
||||
SetMoverState( member, moverState, time );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -634,7 +634,7 @@ void Use_BinaryMover( gentity_t *ent, gentity_t *other, gentity_t *activator ) {
|
||||
int partial;
|
||||
|
||||
// only the master should be used
|
||||
if ( ent->flags & FL_TEAMSLAVE ) {
|
||||
if ( ent->flags & FL_TEAMMEMBER ) {
|
||||
Use_BinaryMover( ent->teammaster, other, activator );
|
||||
return;
|
||||
}
|
||||
@@ -885,7 +885,7 @@ void Think_SpawnNewDoorTrigger( gentity_t *ent ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// set all of the slaves as shootable
|
||||
// set all of the members as shootable
|
||||
for ( other = ent ; other ; other = other->teamchain ) {
|
||||
other->takedamage = qtrue;
|
||||
}
|
||||
@@ -997,7 +997,7 @@ void SP_func_door (gentity_t *ent) {
|
||||
|
||||
ent->nextthink = level.time + FRAMETIME;
|
||||
|
||||
if ( ! (ent->flags & FL_TEAMSLAVE ) ) {
|
||||
if ( ! (ent->flags & FL_TEAMMEMBER ) ) {
|
||||
int health;
|
||||
|
||||
G_SpawnInt( "health", "0", &health );
|
||||
|
||||
+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