fixed mantle after dash bug
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Failing after 2s

This commit is contained in:
2025-09-16 10:28:41 +02:00
parent 88d20431ce
commit 7b036c5889
6 changed files with 17 additions and 43 deletions

View File

@@ -310,7 +310,7 @@ public partial class PlayerController : CharacterBody3D
// Movement stuff
// Getting universal setting from GODOT editor to be in sync
_gravity = (float)ProjectSettings.GetSetting("physics/3d/default_gravity");
MantleSystem.Init(HeadSystem);
MantleSystem.Init();
StairsSystem.Init(stairsBelowRayCast3D, stairsAheadRayCast3D, cameraSmooth);
DashSystem.Init(HeadSystem, camera, TweenQueueSystem);
WeaponSystem.Init(HeadSystem, camera);
@@ -438,7 +438,7 @@ public partial class PlayerController : CharacterBody3D
{
if (CanMantle())
{
MantleToLocation(MantleSystem.FindMantleInFrontOfPlayer().Unwrap());
MantleToLocation(MantleSystem.FindMantleForHeadRotation(HeadSystem.Rotation.Y).Unwrap());
return;
}
@@ -871,7 +871,7 @@ public partial class PlayerController : CharacterBody3D
{
// Try mantling but don't know if this is useful
if (CanMantle())
MantleToLocation(MantleSystem.FindMantleInFrontOfPlayer().Unwrap());
MantleToLocation(MantleSystem.FindMantleForHeadRotation(HeadSystem.Rotation.Y).Unwrap());
}
public void FinishPoweredDash()
@@ -912,7 +912,7 @@ public partial class PlayerController : CharacterBody3D
// Mantling
public bool CanMantle()
{
var mantleLocationResult = MantleSystem.FindMantleInFrontOfPlayer();
var mantleLocationResult = MantleSystem.FindMantleForHeadRotation(HeadSystem.Rotation.Y);
return mantleLocationResult.IsSome(out _);
}
public void MantleToLocation(Vector3 location)