private void Server_ReceiveMoveUpdatePosition(RemoteEntityWorld sender, ReceiveDataReader reader) { Vec2 newPosition = reader.ReadVec2(); if (!reader.Complete()) { return; } //get network user by remote entity world EntitySystemServerNetworkService.ClientRemoteEntityWorld clientRemoteEntityWorld = (EntitySystemServerNetworkService.ClientRemoteEntityWorld)sender; UserManagementServerNetworkService.UserInfo user = clientRemoteEntityWorld.User; if (user == server_movingByUser) { ServerOrSingle_MoveUpdatePosition(newPosition); } }
void Server_ReceiveMoveUpdatePosition( RemoteEntityWorld sender, ReceiveDataReader reader ) { Vec2 newPosition = reader.ReadVec2(); if( !reader.Complete() ) return; //get network user by remote entity world EntitySystemServerNetworkService.ClientRemoteEntityWorld clientRemoteEntityWorld = (EntitySystemServerNetworkService.ClientRemoteEntityWorld)sender; UserManagementServerNetworkService.UserInfo user = clientRemoteEntityWorld.User; if( user == server_movingByUser ) { ServerOrSingle_MoveUpdatePosition( newPosition ); } }
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(); }