Sync Engine and Game VM code to ioquake3

Mostly whitespace changes. No bug fixes.
Q3Rally doesn't change any botlib code so revert copyright in botlib headers that use to be in the Q3 SDK game source directory.
MD3_MAX_* defines (besides MD3_MAX_LOD) are not used so revert to ioq3 values.
This commit is contained in:
zturtleman 2017-11-17 03:49:41 +00:00
parent 0e7ddc331a
commit 0081965385
23 changed files with 98 additions and 121 deletions

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -1,22 +1,21 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of q3rally source code.
This file is part of Quake III Arena source code.
q3rally source code is free software; you can redistribute it
Quake III Arena 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
Quake III Arena 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
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

View file

@ -4319,8 +4319,8 @@ int BotGetActivateGoal(bot_state_t *bs, int entitynum, bot_activategoal_t *activ
}
// store any remaining areas
for (i = 0; i < numareas; i++) {
if (activategoal->numareas >= MAX_ACTIVATEAREAS)
break;
if (activategoal->numareas >= MAX_ACTIVATEAREAS)
break;
if ( trap_AAS_AreaReachability(areas[i]) ) {
continue;
}

View file

@ -931,7 +931,7 @@ void BotInputToUserCommand(bot_input_t *bi, usercmd_t *ucmd, int delta_angles[3]
/*
//jump/moveup
if (bi->actionflags & ACTION_JUMP) ucmd->upmove = 127;
//crouch/movedown
//crouch/movedown
if (bi->actionflags & ACTION_CROUCH) ucmd->upmove = -127;
*/
// END

View file

@ -958,7 +958,6 @@ void SendPendingPredictableEvents( playerState_t *ps ) {
}
}
/*
==============
ClientThink
@ -985,7 +984,7 @@ void ClientThink_real( gentity_t *ent ) {
// END
client = ent->client;
// don't think if the client is not yet connected (and thus not yet spawned in)
if (client->pers.connected != CON_CONNECTED) {
return;
@ -1001,7 +1000,7 @@ void ClientThink_real( gentity_t *ent ) {
if ( ucmd->serverTime < level.time - 1000 ) {
ucmd->serverTime = level.time - 1000;
// G_Printf("serverTime >>>>>\n" );
}
}
msec = ucmd->serverTime - client->ps.commandTime;
// following others may result in bad times, but we still want
@ -1037,7 +1036,7 @@ void ClientThink_real( gentity_t *ent ) {
}
// spectators don't do much
if ( client->sess.sessionTeam == TEAM_SPECTATOR ){
if ( client->sess.sessionTeam == TEAM_SPECTATOR ) {
if ( client->sess.spectatorState == SPECTATOR_SCOREBOARD ) {
return;
}
@ -1332,21 +1331,21 @@ void ClientThink_real( gentity_t *ent ) {
VectorCopy( client->ps.origin, client->oldOrigin );
#ifdef MISSIONPACK
if (level.intermissionQueued != 0 && g_singlePlayer.integer) {
if ( level.time - level.intermissionQueued >= 1000 ) {
pm.cmd.buttons = 0;
pm.cmd.forwardmove = 0;
pm.cmd.rightmove = 0;
pm.cmd.upmove = 0;
if ( level.time - level.intermissionQueued >= 2000 && level.time - level.intermissionQueued <= 2500 ) {
trap_SendConsoleCommand( EXEC_APPEND, "centerview\n");
if (level.intermissionQueued != 0 && g_singlePlayer.integer) {
if ( level.time - level.intermissionQueued >= 1000 ) {
pm.cmd.buttons = 0;
pm.cmd.forwardmove = 0;
pm.cmd.rightmove = 0;
pm.cmd.upmove = 0;
if ( level.time - level.intermissionQueued >= 2000 && level.time - level.intermissionQueued <= 2500 ) {
trap_SendConsoleCommand( EXEC_APPEND, "centerview\n");
}
ent->client->ps.pm_type = PM_SPINTERMISSION;
}
ent->client->ps.pm_type = PM_SPINTERMISSION;
}
}
Pmove (&pm);
Pmove (&pm);
#else
Pmove (&pm);
Pmove (&pm);
#endif
// STONELANCE

View file

@ -43,9 +43,8 @@ void UpdateTournamentInfo( void ) {
gentity_t *player;
int playerClientNum;
int n, accuracy, perfect, msglen;
int buflen;
#ifdef MISSIONPACK // bk001205
int score1, score2;
#ifdef MISSIONPACK
int score1, score2;
qboolean won;
#endif
char buf[32];
@ -127,8 +126,8 @@ void UpdateTournamentInfo( void ) {
for( i = 0; i < level.numNonSpectatorClients; i++ ) {
n = level.sortedClients[i];
Com_sprintf( buf, sizeof(buf), " %i %i %i", n, level.clients[n].ps.persistant[PERS_RANK], level.clients[n].ps.persistant[PERS_SCORE] );
buflen = strlen( buf );
if( msglen + buflen + 1 >= sizeof(msg) ) {
msglen += strlen( buf );
if( msglen >= sizeof(msg) ) {
break;
}
strcat( msg, buf );
@ -220,8 +219,6 @@ static void CelebrateStop( gentity_t *player ) {
else {
anim = TORSO_STAND;
}
player->s.torsoAnim = ( ( player->s.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | anim;
*/
// END

View file

@ -44,7 +44,6 @@ typedef struct {
int spawnTime;
} botSpawnQueue_t;
//static int botBeginDelay = 0; // bk001206 - unused, init
static botSpawnQueue_t botSpawnQueue[BOT_SPAWN_QUEUE_DEPTH];
vmCvar_t bot_minplayers;

View file

@ -789,7 +789,6 @@ static void ForceClientSkin( gclient_t *client, char *model, const char *skin )
}
*/
/*
===========
ClientCleanName
@ -1773,6 +1772,16 @@ void ClientDisconnect( int clientNum ) {
level.clients[ level.sortedClients[0] ].sess.wins++;
ClientUserinfoChanged( level.sortedClients[0] );
}
if( g_gametype.integer == GT_TOURNAMENT &&
ent->client->sess.sessionTeam == TEAM_FREE &&
level.intermissiontime ) {
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
level.restarted = qtrue;
level.changemap = NULL;
level.intermissiontime = 0;
}
*/
if ( ent->frontBounds ){

View file

@ -142,7 +142,7 @@ int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) {
clientNum = other->client->ps.clientNum;
trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) );
handicap = atof( Info_ValueForKey( userinfo, "handicap" ) );
if( handicap <= 0.0f || handicap > 100.0f ) {
if( handicap<=0.0f || handicap>100.0f) {
handicap = 100.0f;
}
max = (int)(2 * handicap);
@ -159,7 +159,7 @@ int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) {
clientNum = other->client->ps.clientNum;
trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) );
handicap = atof( Info_ValueForKey( userinfo, "handicap" ) );
if( handicap <= 0.0f || handicap > 100.0f ) {
if( handicap<=0.0f || handicap>100.0f) {
handicap = 100.0f;
}
other->client->pers.maxHealth = handicap;
@ -170,7 +170,7 @@ int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) {
clientNum = other->client->ps.clientNum;
trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) );
handicap = atof( Info_ValueForKey( userinfo, "handicap" ) );
if( handicap <= 0.0f || handicap > 100.0f ) {
if( handicap<=0.0f || handicap>100.0f) {
handicap = 100.0f;
}
other->client->pers.maxHealth = handicap;
@ -179,7 +179,7 @@ int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) {
clientNum = other->client->ps.clientNum;
trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) );
handicap = atof( Info_ValueForKey( userinfo, "handicap" ) );
if( handicap <= 0.0f || handicap > 100.0f ) {
if( handicap<=0.0f || handicap>100.0f) {
handicap = 100.0f;
}
other->client->pers.maxHealth = handicap;
@ -189,7 +189,7 @@ int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) {
clientNum = other->client->ps.clientNum;
trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) );
handicap = atof( Info_ValueForKey( userinfo, "handicap" ) );
if( handicap <= 0.0f || handicap > 100.0f ) {
if( handicap<=0.0f || handicap>100.0f) {
handicap = 100.0f;
}
other->client->pers.maxHealth = handicap;
@ -535,7 +535,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) {
}
// powerup pickups are global broadcasts
if ( ent->item->giType == IT_POWERUP || ent->item->giType == IT_TEAM ) {
if ( ent->item->giType == IT_POWERUP || ent->item->giType == IT_TEAM) {
// if we want the global sound to play
if (!ent->speed) {
gentity_t *te;
@ -806,7 +806,6 @@ void G_CheckTeamItems( void ) {
G_Printf( S_COLOR_YELLOW "WARNING: No team_CTF_blueflag in map\n" );
}
}
#ifdef MISSIONPACK
if( g_gametype.integer == GT_1FCTF ) {
gitem_t *item;

View file

@ -685,10 +685,6 @@ void DropPortalDestination( gentity_t *ent );
#endif
//
// g_weapon.c
//
@ -964,7 +960,7 @@ extern vmCvar_t g_enableBreath;
extern vmCvar_t g_singlePlayer;
extern vmCvar_t g_proxMineTimeout;
extern vmCvar_t g_localTeamPref;
extern vmCvar_t g_humanplayers;
extern vmCvar_t g_humanplayers;
// STONELANCE
extern vmCvar_t g_forceEngineStart;
extern vmCvar_t g_finishRaceDelay;
@ -995,6 +991,7 @@ extern vmCvar_t car_friction_scale;
void trap_Print( const char *text );
void trap_Error( const char *text ) __attribute__((noreturn));
int trap_Milliseconds( void );
int trap_RealTime( qtime_t *qtime );
int trap_Argc( void );
void trap_Argv( int n, char *buffer, int bufferLength );
void trap_Args( char *buffer, int bufferLength );
@ -1003,6 +1000,7 @@ 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 );
int trap_FS_GetFileList( const char *path, const char *extension, char *listbuf, int bufsize );
int trap_FS_Seek( fileHandle_t f, long offset, int origin ); // fsOrigin_t
void trap_SendConsoleCommand( int exec_when, const char *text );
void trap_Cvar_Register( vmCvar_t *cvar, const char *var_name, const char *value, int flags );
void trap_Cvar_Update( vmCvar_t *cvar );

View file

@ -88,7 +88,6 @@ typedef struct
char *name;
size_t ofs;
fieldtype_t type;
int flags;
} field_t;
field_t fields[] = {
@ -144,7 +143,6 @@ void SP_func_door (gentity_t *ent);
void SP_func_train (gentity_t *ent);
void SP_func_timer (gentity_t *self);
void SP_trigger_always (gentity_t *ent);
void SP_trigger_multiple (gentity_t *ent);
void SP_trigger_push (gentity_t *ent);
@ -327,7 +325,6 @@ qboolean G_CallSpawn( gentity_t *ent ) {
return qfalse;
}
// check item spawn functions
for ( item=bg_itemlist+1 ; item->classname ; item++ ) {
if ( !strcmp(item->classname, ent->classname) ) {
@ -341,7 +338,6 @@ qboolean G_CallSpawn( gentity_t *ent ) {
}
}
G_SpawnItem( ent, item );
return qtrue;
}
@ -765,8 +761,6 @@ void SP_worldspawn( void ) {
}
/*
==============
G_SpawnEntitiesFromString
@ -791,8 +785,7 @@ void G_SpawnEntitiesFromString( void ) {
while( G_ParseSpawnVars() ) {
G_SpawnGEntityFromSpawnVars();
}
level.spawning = qfalse; // any future calls to G_Spawn*() will be errors
}

View file

@ -239,15 +239,16 @@ void Bullet_Fire (gentity_t *ent, float spread, int damage, int mod ) {
passent = ent->s.number;
for (i = 0; i < 10; i++) {
trap_Trace (&tr, muzzle, NULL, NULL, end, passent, MASK_SHOT);
if ( tr.surfaceFlags & SURF_NOIMPACT ) {
return;
}
if (g_entities[ tr.entityNum ].flags & FL_EXTRA_BBOX){
if (g_entities[ tr.entityNum ].flags & FL_EXTRA_BBOX)
traceEnt = &g_entities[ g_entities[ tr.entityNum ].r.ownerNum ];
} else
else
traceEnt = &g_entities[ tr.entityNum ];
@ -350,7 +351,6 @@ qboolean ShotgunPellet( vec3_t start, vec3_t end, gentity_t *ent ) {
traceEnt = &g_entities[ tr.entityNum ];
// send bullet impact
if ( tr.surfaceFlags & SURF_NOIMPACT ) {
return qfalse;
@ -439,14 +439,14 @@ void weapon_grenadelauncher_fire (gentity_t *ent) {
gentity_t *m;
// extra vertical velocity
forward[2] += 0.2f;
forward[2] += 0.2f;
VectorNormalize( forward );
m = fire_grenade (ent, muzzle, forward);
m->damage *= s_quadFactor;
m->splashDamage *= s_quadFactor;
VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
}
/*
@ -469,8 +469,7 @@ void weapon_cluster_grenadelauncher_fire (gentity_t *ent) {
m->splashDamage *= s_quadFactor;
VectorScale(forward, 2000, m->s.pos.trDelta) ;
//VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
}
/*

View file

@ -82,12 +82,12 @@ typedef struct {
// limits
#define MD3_MAX_LODS 3
#define MD3_MAX_TRIANGLES 16384 // per surface
#define MD3_MAX_VERTS 8192 // per surface
#define MD3_MAX_SHADERS 512 // per surface
#define MD3_MAX_FRAMES 2048 // per model
#define MD3_MAX_SURFACES 64 // per model
#define MD3_MAX_TAGS 32 // per frame
#define MD3_MAX_TRIANGLES 8192 // per surface
#define MD3_MAX_VERTS 4096 // per surface
#define MD3_MAX_SHADERS 256 // per surface
#define MD3_MAX_FRAMES 1024 // per model
#define MD3_MAX_SURFACES 32 // per model
#define MD3_MAX_TAGS 16 // per frame
// vertex scales
#define MD3_XYZ_SCALE (1.0/64)

View file

@ -719,18 +719,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
if (lSeek!=0)
{
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
lSeek=0;
else
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)!=0)
err=UNZ_ERRNO;
}
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
lSeek+=file_info.size_file_comment - uSizeRead;
}
else
lSeek+=file_info.size_file_comment;
if ((err==UNZ_OK) && (pfile_info!=NULL))
*pfile_info=file_info;
@ -1150,13 +1145,12 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
pfile_in_zip_read_info->stream.next_in = (voidpf)0;
pfile_in_zip_read_info->stream.avail_in = 0;
err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
if (err == Z_OK)
if (inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS) == Z_OK)
pfile_in_zip_read_info->stream_initialised=1;
else
{
TRYFREE(pfile_in_zip_read_info);
return err;
return UNZ_INTERNALERROR;
}
/* windowBits is passed < 0 to tell that there is no zlib header.
* Note that in this case inflate *requires* an extra "dummy" byte
@ -1203,7 +1197,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
# endif
return UNZ_OK;
return err;
}
extern int ZEXPORT unzOpenCurrentFile (file)

View file

@ -842,6 +842,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
case TRAP_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
default:
Com_Error( ERR_DROP, "Bad game system trap: %ld", (long int) args[0] );
}

View file

@ -533,10 +533,8 @@ typedef struct {
animation_t animations[MAX_TOTALANIMATIONS];
// STONELANCE
// qboolean fixedlegs; // true if legs yaw is always the same as torso yaw
// qboolean fixedtorso; // true if torso never changes yaw
// END
qboolean fixedlegs; // true if legs yaw is always the same as torso yaw
qboolean fixedtorso; // true if torso never changes yaw
qhandle_t weaponModel;
qhandle_t barrelModel;