Fixed warnings on Linux 64 bit.

This commit is contained in:
zturtleman 2011-03-08 10:19:47 +00:00
parent d1375979d3
commit d23bba3879
8 changed files with 17 additions and 44 deletions

View file

@ -1893,7 +1893,6 @@ Q3GOBJ_ = \
$(B)/baseq3r/game/g_rally_hazard.o \
$(B)/baseq3r/game/g_rally_mapents.o \
$(B)/baseq3r/game/g_rally_mapobjects.o \
$(B)/baseq3r/game/g_rally_object_physics.o \
$(B)/baseq3r/game/g_rally_observer_cams.o \
$(B)/baseq3r/game/g_rally_racetools.o \
$(B)/baseq3r/game/g_rally_rearweapon.o \

View file

@ -2732,14 +2732,14 @@ bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl) {
trap_EA_MoveForward( bs->entitynum );
return moveresult;
// END
if (trap_BotMoveInDirection(bs->ms, forward, 400, movetype)) return moveresult;
// if (trap_BotMoveInDirection(bs->ms, forward, 400, movetype)) return moveresult;
}
if (dist < attack_dist - attack_range) {
// STONELANCE
trap_EA_MoveBack( bs->entitynum );
return moveresult;
// END
if (trap_BotMoveInDirection(bs->ms, backward, 400, movetype)) return moveresult;
// if (trap_BotMoveInDirection(bs->ms, backward, 400, movetype)) return moveresult;
}
return moveresult;
}
@ -2785,11 +2785,11 @@ bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl) {
trap_EA_MoveForward( bs->entitynum );
return moveresult;
// END
if (trap_BotMoveInDirection(bs->ms, sideward, 400, movetype))
return moveresult;
// if (trap_BotMoveInDirection(bs->ms, sideward, 400, movetype))
// return moveresult;
//movement failed, flip the strafe direction
bs->flags ^= BFL_STRAFERIGHT;
bs->attackstrafe_time = 0;
// bs->flags ^= BFL_STRAFERIGHT;
// bs->attackstrafe_time = 0;
}
//bot couldn't do any usefull movement
// bs->attackchase_time = AAS_Time() + 6;

View file

@ -925,7 +925,7 @@ void BotTestAAS(vec3_t origin);
extern level_locals_t level;
extern gentity_t g_entities[MAX_GENTITIES];
#define FOFS(x) ((int)&(((gentity_t *)0)->x))
#define FOFS(x) ((size_t)&(((gentity_t *)0)->x))
extern vmCvar_t g_gametype;
extern vmCvar_t g_dedicated;

View file

@ -1,23 +0,0 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2009 Q3Rally Team (Per Thormann - perle@q3rally.com)
This file is part of q3rally source code.
q3rally source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
q3rally source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with q3rally; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -55,7 +55,7 @@ void G_WriteClientSessionData( gclient_t *client ) {
client->sess.teamLeader
);
var = va( "session%i", client - level.clients );
var = va( "session%i", (int)(client - level.clients) );
trap_Cvar_Set( var, s );
}
@ -70,26 +70,23 @@ Called on a reconnect
void G_ReadSessionData( gclient_t *client ) {
char s[MAX_STRING_CHARS];
const char *var;
// bk001205 - format
int teamLeader;
int spectatorState;
int sessionTeam;
var = va( "session%i", client - level.clients );
var = va( "session%i", (int)(client - level.clients) );
trap_Cvar_VariableStringBuffer( var, s, sizeof(s) );
sscanf( s, "%i %i %i %i %i %i %i",
&sessionTeam, // bk010221 - format
&sessionTeam,
&client->sess.spectatorTime,
&spectatorState, // bk010221 - format
&spectatorState,
&client->sess.spectatorClient,
&client->sess.wins,
&client->sess.losses,
&teamLeader // bk010221 - format
&teamLeader
);
// bk001205 - format issues
client->sess.sessionTeam = (team_t)sessionTeam;
client->sess.spectatorState = (spectatorState_t)spectatorState;
client->sess.teamLeader = (qboolean)teamLeader;

View file

@ -208,7 +208,7 @@ void SP_team_blueobelisk( gentity_t *ent );
void SP_team_redobelisk( gentity_t *ent );
void SP_team_neutralobelisk( gentity_t *ent );
#endif
void SP_item_botroam( gentity_t *ent ) {};
void SP_item_botroam( gentity_t *ent ) { }
// STONELANCE
void SP_rally_startfinish( gentity_t *ent );
@ -320,7 +320,7 @@ spawn_t spawns[] = {
{"rally_scripted_object", SP_rally_scripted_object},
// END
{0, 0}
{NULL, 0}
};
/*

View file

@ -55,7 +55,7 @@ void AddRemap(const char *oldShader, const char *newShader, float timeOffset) {
}
}
const char *BuildShaderStateConfig() {
const char *BuildShaderStateConfig(void) {
static char buff[MAX_STRING_CHARS*4];
char out[(MAX_QPATH * 2) + 5];
int i;

View file

@ -1210,9 +1210,9 @@ void Cvar_Update( vmCvar_t *vmCvar ) {
}
vmCvar->modificationCount = cv->modificationCount;
if ( strlen(cv->string)+1 > MAX_CVAR_VALUE_STRING )
Com_Error( ERR_DROP, "Cvar_Update: src %s length %d exceeds MAX_CVAR_VALUE_STRING",
Com_Error( ERR_DROP, "Cvar_Update: src %s length %u exceeds MAX_CVAR_VALUE_STRING",
cv->string,
strlen(cv->string));
(unsigned int) strlen(cv->string));
Q_strncpyz( vmCvar->string, cv->string, MAX_CVAR_VALUE_STRING );
vmCvar->value = cv->value;