gd,ld: some LD and some bug fixing that didn't fix the bugs
This commit is contained in:
@ -256,7 +256,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
}
|
||||
public void OnInputDropPressed()
|
||||
{
|
||||
_playerState.SendEvent("drop");
|
||||
_playerState.SendEvent("crouch");
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
@ -391,9 +391,11 @@ public partial class PlayerController : CharacterBody3D
|
||||
return;
|
||||
}
|
||||
|
||||
GD.Print(WeaponSystem.GlobalRotation);
|
||||
// Store the weapon state before resetting it
|
||||
var isPlantedOnWall = WeaponSystem.PlantedState.Active
|
||||
&& (Math.Abs(WeaponSystem.GlobalRotation.X) + Math.Abs(WeaponSystem.GlobalRotation.Z) < 0.3);
|
||||
var isPlantedOnWall = Math.Abs(WeaponSystem.GlobalRotation.X) + Math.Abs(WeaponSystem.GlobalRotation.Z) < 0.3;
|
||||
var isPlantedUnderPlatform = WeaponSystem.GlobalRotation.X > 1 && Math.Abs(WeaponSystem.GlobalRotation.Y) > 1;
|
||||
var shouldDashToPlanted = WeaponSystem.PlantedState.Active && (isPlantedOnWall || isPlantedUnderPlatform);
|
||||
var isFlying = WeaponSystem.FlyingState.Active;
|
||||
|
||||
// Get the weapon back
|
||||
@ -410,7 +412,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
return; // In case states aren't exclusives
|
||||
}
|
||||
|
||||
if (isPlantedOnWall)
|
||||
if (shouldDashToPlanted)
|
||||
{
|
||||
_playerState.SendEvent("dash_to_planted");
|
||||
return; // In case states aren't exclusives
|
||||
|
Reference in New Issue
Block a user