This commit is contained in:
2023-03-07 17:51:43 +02:00
parent 5e48806b8c
commit 59ef64fe3b
8 changed files with 95 additions and 26 deletions

View File

@@ -164,7 +164,6 @@ namespace Game
//rigidBody.TriggerExit += OnTriggerExit;
startupTime = Time.TimeSinceStartup;
Console.Print("hai: " + playerActor.hai);
}
public void SetInput(uint playerId)
@@ -178,7 +177,7 @@ namespace Game
{
Console.Print("local player?: " + playerId.ToString());
string demoPath = System.IO.Path.Combine(AssetManager.DemoPath, $"{DateTimeOffset.Now.UtcTicks}.gdem");
input = new PlayerInputLocal(demoPath); // TODO: support recording
input = new PlayerInputLocal(playerActor, demoPath); // TODO: support recording
}
else
@@ -193,7 +192,7 @@ namespace Game
input = new PlayerInputDemo(demoFile);
/*Actor.Position = input.GetCurrentActorState().position;
currentVelocity = input.GetCurrentActorState().velocity;
currentVelocity = input.GetCurrentActorState().velocity; f
SetCameraEulerAngles(input.GetCurrentActorState().viewAngles);*/
Actor.Position = input.GetCurrentInputState().verificationPosition;
//rootActor.Orientation = input.GetCurrentInputState().verificationOrientation;
@@ -205,8 +204,8 @@ namespace Game
{
//var playerId = NetworkReplicator.GetObjectOwnerClientId(this.Parent);
//SetInput(playerId);
Console.Print("hai: " + playerActor.hai);
SetInput(playerActor.PlayerId);
//Console.Print("hai: " + playerActor.hai);
//SetInput(playerActor.PlayerId);
}
public override void OnDisable()
{