public ChangeMapInformation GetChangeMapInformation(MapChangeRegion region) { ChangeMapInformation information = new ChangeMapInformation(); information.position = (OldPosition - region.Position) * region.Rotation.GetInverse(); information.lookDirection = ((PlayerIntellect)Intellect).LookDirection * region.Rotation.GetInverse(); information.velocity = MainBody.LinearVelocity * region.Rotation.GetInverse(); information.life = Life; information.weapons = weapons; information.activeWeaponIndex = GetWeaponIndex( (activeWeapon != null) ? activeWeapon.Type : null); return(information); }
public ChangeMapInformation GetChangeMapInformation( MapChangeRegion region ) { ChangeMapInformation information = new ChangeMapInformation(); information.position = ( OldPosition - region.Position ) * region.Rotation.GetInverse(); information.lookDirection = ( (PlayerIntellect)Intellect ).LookDirection * region.Rotation.GetInverse(); information.velocity = MainBody.LinearVelocity * region.Rotation.GetInverse(); information.life = Life; information.weapons = weapons; information.activeWeaponIndex = GetWeaponIndex( ( activeWeapon != null ) ? activeWeapon.Type : null ); return information; }