mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-21 12:11:07 +00:00
s/ReadLong/ReadInt/ to match the return type
This commit is contained in:
parent
814abb55b9
commit
431415c51c
27 changed files with 75 additions and 75 deletions
|
@ -4845,7 +4845,7 @@ idEntity::ReadColorFromSnapshot
|
|||
void idEntity::ReadColorFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
idVec4 color;
|
||||
|
||||
UnpackColor( msg.ReadLong(), color );
|
||||
UnpackColor( msg.ReadInt(), color );
|
||||
renderEntity.shaderParms[ SHADERPARM_RED ] = color[0];
|
||||
renderEntity.shaderParms[ SHADERPARM_GREEN ] = color[1];
|
||||
renderEntity.shaderParms[ SHADERPARM_BLUE ] = color[2];
|
||||
|
@ -5012,7 +5012,7 @@ bool idEntity::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
|
|||
common->DPrintf( "ent 0x%x: start sound shader too old (%d ms)\n", entityNumber, gameLocal.realClientTime - time );
|
||||
return true;
|
||||
}
|
||||
index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadLong() );
|
||||
index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadInt() );
|
||||
if ( index >= 0 && index < declManager->GetNumDecls( DECL_SOUND ) ) {
|
||||
shader = declManager->SoundByIndex( index, false );
|
||||
channel = (s_channelType)msg.ReadByte();
|
||||
|
@ -5501,8 +5501,8 @@ bool idAnimatedEntity::ClientReceiveEvent( int event, int time, const idBitMsg &
|
|||
localOrigin[2] = msg.ReadFloat();
|
||||
localNormal = msg.ReadDir( 24 );
|
||||
localDir = msg.ReadDir( 24 );
|
||||
damageDefIndex = gameLocal.ClientRemapDecl( DECL_ENTITYDEF, msg.ReadLong() );
|
||||
materialIndex = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadLong() );
|
||||
damageDefIndex = gameLocal.ClientRemapDecl( DECL_ENTITYDEF, msg.ReadInt() );
|
||||
materialIndex = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadInt() );
|
||||
const idDeclEntityDef *damageDef = static_cast<const idDeclEntityDef *>( declManager->DeclByIndex( DECL_ENTITYDEF, damageDefIndex ) );
|
||||
const idMaterial *collisionMaterial = static_cast<const idMaterial *>( declManager->DeclByIndex( DECL_MATERIAL, materialIndex ) );
|
||||
AddLocalDamageEffect( jointNum, localOrigin, localNormal, localDir, damageDef, collisionMaterial );
|
||||
|
|
|
@ -768,8 +768,8 @@ void idEntityFx::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
|
||||
GetPhysics()->ReadFromSnapshot( msg );
|
||||
ReadBindFromSnapshot( msg );
|
||||
fx_index = gameLocal.ClientRemapDecl( DECL_FX, msg.ReadLong() );
|
||||
start_time = msg.ReadLong();
|
||||
fx_index = gameLocal.ClientRemapDecl( DECL_FX, msg.ReadInt() );
|
||||
start_time = msg.ReadInt();
|
||||
|
||||
if ( fx_index != -1 && start_time > 0 && !fxEffect && started < 0 ) {
|
||||
spawnArgs.GetInt( "effect_lapse", "1000", max_lapse );
|
||||
|
|
|
@ -820,7 +820,7 @@ void idGameLocal::ServerProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_VCHAT: {
|
||||
int index = msg.ReadLong();
|
||||
int index = msg.ReadInt();
|
||||
bool team = msg.ReadBits( 1 ) != 0;
|
||||
mpGame.ProcessVoiceChat( clientNum, team, index );
|
||||
break;
|
||||
|
@ -858,7 +858,7 @@ void idGameLocal::ServerProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
|
||||
event->spawnId = msg.ReadBits( 32 );
|
||||
event->event = msg.ReadByte();
|
||||
event->time = msg.ReadLong();
|
||||
event->time = msg.ReadInt();
|
||||
|
||||
event->paramsSize = msg.ReadBits( idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
|
@ -1025,7 +1025,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
|
|||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
idRandom tagRandom;
|
||||
tagRandom.SetSeed( msg.ReadLong() );
|
||||
tagRandom.SetSeed( msg.ReadInt() );
|
||||
#endif
|
||||
|
||||
// read all entities from the snapshot
|
||||
|
@ -1103,7 +1103,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
|
|||
ent->snapshotBits = msg.GetNumBitsRead() - numBitsRead;
|
||||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
if ( msg.ReadLong() != tagRandom.RandomInt() ) {
|
||||
if ( msg.ReadInt() != tagRandom.RandomInt() ) {
|
||||
cmdSystem->BufferCommandText( CMD_EXEC_NOW, "writeGameState" );
|
||||
if ( entityDefNumber >= 0 && entityDefNumber < declManager->GetNumDecls( DECL_ENTITYDEF ) ) {
|
||||
classname = declManager->DeclByIndex( DECL_ENTITYDEF, entityDefNumber, false )->GetName();
|
||||
|
@ -1156,7 +1156,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
|
|||
sourceAreas[ i++ ] = 0;
|
||||
}
|
||||
for ( i = 0; i < idEntity::MAX_PVS_AREAS; i++ ) {
|
||||
serverPVS[ i ] = msg.ReadLong();
|
||||
serverPVS[ i ] = msg.ReadInt();
|
||||
}
|
||||
if ( memcmp( sourceAreas, serverPVS, idEntity::MAX_PVS_AREAS * sizeof( int ) ) ) {
|
||||
common->Warning( "client PVS areas != server PVS areas, sequence 0x%x", sequence );
|
||||
|
@ -1347,7 +1347,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
char name[MAX_STRING_CHARS];
|
||||
|
||||
type = msg.ReadByte();
|
||||
index = msg.ReadLong();
|
||||
index = msg.ReadInt();
|
||||
msg.ReadString( name, sizeof( name ) );
|
||||
|
||||
const idDecl *decl = declManager->FindType( (declType_t)type, name, false );
|
||||
|
@ -1361,7 +1361,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
}
|
||||
case GAME_RELIABLE_MESSAGE_SPAWN_PLAYER: {
|
||||
int client = msg.ReadByte();
|
||||
int spawnId = msg.ReadLong();
|
||||
int spawnId = msg.ReadInt();
|
||||
if ( !entities[ client ] ) {
|
||||
SpawnPlayer( client );
|
||||
entities[ client ]->FreeModelDef();
|
||||
|
@ -1395,7 +1395,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_SOUND_INDEX: {
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadLong() );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadInt() );
|
||||
if ( index >= 0 && index < declManager->GetNumDecls( DECL_SOUND ) ) {
|
||||
const idSoundShader *shader = declManager->SoundByIndex( index );
|
||||
mpGame.PlayGlobalSound( -1, SND_COUNT, shader->GetName() );
|
||||
|
@ -1419,7 +1419,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
|
||||
event->spawnId = msg.ReadBits( 32 );
|
||||
event->event = msg.ReadByte();
|
||||
event->time = msg.ReadLong();
|
||||
event->time = msg.ReadInt();
|
||||
|
||||
event->paramsSize = msg.ReadBits( idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
|
@ -1474,7 +1474,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_PORTALSTATES: {
|
||||
int numPortals = msg.ReadLong();
|
||||
int numPortals = msg.ReadInt();
|
||||
assert( numPortals == gameRenderWorld->NumPortals() );
|
||||
for ( int i = 0; i < numPortals; i++ ) {
|
||||
gameRenderWorld->SetPortalState( (qhandle_t) (i+1), msg.ReadBits( NUM_RENDER_PORTAL_BITS ) );
|
||||
|
@ -1482,7 +1482,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_PORTAL: {
|
||||
qhandle_t portal = msg.ReadLong();
|
||||
qhandle_t portal = msg.ReadInt();
|
||||
int blockingBits = msg.ReadBits( NUM_RENDER_PORTAL_BITS );
|
||||
assert( portal > 0 && portal <= gameRenderWorld->NumPortals() );
|
||||
gameRenderWorld->SetPortalState( portal, blockingBits );
|
||||
|
|
|
@ -1107,14 +1107,14 @@ void idLight::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
Off();
|
||||
}
|
||||
}
|
||||
UnpackColor( msg.ReadLong(), baseColor );
|
||||
UnpackColor( msg.ReadInt(), baseColor );
|
||||
// lightParentEntityNum = msg.ReadBits( GENTITYNUM_BITS );
|
||||
|
||||
/* // only helps prediction
|
||||
UnpackColor( msg.ReadLong(), fadeFrom );
|
||||
UnpackColor( msg.ReadLong(), fadeTo );
|
||||
fadeStart = msg.ReadLong();
|
||||
fadeEnd = msg.ReadLong();
|
||||
UnpackColor( msg.ReadInt(), fadeFrom );
|
||||
UnpackColor( msg.ReadInt(), fadeTo );
|
||||
fadeStart = msg.ReadInt();
|
||||
fadeEnd = msg.ReadInt();
|
||||
*/
|
||||
|
||||
// FIXME: read renderLight.shader
|
||||
|
@ -1122,14 +1122,14 @@ void idLight::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
renderLight.lightRadius[1] = msg.ReadFloat( 5, 10 );
|
||||
renderLight.lightRadius[2] = msg.ReadFloat( 5, 10 );
|
||||
|
||||
UnpackColor( msg.ReadLong(), shaderColor );
|
||||
UnpackColor( msg.ReadInt(), shaderColor );
|
||||
renderLight.shaderParms[SHADERPARM_RED] = shaderColor[0];
|
||||
renderLight.shaderParms[SHADERPARM_GREEN] = shaderColor[1];
|
||||
renderLight.shaderParms[SHADERPARM_BLUE] = shaderColor[2];
|
||||
renderLight.shaderParms[SHADERPARM_ALPHA] = shaderColor[3];
|
||||
|
||||
renderLight.shaderParms[SHADERPARM_TIMESCALE] = msg.ReadFloat( 5, 10 );
|
||||
renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = msg.ReadLong();
|
||||
renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = msg.ReadInt();
|
||||
//renderLight.shaderParms[SHADERPARM_DIVERSITY] = msg.ReadFloat();
|
||||
renderLight.shaderParms[SHADERPARM_MODE] = msg.ReadShort();
|
||||
|
||||
|
|
|
@ -1346,7 +1346,7 @@ bool idExplodingBarrel::ClientReceiveEvent( int event, int time, const idBitMsg
|
|||
|
||||
switch( event ) {
|
||||
case EVENT_EXPLODE:
|
||||
if ( gameLocal.realClientTime - msg.ReadLong() < spawnArgs.GetInt( "explode_lapse", "1000" ) ) {
|
||||
if ( gameLocal.realClientTime - msg.ReadInt() < spawnArgs.GetInt( "explode_lapse", "1000" ) ) {
|
||||
ExplodingEffects( );
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -4122,7 +4122,7 @@ void idMultiplayerGame::ClientReadStartState( const idBitMsg &msg ) {
|
|||
|
||||
// read the state in preparation for reading snapshot updates
|
||||
gameState = (idMultiplayerGame::gameState_t)msg.ReadByte();
|
||||
matchStartedTime = msg.ReadLong( );
|
||||
matchStartedTime = msg.ReadInt( );
|
||||
startFragLimit = msg.ReadShort( );
|
||||
while ( ( client = msg.ReadShort() ) != MAX_CLIENTS ) {
|
||||
assert( gameLocal.entities[ client ] && gameLocal.entities[ client ]->IsType( idPlayer::Type ) );
|
||||
|
@ -4143,7 +4143,7 @@ idMultiplayerGame::ClientReadWarmupTime
|
|||
================
|
||||
*/
|
||||
void idMultiplayerGame::ClientReadWarmupTime( const idBitMsg &msg ) {
|
||||
warmupEndTime = msg.ReadLong();
|
||||
warmupEndTime = msg.ReadInt();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -9727,10 +9727,10 @@ void idPlayer::ReadPlayerStateFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
int i, ammo;
|
||||
|
||||
bobCycle = msg.ReadByte();
|
||||
stepUpTime = msg.ReadLong();
|
||||
stepUpTime = msg.ReadInt();
|
||||
stepUpDelta = msg.ReadFloat();
|
||||
#ifdef _D3XP
|
||||
inventory.weapons = msg.ReadLong();
|
||||
inventory.weapons = msg.ReadInt();
|
||||
#else
|
||||
inventory.weapons = msg.ReadShort();
|
||||
#endif
|
||||
|
|
|
@ -1375,7 +1375,7 @@ bool idProjectile::ClientReceiveEvent( int event, int time, const idBitMsg &msg
|
|||
collision.c.point[1] = msg.ReadFloat();
|
||||
collision.c.point[2] = msg.ReadFloat();
|
||||
collision.c.normal = msg.ReadDir( 24 );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadLong() );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadInt() );
|
||||
collision.c.material = ( index != -1 ) ? static_cast<const idMaterial *>( declManager->DeclByIndex( DECL_MATERIAL, index ) ) : NULL;
|
||||
velocity[0] = msg.ReadFloat( 5, 10 );
|
||||
velocity[1] = msg.ReadFloat( 5, 10 );
|
||||
|
|
|
@ -2749,7 +2749,7 @@ bool idWeapon::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
|
|||
return true;
|
||||
}
|
||||
case EVENT_CHANGESKIN: {
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SKIN, msg.ReadLong() );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SKIN, msg.ReadInt() );
|
||||
renderEntity.customSkin = ( index != -1 ) ? static_cast<const idDeclSkin *>( declManager->DeclByIndex( DECL_SKIN, index ) ) : NULL;
|
||||
UpdateVisuals();
|
||||
if ( worldModel.GetEntity() ) {
|
||||
|
|
|
@ -7972,7 +7972,7 @@ void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
int i, num id_attribute((unused));
|
||||
idCQuat quat;
|
||||
|
||||
current.atRest = msg.ReadLong();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.noMoveTime = msg.ReadFloat();
|
||||
current.activateTime = msg.ReadFloat();
|
||||
current.pushVelocity[0] = msg.ReadDeltaFloat( 0.0f, AF_VELOCITY_EXPONENT_BITS, AF_VELOCITY_MANTISSA_BITS );
|
||||
|
|
|
@ -802,6 +802,6 @@ void idPhysics_Monster::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
current.pushVelocity[0] = msg.ReadDeltaFloat( 0.0f, MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
current.pushVelocity[1] = msg.ReadDeltaFloat( 0.0f, MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
current.pushVelocity[2] = msg.ReadDeltaFloat( 0.0f, MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
current.atRest = msg.ReadLong();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.onGround = msg.ReadBits( 1 ) != 0;
|
||||
}
|
||||
|
|
|
@ -1106,8 +1106,8 @@ void idPhysics_Parametric::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
idVec3 linearStartValue, linearSpeed, linearBaseSpeed, startPos, endPos;
|
||||
idAngles angularStartValue, angularSpeed, angularBaseSpeed, startAng, endAng;
|
||||
|
||||
current.time = msg.ReadLong();
|
||||
current.atRest = msg.ReadLong();
|
||||
current.time = msg.ReadInt();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.origin[0] = msg.ReadFloat();
|
||||
current.origin[1] = msg.ReadFloat();
|
||||
current.origin[2] = msg.ReadFloat();
|
||||
|
|
|
@ -1504,7 +1504,7 @@ idPhysics_RigidBody::ReadFromSnapshot
|
|||
void idPhysics_RigidBody::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
idCQuat quat, localQuat;
|
||||
|
||||
current.atRest = msg.ReadLong();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.i.position[0] = msg.ReadFloat();
|
||||
current.i.position[1] = msg.ReadFloat();
|
||||
current.i.position[2] = msg.ReadFloat();
|
||||
|
|
|
@ -4671,7 +4671,7 @@ idEntity::ReadColorFromSnapshot
|
|||
void idEntity::ReadColorFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
idVec4 color;
|
||||
|
||||
UnpackColor( msg.ReadLong(), color );
|
||||
UnpackColor( msg.ReadInt(), color );
|
||||
renderEntity.shaderParms[ SHADERPARM_RED ] = color[0];
|
||||
renderEntity.shaderParms[ SHADERPARM_GREEN ] = color[1];
|
||||
renderEntity.shaderParms[ SHADERPARM_BLUE ] = color[2];
|
||||
|
@ -4838,7 +4838,7 @@ bool idEntity::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
|
|||
common->DPrintf( "ent 0x%x: start sound shader too old (%d ms)\n", entityNumber, gameLocal.realClientTime - time );
|
||||
return true;
|
||||
}
|
||||
index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadLong() );
|
||||
index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadInt() );
|
||||
if ( index >= 0 && index < declManager->GetNumDecls( DECL_SOUND ) ) {
|
||||
shader = declManager->SoundByIndex( index, false );
|
||||
channel = (s_channelType)msg.ReadByte();
|
||||
|
@ -5289,8 +5289,8 @@ bool idAnimatedEntity::ClientReceiveEvent( int event, int time, const idBitMsg &
|
|||
localOrigin[2] = msg.ReadFloat();
|
||||
localNormal = msg.ReadDir( 24 );
|
||||
localDir = msg.ReadDir( 24 );
|
||||
damageDefIndex = gameLocal.ClientRemapDecl( DECL_ENTITYDEF, msg.ReadLong() );
|
||||
materialIndex = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadLong() );
|
||||
damageDefIndex = gameLocal.ClientRemapDecl( DECL_ENTITYDEF, msg.ReadInt() );
|
||||
materialIndex = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadInt() );
|
||||
const idDeclEntityDef *damageDef = static_cast<const idDeclEntityDef *>( declManager->DeclByIndex( DECL_ENTITYDEF, damageDefIndex ) );
|
||||
const idMaterial *collisionMaterial = static_cast<const idMaterial *>( declManager->DeclByIndex( DECL_MATERIAL, materialIndex ) );
|
||||
AddLocalDamageEffect( jointNum, localOrigin, localNormal, localDir, damageDef, collisionMaterial );
|
||||
|
|
|
@ -738,8 +738,8 @@ void idEntityFx::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
|
||||
GetPhysics()->ReadFromSnapshot( msg );
|
||||
ReadBindFromSnapshot( msg );
|
||||
fx_index = gameLocal.ClientRemapDecl( DECL_FX, msg.ReadLong() );
|
||||
start_time = msg.ReadLong();
|
||||
fx_index = gameLocal.ClientRemapDecl( DECL_FX, msg.ReadInt() );
|
||||
start_time = msg.ReadInt();
|
||||
|
||||
if ( fx_index != -1 && start_time > 0 && !fxEffect && started < 0 ) {
|
||||
spawnArgs.GetInt( "effect_lapse", "1000", max_lapse );
|
||||
|
|
|
@ -806,7 +806,7 @@ void idGameLocal::ServerProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_VCHAT: {
|
||||
int index = msg.ReadLong();
|
||||
int index = msg.ReadInt();
|
||||
bool team = msg.ReadBits( 1 ) != 0;
|
||||
mpGame.ProcessVoiceChat( clientNum, team, index );
|
||||
break;
|
||||
|
@ -844,7 +844,7 @@ void idGameLocal::ServerProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
|
||||
event->spawnId = msg.ReadBits( 32 );
|
||||
event->event = msg.ReadByte();
|
||||
event->time = msg.ReadLong();
|
||||
event->time = msg.ReadInt();
|
||||
|
||||
event->paramsSize = msg.ReadBits( idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
|
@ -1011,7 +1011,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
|
|||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
idRandom tagRandom;
|
||||
tagRandom.SetSeed( msg.ReadLong() );
|
||||
tagRandom.SetSeed( msg.ReadInt() );
|
||||
#endif
|
||||
|
||||
// read all entities from the snapshot
|
||||
|
@ -1089,7 +1089,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
|
|||
ent->snapshotBits = msg.GetNumBitsRead() - numBitsRead;
|
||||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
if ( msg.ReadLong() != tagRandom.RandomInt() ) {
|
||||
if ( msg.ReadInt() != tagRandom.RandomInt() ) {
|
||||
cmdSystem->BufferCommandText( CMD_EXEC_NOW, "writeGameState" );
|
||||
if ( entityDefNumber >= 0 && entityDefNumber < declManager->GetNumDecls( DECL_ENTITYDEF ) ) {
|
||||
classname = declManager->DeclByIndex( DECL_ENTITYDEF, entityDefNumber, false )->GetName();
|
||||
|
@ -1128,7 +1128,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
|
|||
sourceAreas[ i++ ] = 0;
|
||||
}
|
||||
for ( i = 0; i < idEntity::MAX_PVS_AREAS; i++ ) {
|
||||
serverPVS[ i ] = msg.ReadLong();
|
||||
serverPVS[ i ] = msg.ReadInt();
|
||||
}
|
||||
if ( memcmp( sourceAreas, serverPVS, idEntity::MAX_PVS_AREAS * sizeof( int ) ) ) {
|
||||
common->Warning( "client PVS areas != server PVS areas, sequence 0x%x", sequence );
|
||||
|
@ -1315,7 +1315,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
char name[MAX_STRING_CHARS];
|
||||
|
||||
type = msg.ReadByte();
|
||||
index = msg.ReadLong();
|
||||
index = msg.ReadInt();
|
||||
msg.ReadString( name, sizeof( name ) );
|
||||
|
||||
const idDecl *decl = declManager->FindType( (declType_t)type, name, false );
|
||||
|
@ -1329,7 +1329,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
}
|
||||
case GAME_RELIABLE_MESSAGE_SPAWN_PLAYER: {
|
||||
int client = msg.ReadByte();
|
||||
int spawnId = msg.ReadLong();
|
||||
int spawnId = msg.ReadInt();
|
||||
if ( !entities[ client ] ) {
|
||||
SpawnPlayer( client );
|
||||
entities[ client ]->FreeModelDef();
|
||||
|
@ -1363,7 +1363,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_SOUND_INDEX: {
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadLong() );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SOUND, msg.ReadInt() );
|
||||
if ( index >= 0 && index < declManager->GetNumDecls( DECL_SOUND ) ) {
|
||||
const idSoundShader *shader = declManager->SoundByIndex( index );
|
||||
mpGame.PlayGlobalSound( -1, SND_COUNT, shader->GetName() );
|
||||
|
@ -1387,7 +1387,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
|
||||
event->spawnId = msg.ReadBits( 32 );
|
||||
event->event = msg.ReadByte();
|
||||
event->time = msg.ReadLong();
|
||||
event->time = msg.ReadInt();
|
||||
|
||||
event->paramsSize = msg.ReadBits( idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
|
@ -1434,7 +1434,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_PORTALSTATES: {
|
||||
int numPortals = msg.ReadLong();
|
||||
int numPortals = msg.ReadInt();
|
||||
assert( numPortals == gameRenderWorld->NumPortals() );
|
||||
for ( int i = 0; i < numPortals; i++ ) {
|
||||
gameRenderWorld->SetPortalState( (qhandle_t) (i+1), msg.ReadBits( NUM_RENDER_PORTAL_BITS ) );
|
||||
|
@ -1442,7 +1442,7 @@ void idGameLocal::ClientProcessReliableMessage( int clientNum, const idBitMsg &m
|
|||
break;
|
||||
}
|
||||
case GAME_RELIABLE_MESSAGE_PORTAL: {
|
||||
qhandle_t portal = msg.ReadLong();
|
||||
qhandle_t portal = msg.ReadInt();
|
||||
int blockingBits = msg.ReadBits( NUM_RENDER_PORTAL_BITS );
|
||||
assert( portal > 0 && portal <= gameRenderWorld->NumPortals() );
|
||||
gameRenderWorld->SetPortalState( portal, blockingBits );
|
||||
|
|
|
@ -1100,14 +1100,14 @@ void idLight::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
Off();
|
||||
}
|
||||
}
|
||||
UnpackColor( msg.ReadLong(), baseColor );
|
||||
UnpackColor( msg.ReadInt(), baseColor );
|
||||
// lightParentEntityNum = msg.ReadBits( GENTITYNUM_BITS );
|
||||
|
||||
/* // only helps prediction
|
||||
UnpackColor( msg.ReadLong(), fadeFrom );
|
||||
UnpackColor( msg.ReadLong(), fadeTo );
|
||||
fadeStart = msg.ReadLong();
|
||||
fadeEnd = msg.ReadLong();
|
||||
UnpackColor( msg.ReadInt(), fadeFrom );
|
||||
UnpackColor( msg.ReadInt(), fadeTo );
|
||||
fadeStart = msg.ReadInt();
|
||||
fadeEnd = msg.ReadInt();
|
||||
*/
|
||||
|
||||
// FIXME: read renderLight.shader
|
||||
|
@ -1115,14 +1115,14 @@ void idLight::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
renderLight.lightRadius[1] = msg.ReadFloat( 5, 10 );
|
||||
renderLight.lightRadius[2] = msg.ReadFloat( 5, 10 );
|
||||
|
||||
UnpackColor( msg.ReadLong(), shaderColor );
|
||||
UnpackColor( msg.ReadInt(), shaderColor );
|
||||
renderLight.shaderParms[SHADERPARM_RED] = shaderColor[0];
|
||||
renderLight.shaderParms[SHADERPARM_GREEN] = shaderColor[1];
|
||||
renderLight.shaderParms[SHADERPARM_BLUE] = shaderColor[2];
|
||||
renderLight.shaderParms[SHADERPARM_ALPHA] = shaderColor[3];
|
||||
|
||||
renderLight.shaderParms[SHADERPARM_TIMESCALE] = msg.ReadFloat( 5, 10 );
|
||||
renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = msg.ReadLong();
|
||||
renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = msg.ReadInt();
|
||||
//renderLight.shaderParms[SHADERPARM_DIVERSITY] = msg.ReadFloat();
|
||||
renderLight.shaderParms[SHADERPARM_MODE] = msg.ReadShort();
|
||||
|
||||
|
|
|
@ -1182,7 +1182,7 @@ bool idExplodingBarrel::ClientReceiveEvent( int event, int time, const idBitMsg
|
|||
|
||||
switch( event ) {
|
||||
case EVENT_EXPLODE:
|
||||
if ( gameLocal.realClientTime - msg.ReadLong() < spawnArgs.GetInt( "explode_lapse", "1000" ) ) {
|
||||
if ( gameLocal.realClientTime - msg.ReadInt() < spawnArgs.GetInt( "explode_lapse", "1000" ) ) {
|
||||
ExplodingEffects( );
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -3388,7 +3388,7 @@ void idMultiplayerGame::ClientReadStartState( const idBitMsg &msg ) {
|
|||
|
||||
// read the state in preparation for reading snapshot updates
|
||||
gameState = (idMultiplayerGame::gameState_t)msg.ReadByte();
|
||||
matchStartedTime = msg.ReadLong( );
|
||||
matchStartedTime = msg.ReadInt( );
|
||||
startFragLimit = msg.ReadShort( );
|
||||
while ( ( client = msg.ReadShort() ) != MAX_CLIENTS ) {
|
||||
assert( gameLocal.entities[ client ] && gameLocal.entities[ client ]->IsType( idPlayer::Type ) );
|
||||
|
@ -3409,5 +3409,5 @@ idMultiplayerGame::ClientReadWarmupTime
|
|||
================
|
||||
*/
|
||||
void idMultiplayerGame::ClientReadWarmupTime( const idBitMsg &msg ) {
|
||||
warmupEndTime = msg.ReadLong();
|
||||
warmupEndTime = msg.ReadInt();
|
||||
}
|
||||
|
|
|
@ -8187,7 +8187,7 @@ void idPlayer::ReadPlayerStateFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
int i, ammo;
|
||||
|
||||
bobCycle = msg.ReadByte();
|
||||
stepUpTime = msg.ReadLong();
|
||||
stepUpTime = msg.ReadInt();
|
||||
stepUpDelta = msg.ReadFloat();
|
||||
inventory.weapons = msg.ReadShort();
|
||||
inventory.armor = msg.ReadByte();
|
||||
|
|
|
@ -1202,7 +1202,7 @@ bool idProjectile::ClientReceiveEvent( int event, int time, const idBitMsg &msg
|
|||
collision.c.point[1] = msg.ReadFloat();
|
||||
collision.c.point[2] = msg.ReadFloat();
|
||||
collision.c.normal = msg.ReadDir( 24 );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadLong() );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_MATERIAL, msg.ReadInt() );
|
||||
collision.c.material = ( index != -1 ) ? static_cast<const idMaterial *>( declManager->DeclByIndex( DECL_MATERIAL, index ) ) : NULL;
|
||||
velocity[0] = msg.ReadFloat( 5, 10 );
|
||||
velocity[1] = msg.ReadFloat( 5, 10 );
|
||||
|
|
|
@ -2321,7 +2321,7 @@ bool idWeapon::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
|
|||
return true;
|
||||
}
|
||||
case EVENT_CHANGESKIN: {
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SKIN, msg.ReadLong() );
|
||||
int index = gameLocal.ClientRemapDecl( DECL_SKIN, msg.ReadInt() );
|
||||
renderEntity.customSkin = ( index != -1 ) ? static_cast<const idDeclSkin *>( declManager->DeclByIndex( DECL_SKIN, index ) ) : NULL;
|
||||
UpdateVisuals();
|
||||
if ( worldModel.GetEntity() ) {
|
||||
|
|
|
@ -7971,7 +7971,7 @@ void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
int i, num id_attribute((unused));
|
||||
idCQuat quat;
|
||||
|
||||
current.atRest = msg.ReadLong();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.noMoveTime = msg.ReadFloat();
|
||||
current.activateTime = msg.ReadFloat();
|
||||
current.pushVelocity[0] = msg.ReadDeltaFloat( 0.0f, AF_VELOCITY_EXPONENT_BITS, AF_VELOCITY_MANTISSA_BITS );
|
||||
|
|
|
@ -802,6 +802,6 @@ void idPhysics_Monster::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
current.pushVelocity[0] = msg.ReadDeltaFloat( 0.0f, MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
current.pushVelocity[1] = msg.ReadDeltaFloat( 0.0f, MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
current.pushVelocity[2] = msg.ReadDeltaFloat( 0.0f, MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
current.atRest = msg.ReadLong();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.onGround = msg.ReadBits( 1 ) != 0;
|
||||
}
|
||||
|
|
|
@ -1106,8 +1106,8 @@ void idPhysics_Parametric::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|||
idVec3 linearStartValue, linearSpeed, linearBaseSpeed, startPos, endPos;
|
||||
idAngles angularStartValue, angularSpeed, angularBaseSpeed, startAng, endAng;
|
||||
|
||||
current.time = msg.ReadLong();
|
||||
current.atRest = msg.ReadLong();
|
||||
current.time = msg.ReadInt();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.origin[0] = msg.ReadFloat();
|
||||
current.origin[1] = msg.ReadFloat();
|
||||
current.origin[2] = msg.ReadFloat();
|
||||
|
|
|
@ -1504,7 +1504,7 @@ idPhysics_RigidBody::ReadFromSnapshot
|
|||
void idPhysics_RigidBody::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
idCQuat quat, localQuat;
|
||||
|
||||
current.atRest = msg.ReadLong();
|
||||
current.atRest = msg.ReadInt();
|
||||
current.i.position[0] = msg.ReadFloat();
|
||||
current.i.position[1] = msg.ReadFloat();
|
||||
current.i.position[2] = msg.ReadFloat();
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
int ReadByte( void ) const;
|
||||
int ReadShort( void ) const;
|
||||
int ReadUShort( void ) const;
|
||||
int ReadLong( void ) const;
|
||||
int ReadInt( void ) const;
|
||||
float ReadFloat( void ) const;
|
||||
float ReadFloat( int exponentBits, int mantissaBits ) const;
|
||||
float ReadAngle8( void ) const;
|
||||
|
@ -376,7 +376,7 @@ ID_INLINE int idBitMsg::ReadUShort( void ) const {
|
|||
return (unsigned short)ReadBits( 16 );
|
||||
}
|
||||
|
||||
ID_INLINE int idBitMsg::ReadLong( void ) const {
|
||||
ID_INLINE int idBitMsg::ReadInt( void ) const {
|
||||
return ReadBits( 32 );
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ public:
|
|||
int ReadByte( void ) const;
|
||||
int ReadShort( void ) const;
|
||||
int ReadUShort( void ) const;
|
||||
int ReadLong( void ) const;
|
||||
int ReadInt( void ) const;
|
||||
float ReadFloat( void ) const;
|
||||
float ReadFloat( int exponentBits, int mantissaBits ) const;
|
||||
float ReadAngle8( void ) const;
|
||||
|
@ -622,7 +622,7 @@ ID_INLINE int idBitMsgDelta::ReadUShort( void ) const {
|
|||
return (unsigned short)ReadBits( 16 );
|
||||
}
|
||||
|
||||
ID_INLINE int idBitMsgDelta::ReadLong( void ) const {
|
||||
ID_INLINE int idBitMsgDelta::ReadInt( void ) const {
|
||||
return ReadBits( 32 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue