mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-03-23 02:41:39 +00:00
s/WriteLong/WriteInt/ to match the argument type
This commit is contained in:
parent
a9ffb336f6
commit
814abb55b9
29 changed files with 83 additions and 83 deletions
|
@ -1689,7 +1689,7 @@ bool idEntity::StartSoundShader( const idSoundShader *shader, const s_channelTyp
|
|||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.BeginWriting();
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteByte( channel );
|
||||
ServerSendEvent( EVENT_STARTSOUNDSHADER, &msg, false, -1 );
|
||||
}
|
||||
|
@ -4834,7 +4834,7 @@ void idEntity::WriteColorToSnapshot( idBitMsgDelta &msg ) const {
|
|||
color[1] = renderEntity.shaderParms[ SHADERPARM_GREEN ];
|
||||
color[2] = renderEntity.shaderParms[ SHADERPARM_BLUE ];
|
||||
color[3] = renderEntity.shaderParms[ SHADERPARM_ALPHA ];
|
||||
msg.WriteLong( PackColor( color ) );
|
||||
msg.WriteInt( PackColor( color ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4925,7 +4925,7 @@ void idEntity::ServerSendEvent( int eventId, const idBitMsg *msg, bool saveEvent
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -4967,7 +4967,7 @@ void idEntity::ClientSendEvent( int eventId, const idBitMsg *msg ) const {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -5348,8 +5348,8 @@ void idAnimatedEntity::AddDamageEffect( const trace_t &collision, const idVec3 &
|
|||
msg.WriteFloat( localOrigin[2] );
|
||||
msg.WriteDir( localNormal, 24 );
|
||||
msg.WriteDir( localDir, 24 );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
ServerSendEvent( EVENT_ADD_DAMAGE_EFFECT, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -754,8 +754,8 @@ idEntityFx::WriteToSnapshot
|
|||
void idEntityFx::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
GetPhysics()->WriteToSnapshot( msg );
|
||||
WriteBindToSnapshot( msg );
|
||||
msg.WriteLong( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteLong( started );
|
||||
msg.WriteInt( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteInt( started );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -4373,7 +4373,7 @@ void idGameLocal::SetPortalState( qhandle_t portal, int blockingBits ) {
|
|||
if ( !gameLocal.isClient ) {
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTAL );
|
||||
outMsg.WriteLong( portal );
|
||||
outMsg.WriteInt( portal );
|
||||
outMsg.WriteBits( blockingBits, NUM_RENDER_PORTAL_BITS );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ void idGameLocal::ServerSendDeclRemapToClient( int clientNum, declType_t type, i
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_REMAP_DECL );
|
||||
outMsg.WriteByte( type );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteString( decl->GetName() );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void idGameLocal::ServerClientBegin( int clientNum ) {
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( clientNum );
|
||||
outMsg.WriteLong( spawnIds[ clientNum ] );
|
||||
outMsg.WriteInt( spawnIds[ clientNum ] );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.BeginWriting( );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( i );
|
||||
outMsg.WriteLong( spawnIds[ i ] );
|
||||
outMsg.WriteInt( spawnIds[ i ] );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( event->spawnId, 32 );
|
||||
outMsg.WriteByte( event->event );
|
||||
outMsg.WriteLong( event->time );
|
||||
outMsg.WriteInt( event->time );
|
||||
outMsg.WriteBits( event->paramsSize, idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
outMsg.WriteData( event->paramsBuf, event->paramsSize );
|
||||
|
@ -421,7 +421,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTALSTATES );
|
||||
outMsg.WriteLong( numPortals );
|
||||
outMsg.WriteInt( numPortals );
|
||||
for ( i = 0; i < numPortals; i++ ) {
|
||||
outMsg.WriteBits( gameRenderWorld->GetPortalState( (qhandle_t) (i+1) ) , NUM_RENDER_PORTAL_BITS );
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_TAGS
|
||||
idRandom tagRandom;
|
||||
tagRandom.SetSeed( random.RandomInt() );
|
||||
msg.WriteLong( tagRandom.GetSeed() );
|
||||
msg.WriteInt( tagRandom.GetSeed() );
|
||||
#endif
|
||||
|
||||
// create the snapshot
|
||||
|
@ -657,7 +657,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
snapshot->firstEntityState = newBase;
|
||||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
msg.WriteLong( tagRandom.RandomInt() );
|
||||
msg.WriteInt( tagRandom.RandomInt() );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -668,9 +668,9 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_PVS
|
||||
for ( i = 0; i < idEntity::MAX_PVS_AREAS; i++ ) {
|
||||
if ( i < numSourceAreas ) {
|
||||
msg.WriteLong( sourceAreas[ i ] );
|
||||
msg.WriteInt( sourceAreas[ i ] );
|
||||
} else {
|
||||
msg.WriteLong( 0 );
|
||||
msg.WriteInt( 0 );
|
||||
}
|
||||
}
|
||||
gameLocal.pvs.WritePVS( pvsHandle, msg );
|
||||
|
|
|
@ -1055,14 +1055,14 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
WriteBindToSnapshot( msg );
|
||||
|
||||
msg.WriteByte( currentLevel );
|
||||
msg.WriteLong( PackColor( baseColor ) );
|
||||
msg.WriteInt( PackColor( baseColor ) );
|
||||
// msg.WriteBits( lightParent.GetEntityNum(), GENTITYNUM_BITS );
|
||||
|
||||
/* // only helps prediction
|
||||
msg.WriteLong( PackColor( fadeFrom ) );
|
||||
msg.WriteLong( PackColor( fadeTo ) );
|
||||
msg.WriteLong( fadeStart );
|
||||
msg.WriteLong( fadeEnd );
|
||||
msg.WriteInt( PackColor( fadeFrom ) );
|
||||
msg.WriteInt( PackColor( fadeTo ) );
|
||||
msg.WriteInt( fadeStart );
|
||||
msg.WriteInt( fadeEnd );
|
||||
*/
|
||||
|
||||
// FIXME: send renderLight.shader
|
||||
|
@ -1070,13 +1070,13 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteFloat( renderLight.lightRadius[1], 5, 10 );
|
||||
msg.WriteFloat( renderLight.lightRadius[2], 5, 10 );
|
||||
|
||||
msg.WriteLong( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
msg.WriteInt( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
renderLight.shaderParms[SHADERPARM_GREEN],
|
||||
renderLight.shaderParms[SHADERPARM_BLUE],
|
||||
renderLight.shaderParms[SHADERPARM_ALPHA] ) ) );
|
||||
|
||||
msg.WriteFloat( renderLight.shaderParms[SHADERPARM_TIMESCALE], 5, 10 );
|
||||
msg.WriteLong( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
msg.WriteInt( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
//msg.WriteByte( renderLight.shaderParms[SHADERPARM_DIVERSITY] );
|
||||
msg.WriteShort( renderLight.shaderParms[SHADERPARM_MODE] );
|
||||
|
||||
|
|
|
@ -1157,7 +1157,7 @@ void idExplodingBarrel::Killed( idEntity *inflictor, idEntity *attacker, int dam
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameLocal.time );
|
||||
msg.WriteInt( gameLocal.time );
|
||||
ServerSendEvent( EVENT_EXPLODE, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1500,7 +1500,7 @@ void idMultiplayerGame::NewState( gameState_t news, idPlayer *player ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
|
||||
break;
|
||||
|
@ -2789,7 +2789,7 @@ void idMultiplayerGame::PlayGlobalSound( int to, snd_evt_t evt, const char *shad
|
|||
return;
|
||||
}
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_INDEX );
|
||||
outMsg.WriteLong( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
outMsg.WriteInt( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
} else {
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_EVENT );
|
||||
outMsg.WriteByte( evt );
|
||||
|
@ -4018,7 +4018,7 @@ void idMultiplayerGame::VoiceChat( const idCmdArgs &args, bool team ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_VCHAT );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteBits( team ? 1 : 0, 1 );
|
||||
networkSystem->ClientSendReliableMessage( outMsg );
|
||||
}
|
||||
|
@ -4083,7 +4083,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_STARTSTATE );
|
||||
// send the game state and start time
|
||||
outMsg.WriteByte( gameState );
|
||||
outMsg.WriteLong( matchStartedTime );
|
||||
outMsg.WriteInt( matchStartedTime );
|
||||
outMsg.WriteShort( startFragLimit );
|
||||
// send the powerup states and the spectate states
|
||||
for( i = 0; i < gameLocal.numClients; i++ ) {
|
||||
|
@ -4107,7 +4107,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
if ( gameState == COUNTDOWN ) {
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9701,10 +9701,10 @@ void idPlayer::WritePlayerStateToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
|
||||
msg.WriteByte( bobCycle );
|
||||
msg.WriteLong( stepUpTime );
|
||||
msg.WriteInt( stepUpTime );
|
||||
msg.WriteFloat( stepUpDelta );
|
||||
#ifdef _D3XP
|
||||
msg.WriteLong( inventory.weapons );
|
||||
msg.WriteInt( inventory.weapons );
|
||||
#else
|
||||
msg.WriteShort( inventory.weapons );
|
||||
#endif
|
||||
|
|
|
@ -718,7 +718,7 @@ void idProjectile::AddDefaultDamageEffect( const trace_t &collision, const idVec
|
|||
msg.WriteFloat( collision.c.point[1] );
|
||||
msg.WriteFloat( collision.c.point[2] );
|
||||
msg.WriteDir( collision.c.normal, 24 );
|
||||
msg.WriteLong( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteInt( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteFloat( velocity[0], 5, 10 );
|
||||
msg.WriteFloat( velocity[1], 5, 10 );
|
||||
msg.WriteFloat( velocity[2], 5, 10 );
|
||||
|
|
|
@ -3154,7 +3154,7 @@ void idWeapon::Event_SetSkin( const char *skinname ) {
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
msg.WriteInt( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
ServerSendEvent( EVENT_CHANGESKIN, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7925,7 +7925,7 @@ void idPhysics_AF::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
idCQuat quat;
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.noMoveTime );
|
||||
msg.WriteFloat( current.activateTime );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], AF_VELOCITY_EXPONENT_BITS, AF_VELOCITY_MANTISSA_BITS );
|
||||
|
|
|
@ -780,7 +780,7 @@ void idPhysics_Monster::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[1], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[2], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteBits( current.onGround, 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -1031,8 +1031,8 @@ idPhysics_Parametric::WriteToSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_Parametric::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
msg.WriteLong( current.time );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.time );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.origin[0] );
|
||||
msg.WriteFloat( current.origin[1] );
|
||||
msg.WriteFloat( current.origin[2] );
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void idPhysics_RigidBody::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
quat = current.i.orientation.ToCQuat();
|
||||
localQuat = current.localAxis.ToCQuat();
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.i.position[0] );
|
||||
msg.WriteFloat( current.i.position[1] );
|
||||
msg.WriteFloat( current.i.position[2] );
|
||||
|
|
|
@ -1597,7 +1597,7 @@ bool idEntity::StartSoundShader( const idSoundShader *shader, const s_channelTyp
|
|||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.BeginWriting();
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteByte( channel );
|
||||
ServerSendEvent( EVENT_STARTSOUNDSHADER, &msg, false, -1 );
|
||||
}
|
||||
|
@ -4660,7 +4660,7 @@ void idEntity::WriteColorToSnapshot( idBitMsgDelta &msg ) const {
|
|||
color[1] = renderEntity.shaderParms[ SHADERPARM_GREEN ];
|
||||
color[2] = renderEntity.shaderParms[ SHADERPARM_BLUE ];
|
||||
color[3] = renderEntity.shaderParms[ SHADERPARM_ALPHA ];
|
||||
msg.WriteLong( PackColor( color ) );
|
||||
msg.WriteInt( PackColor( color ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4751,7 +4751,7 @@ void idEntity::ServerSendEvent( int eventId, const idBitMsg *msg, bool saveEvent
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -4793,7 +4793,7 @@ void idEntity::ClientSendEvent( int eventId, const idBitMsg *msg ) const {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -5140,8 +5140,8 @@ void idAnimatedEntity::AddDamageEffect( const trace_t &collision, const idVec3 &
|
|||
msg.WriteFloat( localOrigin[2] );
|
||||
msg.WriteDir( localNormal, 24 );
|
||||
msg.WriteDir( localDir, 24 );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
ServerSendEvent( EVENT_ADD_DAMAGE_EFFECT, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -724,8 +724,8 @@ idEntityFx::WriteToSnapshot
|
|||
void idEntityFx::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
GetPhysics()->WriteToSnapshot( msg );
|
||||
WriteBindToSnapshot( msg );
|
||||
msg.WriteLong( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteLong( started );
|
||||
msg.WriteInt( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteInt( started );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -4074,7 +4074,7 @@ void idGameLocal::SetPortalState( qhandle_t portal, int blockingBits ) {
|
|||
if ( !gameLocal.isClient ) {
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTAL );
|
||||
outMsg.WriteLong( portal );
|
||||
outMsg.WriteInt( portal );
|
||||
outMsg.WriteBits( blockingBits, NUM_RENDER_PORTAL_BITS );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ void idGameLocal::ServerSendDeclRemapToClient( int clientNum, declType_t type, i
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_REMAP_DECL );
|
||||
outMsg.WriteByte( type );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteString( decl->GetName() );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void idGameLocal::ServerClientBegin( int clientNum ) {
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( clientNum );
|
||||
outMsg.WriteLong( spawnIds[ clientNum ] );
|
||||
outMsg.WriteInt( spawnIds[ clientNum ] );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.BeginWriting( );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( i );
|
||||
outMsg.WriteLong( spawnIds[ i ] );
|
||||
outMsg.WriteInt( spawnIds[ i ] );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( event->spawnId, 32 );
|
||||
outMsg.WriteByte( event->event );
|
||||
outMsg.WriteLong( event->time );
|
||||
outMsg.WriteInt( event->time );
|
||||
outMsg.WriteBits( event->paramsSize, idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
outMsg.WriteData( event->paramsBuf, event->paramsSize );
|
||||
|
@ -421,7 +421,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTALSTATES );
|
||||
outMsg.WriteLong( numPortals );
|
||||
outMsg.WriteInt( numPortals );
|
||||
for ( i = 0; i < numPortals; i++ ) {
|
||||
outMsg.WriteBits( gameRenderWorld->GetPortalState( (qhandle_t) (i+1) ) , NUM_RENDER_PORTAL_BITS );
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_TAGS
|
||||
idRandom tagRandom;
|
||||
tagRandom.SetSeed( random.RandomInt() );
|
||||
msg.WriteLong( tagRandom.GetSeed() );
|
||||
msg.WriteInt( tagRandom.GetSeed() );
|
||||
#endif
|
||||
|
||||
// create the snapshot
|
||||
|
@ -643,7 +643,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
snapshot->firstEntityState = newBase;
|
||||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
msg.WriteLong( tagRandom.RandomInt() );
|
||||
msg.WriteInt( tagRandom.RandomInt() );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -654,9 +654,9 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_PVS
|
||||
for ( i = 0; i < idEntity::MAX_PVS_AREAS; i++ ) {
|
||||
if ( i < numSourceAreas ) {
|
||||
msg.WriteLong( sourceAreas[ i ] );
|
||||
msg.WriteInt( sourceAreas[ i ] );
|
||||
} else {
|
||||
msg.WriteLong( 0 );
|
||||
msg.WriteInt( 0 );
|
||||
}
|
||||
}
|
||||
gameLocal.pvs.WritePVS( pvsHandle, msg );
|
||||
|
|
|
@ -1048,14 +1048,14 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
WriteBindToSnapshot( msg );
|
||||
|
||||
msg.WriteByte( currentLevel );
|
||||
msg.WriteLong( PackColor( baseColor ) );
|
||||
msg.WriteInt( PackColor( baseColor ) );
|
||||
// msg.WriteBits( lightParent.GetEntityNum(), GENTITYNUM_BITS );
|
||||
|
||||
/* // only helps prediction
|
||||
msg.WriteLong( PackColor( fadeFrom ) );
|
||||
msg.WriteLong( PackColor( fadeTo ) );
|
||||
msg.WriteLong( fadeStart );
|
||||
msg.WriteLong( fadeEnd );
|
||||
msg.WriteInt( PackColor( fadeFrom ) );
|
||||
msg.WriteInt( PackColor( fadeTo ) );
|
||||
msg.WriteInt( fadeStart );
|
||||
msg.WriteInt( fadeEnd );
|
||||
*/
|
||||
|
||||
// FIXME: send renderLight.shader
|
||||
|
@ -1063,13 +1063,13 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteFloat( renderLight.lightRadius[1], 5, 10 );
|
||||
msg.WriteFloat( renderLight.lightRadius[2], 5, 10 );
|
||||
|
||||
msg.WriteLong( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
msg.WriteInt( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
renderLight.shaderParms[SHADERPARM_GREEN],
|
||||
renderLight.shaderParms[SHADERPARM_BLUE],
|
||||
renderLight.shaderParms[SHADERPARM_ALPHA] ) ) );
|
||||
|
||||
msg.WriteFloat( renderLight.shaderParms[SHADERPARM_TIMESCALE], 5, 10 );
|
||||
msg.WriteLong( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
msg.WriteInt( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
//msg.WriteByte( renderLight.shaderParms[SHADERPARM_DIVERSITY] );
|
||||
msg.WriteShort( renderLight.shaderParms[SHADERPARM_MODE] );
|
||||
|
||||
|
|
|
@ -993,7 +993,7 @@ void idExplodingBarrel::Killed( idEntity *inflictor, idEntity *attacker, int dam
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameLocal.time );
|
||||
msg.WriteInt( gameLocal.time );
|
||||
ServerSendEvent( EVENT_EXPLODE, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1057,7 +1057,7 @@ void idMultiplayerGame::NewState( gameState_t news, idPlayer *player ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
|
||||
break;
|
||||
|
@ -2183,7 +2183,7 @@ void idMultiplayerGame::PlayGlobalSound( int to, snd_evt_t evt, const char *shad
|
|||
return;
|
||||
}
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_INDEX );
|
||||
outMsg.WriteLong( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
outMsg.WriteInt( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
} else {
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_EVENT );
|
||||
outMsg.WriteByte( evt );
|
||||
|
@ -3284,7 +3284,7 @@ void idMultiplayerGame::VoiceChat( const idCmdArgs &args, bool team ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_VCHAT );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteBits( team ? 1 : 0, 1 );
|
||||
networkSystem->ClientSendReliableMessage( outMsg );
|
||||
}
|
||||
|
@ -3349,7 +3349,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_STARTSTATE );
|
||||
// send the game state and start time
|
||||
outMsg.WriteByte( gameState );
|
||||
outMsg.WriteLong( matchStartedTime );
|
||||
outMsg.WriteInt( matchStartedTime );
|
||||
outMsg.WriteShort( startFragLimit );
|
||||
// send the powerup states and the spectate states
|
||||
for( i = 0; i < gameLocal.numClients; i++ ) {
|
||||
|
@ -3373,7 +3373,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
if ( gameState == COUNTDOWN ) {
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8165,7 +8165,7 @@ void idPlayer::WritePlayerStateToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
|
||||
msg.WriteByte( bobCycle );
|
||||
msg.WriteLong( stepUpTime );
|
||||
msg.WriteInt( stepUpTime );
|
||||
msg.WriteFloat( stepUpDelta );
|
||||
msg.WriteShort( inventory.weapons );
|
||||
msg.WriteByte( inventory.armor );
|
||||
|
|
|
@ -672,7 +672,7 @@ void idProjectile::AddDefaultDamageEffect( const trace_t &collision, const idVec
|
|||
msg.WriteFloat( collision.c.point[1] );
|
||||
msg.WriteFloat( collision.c.point[2] );
|
||||
msg.WriteDir( collision.c.normal, 24 );
|
||||
msg.WriteLong( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteInt( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteFloat( velocity[0], 5, 10 );
|
||||
msg.WriteFloat( velocity[1], 5, 10 );
|
||||
msg.WriteFloat( velocity[2], 5, 10 );
|
||||
|
|
|
@ -2705,7 +2705,7 @@ void idWeapon::Event_SetSkin( const char *skinname ) {
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
msg.WriteInt( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
ServerSendEvent( EVENT_CHANGESKIN, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7924,7 +7924,7 @@ void idPhysics_AF::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
idCQuat quat;
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.noMoveTime );
|
||||
msg.WriteFloat( current.activateTime );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], AF_VELOCITY_EXPONENT_BITS, AF_VELOCITY_MANTISSA_BITS );
|
||||
|
|
|
@ -780,7 +780,7 @@ void idPhysics_Monster::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[1], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[2], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteBits( current.onGround, 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -1031,8 +1031,8 @@ idPhysics_Parametric::WriteToSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_Parametric::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
msg.WriteLong( current.time );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.time );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.origin[0] );
|
||||
msg.WriteFloat( current.origin[1] );
|
||||
msg.WriteFloat( current.origin[2] );
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void idPhysics_RigidBody::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
quat = current.i.orientation.ToCQuat();
|
||||
localQuat = current.localAxis.ToCQuat();
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.i.position[0] );
|
||||
msg.WriteFloat( current.i.position[1] );
|
||||
msg.WriteFloat( current.i.position[2] );
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
void WriteByte( int c );
|
||||
void WriteShort( int c );
|
||||
void WriteUShort( int c );
|
||||
void WriteLong( int c );
|
||||
void WriteInt( int c );
|
||||
void WriteFloat( float f );
|
||||
void WriteFloat( float f, int exponentBits, int mantissaBits );
|
||||
void WriteAngle8( float f );
|
||||
|
@ -296,7 +296,7 @@ ID_INLINE void idBitMsg::WriteUShort( int c ) {
|
|||
WriteBits( c, 16 );
|
||||
}
|
||||
|
||||
ID_INLINE void idBitMsg::WriteLong( int c ) {
|
||||
ID_INLINE void idBitMsg::WriteInt( int c ) {
|
||||
WriteBits( c, 32 );
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ public:
|
|||
void WriteByte( int c );
|
||||
void WriteShort( int c );
|
||||
void WriteUShort( int c );
|
||||
void WriteLong( int c );
|
||||
void WriteInt( int c );
|
||||
void WriteFloat( float f );
|
||||
void WriteFloat( float f, int exponentBits, int mantissaBits );
|
||||
void WriteAngle8( float f );
|
||||
|
@ -555,7 +555,7 @@ ID_INLINE void idBitMsgDelta::WriteUShort( int c ) {
|
|||
WriteBits( c, 16 );
|
||||
}
|
||||
|
||||
ID_INLINE void idBitMsgDelta::WriteLong( int c ) {
|
||||
ID_INLINE void idBitMsgDelta::WriteInt( int c ) {
|
||||
WriteBits( c, 32 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue