Beispiel #1
0
    // Token: 0x06000E53 RID: 3667 RVA: 0x00062044 File Offset: 0x00060244
    public static byte GetDamageDirectionAngle(Vector3 direction)
    {
        byte    result     = 0;
        Vector3 normalized = direction.normalized;

        normalized.y = 0f;
        if (normalized.magnitude != 0f)
        {
            result = Conversion.Angle2Byte(Quaternion.LookRotation(normalized).eulerAngles.y);
        }
        return(result);
    }
 // Token: 0x06001AEA RID: 6890 RVA: 0x0008BC74 File Offset: 0x00089E74
 public void SendUpdates()
 {
     if (GameState.Current.IsInGame && this.IsAlive && this.posSyncFrame <= Time.realtimeSinceStartup && this.SendMovementUpdate != null)
     {
         this.posSyncFrame = Time.realtimeSinceStartup + 0.05f;
         if (this.cache.Update(GameState.Current.Player.transform.position, Conversion.Angle2Byte(this.HorizontalRotation.eulerAngles.y), Conversion.Angle2Byte(this.VerticalRotation), (byte)this.MovementState))
         {
             this.SendMovementUpdate(this.cache.Position, GameState.Current.Player.MoveController.Velocity, this.cache.HRotation, this.cache.VRotation, this.cache.MovementState);
             Singleton <GameStateController> .Instance.Client.Peer.SendOutgoingCommands();
         }
     }
 }
    // Token: 0x06001905 RID: 6405 RVA: 0x00086364 File Offset: 0x00084564
    public void GetAllSpawnPoints(GameModeType gameMode, TeamID team, out List <Vector3> positions, out List <byte> angles)
    {
        IList <SpawnPoint> spawnPointList = this.GetSpawnPointList(gameMode, team);

        positions = new List <Vector3>(spawnPointList.Count);
        angles    = new List <byte>(spawnPointList.Count);
        foreach (SpawnPoint spawnPoint in spawnPointList)
        {
            positions.Add(spawnPoint.Position);
            angles.Add(Conversion.Angle2Byte(spawnPoint.transform.rotation.eulerAngles.y));
        }
    }
    // Token: 0x06001AE8 RID: 6888 RVA: 0x0008BBE0 File Offset: 0x00089DE0
    public void LandingUpdate()
    {
        this.posSyncFrame = Time.realtimeSinceStartup + 0.05f;
        byte arg = Convert.ToByte(this.MovementState | MoveStates.Landed);

        this.SendMovementUpdate(GameState.Current.Player.transform.position, GameState.Current.Player.MoveController.Velocity, Conversion.Angle2Byte(this.HorizontalRotation.eulerAngles.y), Conversion.Angle2Byte(this.VerticalRotation), arg);
    }