diff --git a/TechbloxModdingAPI/Player.FlyCamSettings.cs b/TechbloxModdingAPI/Player.FlyCamSettings.cs
deleted file mode 100644
index b947477..0000000
--- a/TechbloxModdingAPI/Player.FlyCamSettings.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using RobocraftX.Physics;
-using Svelto.ECS;
-using Svelto.ECS.EntityStructs;
-using Techblox.FlyCam;
-using TechbloxModdingAPI.Blocks;
-using TechbloxModdingAPI.Players;
-using TechbloxModdingAPI.Utility;
-using Unity.Mathematics;
-using UnityEngine;
-
-namespace TechbloxModdingAPI
-{
- public partial class Player
- {
- ///
- /// Whether the camera (player) is sprinting.
- ///
- public bool Sprinting
- {
- get => playerEngine.GetCharacterStruct(Id).Get().sprinting;
- set => playerEngine.GetCharacterStruct(Id).Get().sprinting = value;
- }
-
- ///
- /// The speed setting of the camera.
- ///
- public float Speed
- {
- get => playerEngine.GetCharacterStruct(Id).Get().speed;
- set => playerEngine.GetCharacterStruct(Id).Get().speed = value;
- }
-
- ///
- /// The multiplier setting to use when sprinting.
- ///
- public float SpeedSprintMultiplier
- {
- get => playerEngine.GetCharacterStruct(Id).Get().speedSprintMultiplier;
- set => playerEngine.GetCharacterStruct(Id).Get().speedSprintMultiplier = value;
- }
-
- ///
- /// The acceleration setting of the camera.
- ///
- public float Acceleration
- {
- get => playerEngine.GetCharacterStruct(Id).Get().acceleration;
- set => playerEngine.GetCharacterStruct(Id).Get().acceleration = value;
- }
- }
-}
\ No newline at end of file
diff --git a/TechbloxModdingAPI/Player.cs b/TechbloxModdingAPI/Player.cs
index 02e28f5..9bab382 100644
--- a/TechbloxModdingAPI/Player.cs
+++ b/TechbloxModdingAPI/Player.cs
@@ -1,5 +1,6 @@
using System;
using RobocraftX.Character;
+using RobocraftX.Character.Movement;
using Unity.Mathematics;
using RobocraftX.Common;
using RobocraftX.Common.Players;
@@ -17,7 +18,7 @@ namespace TechbloxModdingAPI
///
/// An in-game player character. Any Leo you see is a player.
///
- public partial class Player : IEquatable, IEquatable
+ public class Player : IEquatable, IEquatable
{
// static functionality
private static PlayerEngine playerEngine = new PlayerEngine();
@@ -350,6 +351,58 @@ namespace TechbloxModdingAPI
public PlayerBuildingMode BuildingMode => (PlayerBuildingMode) playerEngine
.GetCharacterStruct(Id).Get().timeStoppedContext;
+ ///
+ /// Whether the player is sprinting.
+ ///
+ public bool Sprinting
+ {
+ get => GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().sprinting
+ : playerEngine.GetCharacterStruct(Id).Get().isSprinting;
+ set => _ = GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().sprinting = value
+ : playerEngine.GetCharacterStruct(Id).Get().isSprinting = value;
+ }
+
+ ///
+ /// Movement speed setting. Build mode (camera) and simulation mode settings are separate.
+ ///
+ public float SpeedSetting
+ {
+ get => GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().speed
+ : playerEngine.GetCharacterStruct(Id).Get().moveSpeed;
+ set => _ = GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().speed = value
+ : playerEngine.GetCharacterStruct(Id).Get().moveSpeed = value;
+ }
+
+ ///
+ /// The multiplier setting to use when sprinting. Build mode (camera) and simulation mode settings are separate.
+ ///
+ public float SpeedSprintMultiplierSetting
+ {
+ get => GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().speedSprintMultiplier
+ : playerEngine.GetCharacterStruct(Id).Get().sprintSpeedMultiplier;
+ set => _ = GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().speedSprintMultiplier = value
+ : playerEngine.GetCharacterStruct(Id).Get().sprintSpeedMultiplier = value;
+ }
+
+ ///
+ /// The acceleration setting of the player. Build mode (camera) and simulation mode settings are separate.
+ ///
+ public float AccelerationSetting
+ {
+ get => GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().acceleration
+ : playerEngine.GetCharacterStruct(Id).Get().acceleration;
+ set => _ = GameState.IsBuildMode()
+ ? playerEngine.GetCharacterStruct(Id).Get().acceleration = value
+ : playerEngine.GetCharacterStruct(Id).Get().acceleration = value;
+ }
+
// object methods
///