mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 21:52:05 +08:00
Trim all trailing whitespace
The `.editorconfig` file in this repo is configured to trim all trailing
whitespace regardless of whether the line is modified.
Trims all trailing whitespace in the repository to make the codebase easier
to work with in editors that respect `.editorconfig`.
`git blame` becomes less useful on these lines but it already isn't very useful.
Commands:
```
find . -type f -name '*.h' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -type f -name '*.c' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
```
This commit is contained in:
committed by
Alibek Omarov
parent
3af742f103
commit
5e0a0765ce
+21
-21
@@ -29,7 +29,7 @@ GNU General Public License for more details.
|
||||
#define DELTA_PATH "delta.lst"
|
||||
|
||||
static qboolean delta_init = false;
|
||||
|
||||
|
||||
// list of all the struct names
|
||||
static const delta_field_t cmd_fields[] =
|
||||
{
|
||||
@@ -390,7 +390,7 @@ void Delta_CustomEncode( delta_info_t *dt, const void *from, const void *to )
|
||||
delta_field_t *Delta_FindFieldInfo( const delta_field_t *pInfo, const char *fieldName )
|
||||
{
|
||||
if( !fieldName || !*fieldName )
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
for( ; pInfo->name; pInfo++ )
|
||||
{
|
||||
@@ -405,7 +405,7 @@ int Delta_IndexForFieldInfo( const delta_field_t *pInfo, const char *fieldName )
|
||||
int i;
|
||||
|
||||
if( !fieldName || !*fieldName )
|
||||
return -1;
|
||||
return -1;
|
||||
|
||||
for( i = 0; pInfo->name; i++, pInfo++ )
|
||||
{
|
||||
@@ -455,7 +455,7 @@ qboolean Delta_AddField( const char *pStructName, const char *pName, int flags,
|
||||
}
|
||||
|
||||
// allocate a new one
|
||||
dt->pFields = Z_Realloc( dt->pFields, (dt->numFields + 1) * sizeof( delta_t ));
|
||||
dt->pFields = Z_Realloc( dt->pFields, (dt->numFields + 1) * sizeof( delta_t ));
|
||||
for( i = 0, pField = dt->pFields; i < dt->numFields; i++, pField++ );
|
||||
|
||||
// copy info to new field
|
||||
@@ -475,7 +475,7 @@ void Delta_WriteTableField( sizebuf_t *msg, int tableIndex, const delta_t *pFiel
|
||||
{
|
||||
int nameIndex;
|
||||
delta_info_t *dt;
|
||||
|
||||
|
||||
Assert( pField != NULL );
|
||||
|
||||
if( !COM_CheckString( pField->name ))
|
||||
@@ -523,7 +523,7 @@ void Delta_ParseTableField( sizebuf_t *msg )
|
||||
if( !dt )
|
||||
Host_Error( "Delta_ParseTableField: not initialized" );
|
||||
|
||||
nameIndex = MSG_ReadUBitLong( msg, 8 ); // read field name index
|
||||
nameIndex = MSG_ReadUBitLong( msg, 8 ); // read field name index
|
||||
if( ( nameIndex >= 0 && nameIndex < dt->maxFields ) )
|
||||
{
|
||||
pName = dt->pInfo[nameIndex].name;
|
||||
@@ -639,7 +639,7 @@ qboolean Delta_ParseField( char **delta_script, const delta_field_t *pInfo, delt
|
||||
|
||||
pField->bits = Q_atoi( token );
|
||||
|
||||
*delta_script = COM_ParseFile( *delta_script, token );
|
||||
*delta_script = COM_ParseFile( *delta_script, token );
|
||||
if( Q_strcmp( token, "," ))
|
||||
{
|
||||
Con_DPrintf( S_ERROR "Delta_ReadField: expected ',', found '%s' instead\n", token );
|
||||
@@ -753,7 +753,7 @@ void Delta_InitFields( void )
|
||||
{
|
||||
byte *afile;
|
||||
char *pfile;
|
||||
string encodeDll, encodeFunc, token;
|
||||
string encodeDll, encodeFunc, token;
|
||||
delta_info_t *dt;
|
||||
|
||||
afile = FS_LoadFile( DELTA_PATH, NULL, false );
|
||||
@@ -778,7 +778,7 @@ void Delta_InitFields( void )
|
||||
|
||||
// jump to '{'
|
||||
pfile = COM_ParseFile( pfile, token );
|
||||
|
||||
|
||||
if( token[0] != '{' )
|
||||
{
|
||||
Sys_Error( "%s: missing '{' in section %s\n", DELTA_PATH, dt->pName );
|
||||
@@ -825,7 +825,7 @@ void Delta_Init( void )
|
||||
else Delta_AddField( "movevars_t", "zmax", DT_FLOAT|DT_SIGNED, 16, 1.0f, 1.0f );
|
||||
|
||||
Delta_AddField( "movevars_t", "waveHeight", DT_FLOAT|DT_SIGNED, 16, 16.0f, 1.0f );
|
||||
Delta_AddField( "movevars_t", "skyName", DT_STRING, 1, 1.0f, 1.0f );
|
||||
Delta_AddField( "movevars_t", "skyName", DT_STRING, 1, 1.0f, 1.0f );
|
||||
Delta_AddField( "movevars_t", "footsteps", DT_INTEGER, 1, 1.0f, 1.0f );
|
||||
Delta_AddField( "movevars_t", "rollangle", DT_FLOAT|DT_SIGNED, 16, 32.0f, 1.0f );
|
||||
Delta_AddField( "movevars_t", "rollspeed", DT_FLOAT|DT_SIGNED, 16, 8.0f, 1.0f );
|
||||
@@ -909,7 +909,7 @@ int Delta_ClampIntegerField( delta_t *pField, int iValue, qboolean bSigned, int
|
||||
}
|
||||
|
||||
return iValue; // clamped;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
@@ -1197,10 +1197,10 @@ qboolean Delta_ReadField( sizebuf_t *msg, delta_t *pField, void *from, void *to,
|
||||
qboolean bSigned = ( pField->flags & DT_SIGNED ) ? true : false;
|
||||
float flValue, flAngle, flTime;
|
||||
qboolean bChanged;
|
||||
uint iValue;
|
||||
uint iValue;
|
||||
const char *pStr;
|
||||
char *pOut;
|
||||
|
||||
|
||||
bChanged = MSG_ReadOneBit( msg );
|
||||
|
||||
Assert( pField->multiplier != 0.0f );
|
||||
@@ -1319,7 +1319,7 @@ qboolean Delta_ReadField( sizebuf_t *msg, delta_t *pField, void *from, void *to,
|
||||
=============================================================================
|
||||
|
||||
usercmd_t communication
|
||||
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
/*
|
||||
@@ -1441,7 +1441,7 @@ void MSG_ReadDeltaEvent( sizebuf_t *msg, event_args_t *from, event_args_t *to )
|
||||
=============================================================================
|
||||
|
||||
movevars_t communication
|
||||
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
qboolean MSG_WriteDeltaMovevars( sizebuf_t *msg, movevars_t *from, movevars_t *to )
|
||||
@@ -1675,7 +1675,7 @@ If force is not set, then nothing at all will be generated if the entity is
|
||||
identical, under the assumption that the in-order delta code will catch it.
|
||||
==================
|
||||
*/
|
||||
void MSG_WriteDeltaEntity( entity_state_t *from, entity_state_t *to, sizebuf_t *msg, qboolean force, int delta_type, float timebase, int baseline )
|
||||
void MSG_WriteDeltaEntity( entity_state_t *from, entity_state_t *to, sizebuf_t *msg, qboolean force, int delta_type, float timebase, int baseline )
|
||||
{
|
||||
delta_info_t *dt = NULL;
|
||||
delta_t *pField;
|
||||
@@ -1715,7 +1715,7 @@ void MSG_WriteDeltaEntity( entity_state_t *from, entity_state_t *to, sizebuf_t *
|
||||
MSG_WriteOneBit( msg, 1 );
|
||||
MSG_WriteSBitLong( msg, baseline, 7 );
|
||||
}
|
||||
else MSG_WriteOneBit( msg, 0 );
|
||||
else MSG_WriteOneBit( msg, 0 );
|
||||
|
||||
if( force || ( to->entityType != from->entityType ))
|
||||
{
|
||||
@@ -1739,7 +1739,7 @@ void MSG_WriteDeltaEntity( entity_state_t *from, entity_state_t *to, sizebuf_t *
|
||||
}
|
||||
|
||||
Assert( dt && dt->bInitialized );
|
||||
|
||||
|
||||
pField = dt->pFields;
|
||||
Assert( pField != NULL );
|
||||
|
||||
@@ -1802,7 +1802,7 @@ qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state
|
||||
}
|
||||
|
||||
if( fRemoveType & 2 )
|
||||
{
|
||||
{
|
||||
// entity was removed from server
|
||||
to->number = -1;
|
||||
return false;
|
||||
@@ -1875,7 +1875,7 @@ qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state
|
||||
=============================================================================
|
||||
|
||||
game.dll interface
|
||||
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
void GAME_EXPORT Delta_AddEncoder( char *name, pfnDeltaEncode encodeFunc )
|
||||
@@ -1897,7 +1897,7 @@ void GAME_EXPORT Delta_AddEncoder( char *name, pfnDeltaEncode encodeFunc )
|
||||
}
|
||||
|
||||
// register new encode func
|
||||
dt->userCallback = encodeFunc;
|
||||
dt->userCallback = encodeFunc;
|
||||
}
|
||||
|
||||
int GAME_EXPORT Delta_FindField( delta_t *pFields, const char *fieldname )
|
||||
|
||||
Reference in New Issue
Block a user