private void Client_ReceiveTracksSpeed(RemoteEntityWorld sender, ReceiveDataReader reader) { float value1 = reader.ReadSingle(); float value2 = reader.ReadSingle(); if (!reader.Complete()) { return; } leftTrack.speed = value1; rightTrack.speed = value2; }
void Server_ReceiveControlKeyPress(RemoteEntityWorld sender, ReceiveDataReader reader) { //check to ensure that other players can not send messages to another player if (!Server_CheckRemoteEntityWorldAssociatedWithThisIntellect(sender)) { return; } GameControlKeys controlKey = (GameControlKeys)reader.ReadVariableUInt32(); float strength = reader.ReadSingle(); if (!reader.Complete()) { return; } //check for invalid value if (!Enum.IsDefined(typeof(GameControlKeys), (int)controlKey)) { return; } if (strength <= 0) { return; } ControlKeyPress(controlKey, strength); }
void Client_ReceiveContusionTimeRemaining(RemoteEntityWorld sender, ReceiveDataReader reader) { float value = reader.ReadSingle(); if (!reader.Complete()) { return; } ContusionTimeRemaining = value; }
private void Client_ReceiveValue(RemoteEntityWorld sender, ReceiveDataReader reader) { float value = reader.ReadSingle(); if (!reader.Complete()) { return; } Value = value; }
void Client_ReceiveOpenSettings(RemoteEntityWorld sender, ReceiveDataReader reader) { bool value = reader.ReadBoolean(); float value2 = reader.ReadSingle(); if (!reader.Complete()) { return; } opened = value; openDoorOffsetCoefficient = value2; }
void Client_ReceiveUpdateData(RemoteEntityWorld sender, ReceiveDataReader reader) { while (reader.BitPosition < reader.EndBitPosition) { uint identifier = reader.ReadVariableUInt32(); int frags = reader.ReadVariableInt32(); float ping = reader.ReadSingle(); Client_Player player = Client_GetPlayer(identifier); if (player != null) { player.Frags = frags; player.Ping = ping; } } }
private void Client_ReceiveUpdateData(RemoteEntityWorld sender, ReceiveDataReader reader) { while (reader.BitPosition < reader.EndBitPosition) { uint identifier = reader.ReadVariableUInt32(); int hitPoints = reader.ReadVariableInt32(); int killPoints = reader.ReadVariableInt32(); int assaultCredits = reader.ReadVariableInt32(); float ping = reader.ReadSingle(); Client_Player player = Client_GetPlayer(identifier); if (player != null) { player.HitPoints = hitPoints; player.KillPoints = killPoints; player.AssaultCredits = assaultCredits; player.Ping = ping; } } }
private void Client_ReceiveOpenSettings(RemoteEntityWorld sender, ReceiveDataReader reader) { bool value = reader.ReadBoolean(); float value2 = reader.ReadSingle(); if (!reader.Complete()) return; opened = value; openDoorOffsetCoefficient = value2; }
void Client_ReceiveWheelsPositionToClient( RemoteEntityWorld sender, ReceiveDataReader reader ) { networkingClient_wheelsRotationAngle = new Radian[ 4 ]; networkingClient_wheelsSteer = new Radian[ 4 ]; networkingClient_wheelsSuspensionJounce = new float[ 4 ]; for( int n = 0; n < 4; n++ ) { networkingClient_wheelsRotationAngle[ n ] = reader.ReadRadian(); networkingClient_wheelsSteer[ n ] = reader.ReadRadian(); networkingClient_wheelsSuspensionJounce[ n ] = reader.ReadSingle(); } if( !reader.Complete() ) return; }
void Client_ReceiveContusionTimeRemaining( RemoteEntityWorld sender, ReceiveDataReader reader ) { float value = reader.ReadSingle(); if( !reader.Complete() ) return; ContusionTimeRemaining = value; }
void Client_ReceiveTracksSpeed( RemoteEntityWorld sender, ReceiveDataReader reader ) { float value1 = reader.ReadSingle(); float value2 = reader.ReadSingle(); if( !reader.Complete() ) return; leftTrack.speed = value1; rightTrack.speed = value2; }
private void Client_ReceiveUpdateMechThroth(RemoteEntityWorld sender, ReceiveDataReader reader) { float value = reader.ReadSingle(); if (!reader.Complete()) return; ThrottleF = value; }
private void Client_ReceiveRemainingTime(RemoteEntityWorld sender, ReceiveDataReader reader) { float value = reader.ReadSingle(); if (!reader.Complete()) return; RemainingTime = value; }
void Client_ReceivePropertiesToClient( RemoteEntityWorld sender, ReceiveDataReader reader ) { Size = reader.ReadVec2(); Position = reader.ReadVec3(); Segments = reader.ReadVec2i(); RenderQueueGroup = (RenderQueueGroupID)reader.ReadVariableUInt32(); ReflectionLevel = (ReflectionLevels)reader.ReadVariableUInt32(); PhysicsHeight = reader.ReadSingle(); DeepColor = reader.ReadColorValue(); ShallowColor = reader.ReadColorValue(); ReflectionColor = reader.ReadColorValue(); ReflectionTextureSize = (ReflectionTextureSizes)reader.ReadVariableUInt32(); FixedPipelineMap = reader.ReadString(); FixedPipelineMapTiling = reader.ReadSingle(); FixedPipelineColor = reader.ReadColorValue(); }
void Client_ReceiveUpdateData( RemoteEntityWorld sender, ReceiveDataReader reader ) { while( reader.BitPosition < reader.EndBitPosition ) { uint identifier = reader.ReadVariableUInt32(); int frags = reader.ReadVariableInt32(); float ping = reader.ReadSingle(); Client_Player player = Client_GetPlayer( identifier ); if( player != null ) { player.Frags = frags; player.Ping = ping; } } }
void Server_ReceiveControlKeyPress( RemoteEntityWorld sender, ReceiveDataReader reader ) { //check to ensure that other players can not send messages to another player if( !Server_CheckRemoteEntityWorldAssociatedWithThisIntellect( sender ) ) return; GameControlKeys controlKey = (GameControlKeys)reader.ReadVariableUInt32(); float strength = reader.ReadSingle(); if( !reader.Complete() ) return; //check for invalid value if( !Enum.IsDefined( typeof( GameControlKeys ), (int)controlKey ) ) return; if( strength <= 0 ) return; ControlKeyPress( controlKey, strength ); }
void Client_ReceiveLife( RemoteEntityWorld sender, ReceiveDataReader reader ) { float value = reader.ReadSingle(); if( !reader.Complete() ) return; Life = value; }
private void Client_ReceiveUpdateData(RemoteEntityWorld sender, ReceiveDataReader reader) { while (reader.BitPosition < reader.EndBitPosition) { uint identifier = reader.ReadVariableUInt32(); int hitPoints = reader.ReadVariableInt32(); int killPoints = reader.ReadVariableInt32(); int assaultCredits = reader.ReadVariableInt32(); float ping = reader.ReadSingle(); Client_Player player = Client_GetPlayer(identifier); if (player != null) { player.HitPoints = hitPoints; player.KillPoints = killPoints; player.AssaultCredits = assaultCredits; player.Ping = ping; } } }
private void Client_ReceiveShield(RemoteEntityWorld sender, ReceiveDataReader reader) { float value = reader.ReadSingle(); if (!reader.Complete()) return; Shield = value; }