From 98949574a8cbcd0ba3e0d910fbf1abcbb1bcb1d2 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:02:21 +1000 Subject: [PATCH] SwimIdle tech parent state --- source/game/StarPlayer.cpp | 2 ++ source/game/StarTechController.cpp | 3 ++- source/game/StarTechController.hpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/game/StarPlayer.cpp b/source/game/StarPlayer.cpp index c9816c1..188a6a8 100644 --- a/source/game/StarPlayer.cpp +++ b/source/game/StarPlayer.cpp @@ -1773,6 +1773,8 @@ void Player::processStateChanges(float dt) { m_humanoid->setState(Humanoid::Run); } else if (techState == TechController::ParentState::Swim) { m_humanoid->setState(Humanoid::Swim); + } else if (techState == TechController::ParentState::SwimIdle) { + m_humanoid->setState(Humanoid::SwimIdle); } } else { auto loungeAnchor = as(m_movementController->entityAnchor()); diff --git a/source/game/StarTechController.cpp b/source/game/StarTechController.cpp index 4295fb7..d62fe14 100644 --- a/source/game/StarTechController.cpp +++ b/source/game/StarTechController.cpp @@ -25,7 +25,8 @@ EnumMap const TechController::ParentStateNames{ {TechController::ParentState::Duck, "Duck"}, {TechController::ParentState::Walk, "Walk"}, {TechController::ParentState::Run, "Run"}, - {TechController::ParentState::Swim, "Swim"} + {TechController::ParentState::Swim, "Swim"}, + {TechController::ParentState::SwimIdle, "SwimIdle"} }; TechController::TechController() { diff --git a/source/game/StarTechController.hpp b/source/game/StarTechController.hpp index 03fa61f..d686b1e 100644 --- a/source/game/StarTechController.hpp +++ b/source/game/StarTechController.hpp @@ -28,7 +28,8 @@ public: Duck, Walk, Run, - Swim + Swim, + SwimIdle }; static EnumMap const ParentStateNames;