Browse Source

Remove trailing spaces, convert mistakenly put spaces to tabs. The most useful commit ever.

pull/2/head
Alibek Omarov 6 years ago
parent
commit
2f8fec6b70
  1. 8
      common/entity_state.h
  2. 2
      engine/cdll_int.h
  3. 2
      engine/client/cl_demo.c
  4. 4
      engine/client/cl_frame.c
  5. 8
      engine/client/cl_game.c
  6. 4
      engine/client/cl_main.c
  7. 2
      engine/client/cl_scrn.c
  8. 2
      engine/client/cl_tent.c
  9. 2
      engine/client/client.h
  10. 2
      engine/client/console.c
  11. 2
      engine/client/s_dsp.c
  12. 6
      engine/client/s_main.c
  13. 2
      engine/client/s_stream.c
  14. 4
      engine/common/cmd.c
  15. 8
      engine/common/con_utils.c
  16. 4
      engine/common/imagelib/img_bmp.c
  17. 4
      engine/common/imagelib/img_main.c
  18. 4
      engine/common/imagelib/img_png.c
  19. 12
      engine/common/imagelib/img_wad.c
  20. 2
      engine/common/mod_bmodel.c
  21. 6
      engine/common/net_encode.c
  22. 12
      engine/common/netchan.h
  23. 8
      engine/common/pm_trace.c
  24. 2
      engine/common/soundlib/soundlib.h
  25. 6
      engine/common/system.c
  26. 2
      engine/common/zone.c
  27. 2
      engine/eiface.h
  28. 2
      engine/menu_int.h
  29. 2
      engine/platform/android/vid_android.c
  30. 6
      engine/platform/win32/con_win.c
  31. 2
      engine/platform/win32/lib_win.c
  32. 2
      engine/server/server.h
  33. 10
      engine/server/sv_game.c
  34. 2
      engine/server/sv_main.c
  35. 14
      engine/server/sv_phys.c
  36. 2
      engine/server/sv_pmove.c
  37. 4
      engine/server/sv_world.c
  38. 6
      public/crtlib.c
  39. 4
      public/mathlib.c
  40. 2
      ref_gl/gl_alias.c
  41. 4
      ref_gl/gl_context.c
  42. 2
      ref_gl/gl_local.h
  43. 4
      ref_gl/gl_rsurf.c
  44. 8
      ref_gl/gl_sprite.c
  45. 6
      ref_gl/gl_warp.c

8
common/entity_state.h

@ -28,7 +28,7 @@ struct entity_state_s @@ -28,7 +28,7 @@ struct entity_state_s
// Fields which are filled in by routines outside of delta compression
int entityType;
// Index into cl_entities array for this entity.
int number;
int number;
float msg_time;
// Message number last time the player/entity state was updated.
@ -71,7 +71,7 @@ struct entity_state_s @@ -71,7 +71,7 @@ struct entity_state_s
int owner;
// Friction, for prediction.
float friction;
float friction;
// Gravity multiplier
float gravity;
@ -87,7 +87,7 @@ struct entity_state_s @@ -87,7 +87,7 @@ struct entity_state_s
// Use the crouched hull, or the regular player hull.
int usehull;
// Latched buttons last time state updated.
int oldbuttons;
int oldbuttons;
// -1 = in air, else pmove entity number
int onground;
int iStepLeft;
@ -185,4 +185,4 @@ typedef struct local_state_s @@ -185,4 +185,4 @@ typedef struct local_state_s
weapon_data_t weapondata[MAX_LOCAL_WEAPONS];
} local_state_t;
#endif//ENTITY_STATE_H
#endif//ENTITY_STATE_H

2
engine/cdll_int.h

@ -172,7 +172,7 @@ typedef struct cl_enginefuncs_s @@ -172,7 +172,7 @@ typedef struct cl_enginefuncs_s
int (*GetMaxClients)( void );
void (*Cvar_SetValue)( const char *cvar, float value );
int (*Cmd_Argc)( void );
int (*Cmd_Argc)( void );
const char *(*Cmd_Argv)( int arg );
void (*Con_Printf)( const char *fmt, ... );
void (*Con_DPrintf)( const char *fmt, ... );

2
engine/client/cl_demo.c

@ -1187,7 +1187,7 @@ int CL_GetDemoComment( const char *demoname, char *comment ) @@ -1187,7 +1187,7 @@ int CL_GetDemoComment( const char *demoname, char *comment )
{
Q_strncpy( comment, "", MAX_STRING );
return false;
}
}
// read in the m_DemoHeader
FS_Read( demfile, &demohdr, sizeof( demoheader_t ));

4
engine/client/cl_frame.c

@ -1364,7 +1364,7 @@ qboolean CL_GetEntitySpatialization( channel_t *ch ) @@ -1364,7 +1364,7 @@ qboolean CL_GetEntitySpatialization( channel_t *ch )
return true;
}
valid_origin = VectorIsNull( ch->origin ) ? false : true;
valid_origin = VectorIsNull( ch->origin ) ? false : true;
ent = CL_GetEntityByIndex( ch->entnum );
// entity is not present on the client but has valid origin
@ -1388,7 +1388,7 @@ qboolean CL_GetMovieSpatialization( rawchan_t *ch ) @@ -1388,7 +1388,7 @@ qboolean CL_GetMovieSpatialization( rawchan_t *ch )
cl_entity_t *ent;
qboolean valid_origin;
valid_origin = VectorIsNull( ch->origin ) ? false : true;
valid_origin = VectorIsNull( ch->origin ) ? false : true;
ent = CL_GetEntityByIndex( ch->entnum );
// entity is not present on the client but has valid origin

8
engine/client/cl_game.c

@ -1541,7 +1541,7 @@ static client_sprite_t *pfnSPR_GetList( char *psz, int *piCount ) @@ -1541,7 +1541,7 @@ static client_sprite_t *pfnSPR_GetList( char *psz, int *piCount )
{
Con_Printf( S_ERROR "SPR_GetList: overflow cache!\n" );
return NULL;
}
}
if( !clgame.itemspath[0] ) // typically it's sprites\*.txt
COM_ExtractFilePath( psz, clgame.itemspath );
@ -1550,7 +1550,7 @@ static client_sprite_t *pfnSPR_GetList( char *psz, int *piCount ) @@ -1550,7 +1550,7 @@ static client_sprite_t *pfnSPR_GetList( char *psz, int *piCount )
if( !afile ) return NULL;
pfile = (char *)afile;
pfile = COM_ParseFile( pfile, token );
pfile = COM_ParseFile( pfile, token );
numSprites = Q_atoi( token );
Q_strncpy( pEntry->szListName, psz, sizeof( pEntry->szListName ));
@ -3456,7 +3456,7 @@ void NetAPI_CancelRequest( int context ) @@ -3456,7 +3456,7 @@ void NetAPI_CancelRequest( int context )
SetBits( nr->resp.error, NET_ERROR_TIMEOUT );
nr->resp.ping = host.realtime - nr->timesend;
nr->pfnFunc( &nr->resp );
}
if( clgame.net_requests[i].resp.type == NETAPI_REQUEST_SERVERLIST && &clgame.net_requests[i] == clgame.master_request )
{
@ -4006,7 +4006,7 @@ qboolean CL_LoadProgs( const char *name ) @@ -4006,7 +4006,7 @@ qboolean CL_LoadProgs( const char *name )
// functions are cleared before all the extensions are evaluated
if(( *func->func = (void *)COM_GetProcAddress( clgame.hInstance, func->name )) == NULL )
{
Con_Reportf( "CL_LoadProgs: failed to get address of %s proc\n", func->name );
Con_Reportf( "CL_LoadProgs: failed to get address of %s proc\n", func->name );
if( critical_exports )
{

4
engine/client/cl_main.c

@ -642,7 +642,7 @@ void CL_CreateCmd( void ) @@ -642,7 +642,7 @@ void CL_CreateCmd( void )
if( !cls.demoplayback )
{
pcmd->senttime = host.realtime;
pcmd->senttime = host.realtime;
memset( &pcmd->cmd, 0, sizeof( pcmd->cmd ));
pcmd->receivedtime = -1.0;
pcmd->heldback = false;
@ -2319,7 +2319,7 @@ void CL_ReadPackets( void ) @@ -2319,7 +2319,7 @@ void CL_ReadPackets( void )
// if in the debugger last frame, don't timeout
if( host.frametime > 5.0f ) cls.netchan.last_received = Sys_DoubleTime();
// check timeout
if( cls.state >= ca_connected && cls.state != ca_cinematic && !cls.demoplayback )
{

2
engine/client/cl_scrn.c

@ -95,7 +95,7 @@ void SCR_DrawFPS( int height ) @@ -95,7 +95,7 @@ void SCR_DrawFPS( int height )
Q_snprintf( fpsstring, sizeof( fpsstring ), "fps: ^1%4i min, ^3%4i cur, ^2%4i max", minfps, curfps, maxfps );
else Q_snprintf( fpsstring, sizeof( fpsstring ), "%4i fps", curfps );
MakeRGBA( color, 255, 255, 255, 255 );
}
}
Con_DrawStringLen( fpsstring, &offset, NULL );
Con_DrawString( refState.width - offset - 4, height, fpsstring, color );

2
engine/client/cl_tent.c

@ -549,7 +549,7 @@ CL_TempEntAlloc @@ -549,7 +549,7 @@ CL_TempEntAlloc
custom tempentity allocation
==============
*/
*/
TEMPENTITY *CL_TempEntAllocCustom( const vec3_t org, model_t *model, int high, void (*pfn)( TEMPENTITY*, float, float ))
{
TEMPENTITY *pTemp;

2
engine/client/client.h

@ -561,7 +561,7 @@ typedef struct @@ -561,7 +561,7 @@ typedef struct
double packet_loss_recalc_time;
int starting_count; // message num readed bits
float nextcmdtime; // when can we send the next command packet?
float nextcmdtime; // when can we send the next command packet?
int lastoutgoingcommand; // sequence number of last outgoing command
int lastupdate_sequence; // prediction stuff

2
engine/client/console.c

@ -1075,7 +1075,7 @@ int Con_DrawGenericString( int x, int y, const char *string, rgba_t setColor, qb @@ -1075,7 +1075,7 @@ int Con_DrawGenericString( int x, int y, const char *string, rgba_t setColor, qb
numDraws++;
s++;
}
ref.dllFuncs.Color4ub( 255, 255, 255, 255 );
return drawLen;
}

2
engine/client/s_dsp.c

@ -415,7 +415,7 @@ void DLY_DoStereoDelay( int count ) @@ -415,7 +415,7 @@ void DLY_DoStereoDelay( int count )
{
// clear delay line
dly->lpdelayline[dly->idelayinput] = 0;
}
}
DLY_MovePointer( dly );
}

6
engine/client/s_main.c

@ -79,7 +79,7 @@ S_FadeClientVolume @@ -79,7 +79,7 @@ S_FadeClientVolume
void S_FadeClientVolume( float fadePercent, float fadeOutSeconds, float holdTime, float fadeInSeconds )
{
soundfade.starttime = cl.mtime[0];
soundfade.initial_percent = fadePercent;
soundfade.initial_percent = fadePercent;
soundfade.fadeouttime = fadeOutSeconds;
soundfade.holdtime = holdTime;
soundfade.fadeintime = fadeInSeconds;
@ -283,7 +283,7 @@ channel_t *SND_PickDynamicChannel( int entnum, int channel, sfx_t *sfx, qboolean @@ -283,7 +283,7 @@ channel_t *SND_PickDynamicChannel( int entnum, int channel, sfx_t *sfx, qboolean
}
return &channels[first_to_die];
}
}
/*
=====================
@ -601,7 +601,7 @@ void S_StartSound( const vec3_t pos, int ent, int chan, sound_t handle, float fv @@ -601,7 +601,7 @@ void S_StartSound( const vec3_t pos, int ent, int chan, sound_t handle, float fv
{
// skip up to 0.1 seconds of audio
int skip = COM_RandomLong( 0, (long)( 0.1f * check->sfx->cache->rate ));
S_SetSampleStart( check, sfx->cache, skip );
break;
}

2
engine/client/s_stream.c

@ -45,7 +45,7 @@ S_FadeMusicVolume @@ -45,7 +45,7 @@ S_FadeMusicVolume
*/
void S_FadeMusicVolume( float fadePercent )
{
musicfade.percent = bound( 0.0f, fadePercent, 100.0f );
musicfade.percent = bound( 0.0f, fadePercent, 100.0f );
}
/*

4
engine/common/cmd.c

@ -1183,8 +1183,8 @@ static void Cmd_Apropos_f( void ) @@ -1183,8 +1183,8 @@ static void Cmd_Apropos_f( void )
// fix inconsistencies in output from different commands
Msg( "cvar ^3%s^7 is \"%s\" [\"%s\"] %s\n",
var->name, var->string,
( var->flags & FCVAR_EXTENDED ) ? var->def_string : "",
( var->flags & FCVAR_EXTENDED ) ? var->desc : "game cvar");
( var->flags & FCVAR_EXTENDED ) ? var->def_string : "",
( var->flags & FCVAR_EXTENDED ) ? var->desc : "game cvar");
count++;
}

8
engine/common/con_utils.c

@ -888,7 +888,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir ) @@ -888,7 +888,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir )
continue;
}
// after call Mod_TestBmodelLumps we gurantee what map is valid
// after call Mod_TestBmodelLumps we gurantee what map is valid
lumpofs = header->lumps[LUMP_ENTITIES].fileofs;
lumplen = header->lumps[LUMP_ENTITIES].filelen;
@ -950,7 +950,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir ) @@ -950,7 +950,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir )
if( !size )
{
if( buffer ) Mem_Free( buffer );
if( buffer ) Mem_Free( buffer );
if( onlyingamedir )
return Cmd_CheckMapsList_R( fRefresh, false );
@ -960,7 +960,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir ) @@ -960,7 +960,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir )
// write generated maps.lst
if( FS_WriteFile( "maps.lst", buffer, Q_strlen( buffer )))
{
if( buffer ) Mem_Free( buffer );
if( buffer ) Mem_Free( buffer );
return true;
}
return false;
@ -1476,7 +1476,7 @@ void Host_WriteVideoConfig( void ) @@ -1476,7 +1476,7 @@ void Host_WriteVideoConfig( void )
FS_Printf( f, "//=======================================================================\n" );
Cvar_WriteVariables( f, FCVAR_RENDERINFO );
CFG_END( f, "video.cfg" );
}
}
else Con_DPrintf( S_ERROR "can't update video.cfg.\n" );
}
#endif // XASH_DEDICATED

4
engine/common/imagelib/img_bmp.c

@ -71,7 +71,7 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi @@ -71,7 +71,7 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi
// Sweet Half-Life issues. splash.bmp have bogus filesize
Con_Reportf( S_WARN "Image_LoadBMP: %s have incorrect file size %li should be %i\n", name, filesize, bhdr.fileSize );
}
// bogus compression? Only non-compressed supported.
if( bhdr.compression != BI_RGB )
{
@ -83,7 +83,7 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi @@ -83,7 +83,7 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi
image.height = rows = abs( bhdr.height );
if( !Image_ValidSize( name ))
return false;
return false;
// special case for loading qfont (menu font)
if( !Q_strncmp( name, "#XASH_SYSTEMFONT_001", 20 ))

4
engine/common/imagelib/img_main.c

@ -177,7 +177,7 @@ qboolean FS_AddSideToPack( const char *name, int adjust_flags ) @@ -177,7 +177,7 @@ qboolean FS_AddSideToPack( const char *name, int adjust_flags )
// keep constant size, render.dll expecting it
image.size = image.source_width * image.source_height * 4;
// mixing dds format with any existing ?
if( image.type != image.source_type )
return false;
@ -282,7 +282,7 @@ rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size ) @@ -282,7 +282,7 @@ rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size )
{
// this name will be used only for tell user about problems
if( format->loadfunc( path, f, filesize ))
{
{
Q_snprintf( sidename, sizeof( sidename ), "%s%s.%s", loadname, cmap->type[i].suf, format->ext );
if( FS_AddSideToPack( sidename, cmap->type[i].flags )) // process flags to flip some sides
{

4
engine/common/imagelib/img_png.c

@ -214,8 +214,8 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi @@ -214,8 +214,8 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
switch( png_hdr.ihdr_chunk.colortype )
{
case PNG_CT_RGB:
pixel_size = 3;
break;
pixel_size = 3;
break;
case PNG_CT_RGBA:
pixel_size = 4;
break;

12
engine/common/imagelib/img_wad.c

@ -302,7 +302,7 @@ qboolean Image_LoadLMP( const char *name, const byte *buffer, fs_offset_t filesi @@ -302,7 +302,7 @@ qboolean Image_LoadLMP( const char *name, const byte *buffer, fs_offset_t filesi
return false;
if( !Image_ValidSize( name ))
return false;
return false;
if( image.hint != IL_HINT_Q1 && filesize > (int)sizeof(lmp) + pixels )
{
@ -482,7 +482,7 @@ qboolean Image_LoadMIP( const char *name, const byte *buffer, fs_offset_t filesi @@ -482,7 +482,7 @@ qboolean Image_LoadMIP( const char *name, const byte *buffer, fs_offset_t filesi
// check for half-life water texture
if( hl_texture && ( mip.name[0] == '!' || !Q_strnicmp( mip.name, "water", 5 )))
{
{
// grab the fog color
image.fogParams[0] = pal[3*3+0];
image.fogParams[1] = pal[3*3+1];
@ -490,16 +490,16 @@ qboolean Image_LoadMIP( const char *name, const byte *buffer, fs_offset_t filesi @@ -490,16 +490,16 @@ qboolean Image_LoadMIP( const char *name, const byte *buffer, fs_offset_t filesi
// grab the fog density
image.fogParams[3] = pal[4*3+0];
}
else if( hl_texture && ( rendermode == LUMP_GRADIENT ))
{
}
else if( hl_texture && ( rendermode == LUMP_GRADIENT ))
{
// grab the decal color
image.fogParams[0] = pal[255*3+0];
image.fogParams[1] = pal[255*3+1];
image.fogParams[2] = pal[255*3+2];
// calc the decal reflectivity
image.fogParams[3] = VectorAvg( image.fogParams );
image.fogParams[3] = VectorAvg( image.fogParams );
}
else if( pal != NULL )
{

2
engine/common/mod_bmodel.c

@ -2539,7 +2539,7 @@ static void Mod_LoadLeafs( dbspmodel_t *bmod ) @@ -2539,7 +2539,7 @@ static void Mod_LoadLeafs( dbspmodel_t *bmod )
out->compressed_vis = loadmodel->visdata + p;
else Con_Reportf( S_WARN "Mod_LoadLeafs: invalid visofs for leaf #%i\n", i );
}
}
}
else out->cluster = -1; // no visclusters on bmodels
if( p == -1 ) out->compressed_vis = NULL;

6
engine/common/net_encode.c

@ -1610,7 +1610,7 @@ void MSG_WriteWeaponData( sizebuf_t *msg, weapon_data_t *from, weapon_data_t *to @@ -1610,7 +1610,7 @@ void MSG_WriteWeaponData( sizebuf_t *msg, weapon_data_t *from, weapon_data_t *to
MSG_WriteOneBit( msg, 1 );
MSG_WriteUBitLong( msg, index, MAX_WEAPON_BITS );
// process fields
for( i = 0; i < dt->numFields; i++, pField++ )
{
@ -1765,7 +1765,7 @@ MSG_ReadDeltaEntity @@ -1765,7 +1765,7 @@ MSG_ReadDeltaEntity
The entity number has already been read from the message, which
is how the from state is identified.
If the delta removes the entity, entity_state_t->number will be set to MAX_EDICTS
Can go from either a baseline or a previous packet_entity
==================
@ -1792,7 +1792,7 @@ qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state @@ -1792,7 +1792,7 @@ qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state
{
// removed from delta-message
return false;
}
}
if( fRemoveType & 2 )
{

12
engine/common/netchan.h

@ -202,11 +202,11 @@ typedef struct netchan_s @@ -202,11 +202,11 @@ typedef struct netchan_s
double cleartime; // if realtime > cleartime, free to send next packet
// Sequencing variables
int incoming_sequence; // increasing count of sequence numbers
int incoming_acknowledged; // # of last outgoing message that has been ack'd.
int incoming_reliable_acknowledged; // toggles T/F as reliable messages are received.
int incoming_reliable_sequence; // single bit, maintained local
int outgoing_sequence; // message we are sending to remote
int incoming_sequence; // increasing count of sequence numbers
int incoming_acknowledged; // # of last outgoing message that has been ack'd.
int incoming_reliable_acknowledged; // toggles T/F as reliable messages are received.
int incoming_reliable_sequence; // single bit, maintained local
int outgoing_sequence; // message we are sending to remote
int reliable_sequence; // whether the message contains reliable payload, single bit
int last_reliable_sequence; // outgoing sequence number of last send that had reliable data
@ -227,7 +227,7 @@ typedef struct netchan_s @@ -227,7 +227,7 @@ typedef struct netchan_s
// Multiple outgoing buffers can be queued in succession
fragbufwaiting_t *waitlist[MAX_STREAMS];
int reliable_fragment[MAX_STREAMS]; // is reliable waiting buf a fragment?
int reliable_fragment[MAX_STREAMS]; // is reliable waiting buf a fragment?
uint reliable_fragid[MAX_STREAMS]; // buffer id for each waiting fragment
fragbuf_t *fragbufs[MAX_STREAMS]; // the current fragment being set

8
engine/common/pm_trace.c

@ -423,7 +423,7 @@ pmtrace_t PM_PlayerTraceExt( playermove_t *pmove, vec3_t start, vec3_t end, int @@ -423,7 +423,7 @@ pmtrace_t PM_PlayerTraceExt( playermove_t *pmove, vec3_t start, vec3_t end, int
Matrix4x4_VectorITransform( matrix, start, start_l );
Matrix4x4_VectorITransform( matrix, end, end_l );
if( transform_bbox )
{
World_TransformAABB( matrix, pmove->player_mins[pmove->usehull], pmove->player_maxs[pmove->usehull], mins, maxs );
@ -591,14 +591,14 @@ int PM_TestPlayerPosition( playermove_t *pmove, vec3_t pos, pmtrace_t *ptrace, p @@ -591,14 +591,14 @@ int PM_TestPlayerPosition( playermove_t *pmove, vec3_t pos, pmtrace_t *ptrace, p
{
if(( check_angles( pe->angles[0] ) || check_angles( pe->angles[2] )) && pmove->usehull != 2 )
transform_bbox = true;
}
}
if( transform_bbox )
Matrix4x4_CreateFromEntity( matrix, pe->angles, pe->origin, 1.0f );
else Matrix4x4_CreateFromEntity( matrix, pe->angles, offset, 1.0f );
Matrix4x4_VectorITransform( matrix, pos, pos_l );
if( transform_bbox )
{
World_TransformAABB( matrix, pmove->player_mins[pmove->usehull], pmove->player_maxs[pmove->usehull], mins, maxs );
@ -732,4 +732,4 @@ int PM_PointContents( playermove_t *pmove, const vec3_t p ) @@ -732,4 +732,4 @@ int PM_PointContents( playermove_t *pmove, const vec3_t p )
}
return contents;
}
}

2
engine/common/soundlib/soundlib.h

@ -103,7 +103,7 @@ typedef struct @@ -103,7 +103,7 @@ typedef struct
short nChannels; // 1,2 for stereo data is (l,r) pairs
int nSamplesPerSec;
int nAvgBytesPerSec;
short nBlockAlign;
short nBlockAlign;
short nBitsPerSample;
} wavehdr_t;

6
engine/common/system.c

@ -269,8 +269,8 @@ void Sys_SendKeyEvents( void ) @@ -269,8 +269,8 @@ void Sys_SendKeyEvents( void )
if( !GetMessage( &msg, NULL, 0, 0 ))
Sys_Quit ();
TranslateMessage( &msg );
DispatchMessage( &msg );
TranslateMessage( &msg );
DispatchMessage( &msg );
}
#endif
}
@ -317,7 +317,7 @@ qboolean Sys_LoadLibrary( dll_info_t *dll ) @@ -317,7 +317,7 @@ qboolean Sys_LoadLibrary( dll_info_t *dll )
goto error;
}
}
Con_Reportf( " - ok\n" );
Con_Reportf( " - ok\n" );
return true;
error:

2
engine/common/zone.c

@ -189,7 +189,7 @@ void _Mem_FreePool( byte **poolptr, const char *filename, int fileline ) @@ -189,7 +189,7 @@ void _Mem_FreePool( byte **poolptr, const char *filename, int fileline )
{
mempool_t *pool = (mempool_t *)*poolptr;
mempool_t **chainaddress;
if( pool )
{
// unlink pool from chain

2
engine/eiface.h

@ -437,7 +437,7 @@ typedef struct @@ -437,7 +437,7 @@ typedef struct
void (*pfnParmsChangeLevel)( void );
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
const char *(*pfnGetGameDescription)( void );
const char *(*pfnGetGameDescription)( void );
// Notify dll about a player customization.
void (*pfnPlayerCustomization)( edict_t *pEntity, customization_t *pCustom );

2
engine/menu_int.h

@ -78,7 +78,7 @@ typedef struct ui_enginefuncs_s @@ -78,7 +78,7 @@ typedef struct ui_enginefuncs_s
int (*pfnAddCommand)( const char *cmd_name, void (*function)(void) );
void (*pfnClientCmd)( int execute_now, const char *szCmdString );
void (*pfnDelCommand)( const char *cmd_name );
int (*pfnCmdArgc)( void );
int (*pfnCmdArgc)( void );
const char* (*pfnCmdArgv)( int argc );
const char* (*pfnCmd_Args)( void );

2
engine/platform/android/vid_android.c

@ -402,7 +402,7 @@ void* GL_GetProcAddress( const char *name ) // RenderAPI requirement @@ -402,7 +402,7 @@ void* GL_GetProcAddress( const char *name ) // RenderAPI requirement
return eglGetProcAddress( name );
}
void GL_UpdateSwapInterval( void )
void GL_UpdateSwapInterval( void )
{
// disable VSync while level is loading
if( cls.state < ca_active )

6
engine/platform/win32/con_win.c

@ -345,7 +345,7 @@ void Wcon_CreateConsole( void ) @@ -345,7 +345,7 @@ void Wcon_CreateConsole( void )
s_wcd.hwndButtonSubmit = CreateWindow( "button", NULL, BS_PUSHBUTTON|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, 552, 367, 87, 25, s_wcd.hWnd, (HMENU)SUBMIT_ID, host.hInst, NULL );
SendMessage( s_wcd.hwndButtonSubmit, WM_SETTEXT, 0, ( LPARAM ) "submit" );
}
// create the scrollbuffer
GetClientRect( s_wcd.hWnd, &rect );
@ -360,7 +360,7 @@ void Wcon_CreateConsole( void ) @@ -360,7 +360,7 @@ void Wcon_CreateConsole( void )
// show console if needed
if( host.con_showalways )
{
{
// make console visible
ShowWindow( s_wcd.hWnd, SW_SHOWDEFAULT );
UpdateWindow( s_wcd.hWnd );
@ -404,7 +404,7 @@ void Wcon_DestroyConsole( void ) @@ -404,7 +404,7 @@ void Wcon_DestroyConsole( void )
if( s_wcd.hWnd )
{
DeleteObject( s_wcd.hbrEditBackground );
DeleteObject( s_wcd.hfBufferFont );
DeleteObject( s_wcd.hfBufferFont );
if( host.type == HOST_DEDICATED )
{

2
engine/platform/win32/lib_win.c

@ -334,7 +334,7 @@ static void FinalizeSections( MEMORYMODULE *module ) @@ -334,7 +334,7 @@ static void FinalizeSections( MEMORYMODULE *module )
}
if( size > 0 )
{
{
// change memory access flags
if( !VirtualProtect((LPVOID)section->Misc.PhysicalAddress, size, protect, &oldProtect ))
Sys_Error( "error protecting memory page\n" );

2
engine/server/server.h

@ -209,7 +209,7 @@ typedef struct sv_client_s @@ -209,7 +209,7 @@ typedef struct sv_client_s
char physinfo[MAX_INFO_STRING]; // set on server (transmit to client)
netchan_t netchan;
int chokecount; // number of messages rate supressed
int chokecount; // number of messages rate supressed
int delta_sequence; // -1 = no compression.
double next_messagetime; // time when we should send next world state update

10
engine/server/sv_game.c

@ -2286,14 +2286,14 @@ static void pfnTraceModel( const float *v1, const float *v2, int hullNumber, edi @@ -2286,14 +2286,14 @@ static void pfnTraceModel( const float *v1, const float *v2, int hullNumber, edi
pent->v.movetype = MOVETYPE_PUSH;
pent->v.solid = SOLID_BSP;
SV_ClipMoveToEntity( pent, v1, mins, maxs, v2, &trace );
SV_ClipMoveToEntity( pent, v1, mins, maxs, v2, &trace );
pent->v.movetype = oldmovetype;
pent->v.solid = oldsolid;
}
else
{
SV_ClipMoveToEntity( pent, v1, mins, maxs, v2, &trace );
SV_ClipMoveToEntity( pent, v1, mins, maxs, v2, &trace );
}
SV_ConvertTrace( ptr, &trace );
@ -2368,7 +2368,7 @@ void pfnGetAimVector( edict_t* ent, float speed, float *rgflReturn ) @@ -2368,7 +2368,7 @@ void pfnGetAimVector( edict_t* ent, float speed, float *rgflReturn )
continue;
if( FBitSet( check->v.flags, FL_FAKECLIENT ))
continue;
continue;
if( ent->v.team > 0 && ent->v.team == check->v.team )
continue;
@ -4006,7 +4006,7 @@ void SV_PlaybackEventFull( int flags, const edict_t *pInvoker, word eventindex, @@ -4006,7 +4006,7 @@ void SV_PlaybackEventFull( int flags, const edict_t *pInvoker, word eventindex,
}
if( !FBitSet( flags, FEV_GLOBAL ) && VectorIsNull( pvspoint ))
{
{
Con_DPrintf( S_ERROR "%s: not a FEV_GLOBAL event missing origin. Ignored.\n", sv.event_precache[eventindex] );
return;
}
@ -5053,7 +5053,7 @@ qboolean SV_LoadProgs( const char *name ) @@ -5053,7 +5053,7 @@ qboolean SV_LoadProgs( const char *name )
if( !GetEntityAPI && !GetEntityAPI2 )
{
COM_FreeLibrary( svgame.hInstance );
Con_Printf( S_ERROR "SV_LoadProgs: failed to get address of GetEntityAPI proc\n" );
Con_Printf( S_ERROR "SV_LoadProgs: failed to get address of GetEntityAPI proc\n" );
svgame.hInstance = NULL;
Mem_FreePool(&svgame.mempool);
return false;

2
engine/server/sv_main.c

@ -479,7 +479,7 @@ void SV_CheckTimeouts( void ) @@ -479,7 +479,7 @@ void SV_CheckTimeouts( void )
{
if( cl->edict && !FBitSet( cl->edict->v.flags, FL_SPECTATOR|FL_FAKECLIENT ))
numclients++;
}
}
// fake clients do not timeout
if( FBitSet( cl->flags, FCL_FAKECLIENT ))

14
engine/server/sv_phys.c

@ -609,8 +609,8 @@ int SV_FlyMove( edict_t *ent, float time, trace_t *steptrace ) @@ -609,8 +609,8 @@ int SV_FlyMove( edict_t *ent, float time, trace_t *steptrace )
{
blocked |= 1; // floor
if( trace.ent->v.solid == SOLID_BSP || trace.ent->v.solid == SOLID_SLIDEBOX ||
trace.ent->v.movetype == MOVETYPE_PUSHSTEP || (trace.ent->v.flags & FL_CLIENT))
if( trace.ent->v.solid == SOLID_BSP || trace.ent->v.solid == SOLID_SLIDEBOX ||
trace.ent->v.movetype == MOVETYPE_PUSHSTEP || (trace.ent->v.flags & FL_CLIENT))
{
SetBits( ent->v.flags, FL_ONGROUND );
ent->v.groundentity = trace.ent;
@ -866,7 +866,7 @@ allow entity to block pusher? @@ -866,7 +866,7 @@ allow entity to block pusher?
static qboolean SV_CanBlock( edict_t *ent )
{
if( ent->v.mins[0] == ent->v.maxs[0] )
return false;
return false;
if( ent->v.solid == SOLID_NOT || ent->v.solid == SOLID_TRIGGER )
{
@ -874,7 +874,7 @@ static qboolean SV_CanBlock( edict_t *ent ) @@ -874,7 +874,7 @@ static qboolean SV_CanBlock( edict_t *ent )
ent->v.mins[0] = ent->v.mins[1] = 0;
VectorCopy( ent->v.mins, ent->v.maxs );
return false;
}
}
return true;
}
@ -1098,7 +1098,7 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime ) @@ -1098,7 +1098,7 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime )
if( lmove[2] != 0.0f ) check->v.flags &= ~FL_ONGROUND;
if( lmove[2] < 0.0f && !pusher->v.dmg )
lmove[2] = 0.0f; // let's the free falling
}
}
// try moving the contacted entity
pusher->v.solid = SOLID_NOT;
@ -1471,7 +1471,7 @@ void SV_Physics_Toss( edict_t *ent ) @@ -1471,7 +1471,7 @@ void SV_Physics_Toss( edict_t *ent )
case MOVETYPE_TOSS:
case MOVETYPE_BOUNCE:
SV_AngularMove( ent, sv.frametime, ent->v.friction );
break;
break;
default:
SV_AngularMove( ent, sv.frametime, 0.0f );
break;
@ -1795,7 +1795,7 @@ void SV_Physics( void ) @@ -1795,7 +1795,7 @@ void SV_Physics( void )
continue;
if( i > 0 && i <= svs.maxclients )
continue;
continue;
SV_Physics_Entity( ent );
}

2
engine/server/sv_pmove.c

@ -1142,4 +1142,4 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed ) @@ -1142,4 +1142,4 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed )
{
SV_RestoreMoveInterpolant( cl );
}
}
}

4
engine/server/sv_world.c

@ -912,7 +912,7 @@ void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t @@ -912,7 +912,7 @@ void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t
Matrix4x4_VectorITransform( matrix, start, start_l );
Matrix4x4_VectorITransform( matrix, end, end_l );
if( transform_bbox )
{
World_TransformAABB( matrix, mins, maxs, out_mins, out_maxs );
@ -1741,4 +1741,4 @@ int SV_LightForEntity( edict_t *pEdict ) @@ -1741,4 +1741,4 @@ int SV_LightForEntity( edict_t *pEdict )
SV_RecursiveLightPoint( sv.worldmodel, sv.worldmodel->nodes, start, end );
return VectorAvg( sv_pointColor );
}
}

6
public/crtlib.c

@ -183,8 +183,8 @@ size_t Q_strncpy( char *dst, const char *src, size_t size ) @@ -183,8 +183,8 @@ size_t Q_strncpy( char *dst, const char *src, size_t size )
int Q_atoi( const char *str )
{
int val = 0;
int c, sign;
int val = 0;
int c, sign;
if( !str ) return 0;
@ -361,7 +361,7 @@ int Q_strnicmp( const char *s1, const char *s2, int n ) @@ -361,7 +361,7 @@ int Q_strnicmp( const char *s1, const char *s2, int n )
else if( s2 == NULL )
{
return 1;
}
}
do {
c1 = *s1++;

4
public/mathlib.c

@ -133,7 +133,7 @@ void RoundUpHullSize( vec3_t size ) @@ -133,7 +133,7 @@ void RoundUpHullSize( vec3_t size )
for( i = 0; i < 3; i++)
{
qboolean negative = false;
float result, value;
float result, value;
value = size[i];
if( value < 0.0f ) negative = true;
@ -142,7 +142,7 @@ void RoundUpHullSize( vec3_t size ) @@ -142,7 +142,7 @@ void RoundUpHullSize( vec3_t size )
// lookup hull table to find nearest supposed value
for( j = 0; j < NUM_HULL_ROUNDS; j++ )
{
{
if( value > hull_table[j] )
continue; // ceil only

2
ref_gl/gl_alias.c

@ -1047,7 +1047,7 @@ void GL_DrawAliasFrame( aliashdr_t *paliashdr ) @@ -1047,7 +1047,7 @@ void GL_DrawAliasFrame( aliashdr_t *paliashdr )
else
{
pglBegin( GL_TRIANGLE_STRIP );
}
}
do
{

4
ref_gl/gl_context.c

@ -95,11 +95,11 @@ void Mod_BrushUnloadTextures( model_t *mod ) @@ -95,11 +95,11 @@ void Mod_BrushUnloadTextures( model_t *mod )
{
texture_t *tx = mod->textures[i];
if( !tx || tx->gl_texturenum == tr.defaultTexture )
continue; // free slot
continue; // free slot
GL_FreeTexture( tx->gl_texturenum ); // main texture
GL_FreeTexture( tx->fb_texturenum ); // luma texture
}
}
}
void Mod_UnloadTextures( model_t *mod )

2
ref_gl/gl_local.h

@ -217,7 +217,7 @@ typedef struct @@ -217,7 +217,7 @@ typedef struct
msurface_t *draw_decals[MAX_DECAL_SURFS];
int num_draw_decals;
// OpenGL matrix states
qboolean modelviewIdentity;

4
ref_gl/gl_rsurf.c

@ -1103,7 +1103,7 @@ void R_RenderDetails( void ) @@ -1103,7 +1103,7 @@ void R_RenderDetails( void )
fa = p->surf;
glt = R_GetTexture( fa->texinfo->texture->gl_texturenum ); // get texture scale
DrawGLPoly( fa->polys, glt->xscale, glt->yscale );
}
}
detail_surfaces[i] = NULL;
es->detailchain = NULL;
@ -1229,7 +1229,7 @@ dynamic: @@ -1229,7 +1229,7 @@ dynamic:
R_BuildLightMap( fa, temp, smax * 4, true );
R_SetCacheState( fa );
GL_Bind( XASH_TEXTURE0, tr.lightmapTextures[fa->lightmaptexturenum] );
pglTexSubImage2D( GL_TEXTURE_2D, 0, fa->light_s, fa->light_t, smax, tmax,

8
ref_gl/gl_sprite.c

@ -481,7 +481,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe, @@ -481,7 +481,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe,
if( frame < 0 )
{
frame = 0;
}
}
else if( frame >= psprite->numframes )
{
gEngfuncs.Con_Reportf( S_WARN "R_GetSpriteFrameInterpolant: no such frame %d (%s)\n", frame, ent->model->name );
@ -500,7 +500,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe, @@ -500,7 +500,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe,
ent->latched.sequencetime = gpGlobals->time;
lerpFrac = 1.0f;
}
if( ent->latched.sequencetime < gpGlobals->time )
{
if( frame != ent->latched.prevblending[1] )
@ -745,7 +745,7 @@ static void R_DrawSpriteQuad( mspriteframe_t *frame, vec3_t org, vec3_t v_right, @@ -745,7 +745,7 @@ static void R_DrawSpriteQuad( mspriteframe_t *frame, vec3_t org, vec3_t v_right,
VectorMA( org, frame->up * scale, v_up, point );
VectorMA( point, frame->right * scale, v_right, point );
pglVertex3fv( point );
pglTexCoord2f( 1.0f, 1.0f );
pglTexCoord2f( 1.0f, 1.0f );
VectorMA( org, frame->down * scale, v_up, point );
VectorMA( point, frame->right * scale, v_right, point );
pglVertex3fv( point );
@ -893,7 +893,7 @@ void R_DrawSpriteModel( cl_entity_t *e ) @@ -893,7 +893,7 @@ void R_DrawSpriteModel( cl_entity_t *e )
color[1] = 1.0f;
color[2] = 1.0f;
}
if( R_SpriteHasLightmap( e, psprite->texFormat ))
{
colorVec lightColor = R_LightPoint( origin );

6
ref_gl/gl_warp.c

@ -75,7 +75,7 @@ static int CheckSkybox( const char *name ) @@ -75,7 +75,7 @@ static int CheckSkybox( const char *name )
{
num_checked_sides = 0;
for( j = 0; j < 6; j++ )
{
{
// build side name
sidename = va( "%s%s.%s", name, r_skyBoxSuffix[j], skybox_ext[i] );
if( gEngfuncs.FS_FileExists( sidename, false ))
@ -87,7 +87,7 @@ static int CheckSkybox( const char *name ) @@ -87,7 +87,7 @@ static int CheckSkybox( const char *name )
return SKYBOX_HLSTYLE; // image exists
for( j = 0; j < 6; j++ )
{
{
// build side name
sidename = va( "%s_%s.%s", name, r_skyBoxSuffix[j], skybox_ext[i] );
if( gEngfuncs.FS_FileExists( sidename, false ))
@ -729,7 +729,7 @@ void R_InitSkyClouds( mip_t *mt, texture_t *tx, qboolean custom_palette ) @@ -729,7 +729,7 @@ void R_InitSkyClouds( mip_t *mt, texture_t *tx, qboolean custom_palette )
trans[(i * r_sky->height) + j] = transpix;
}
else
{
{
rgba = (uint *)r_sky->palette + p;
trans[(i * r_sky->height) + j] = *rgba;
}

Loading…
Cancel
Save