From 8b0f374ab44374b2ef8b0f44bce75df7a687c8d1 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Sat, 7 Jan 2023 03:21:42 -0600 Subject: [PATCH] this does nothing --- dGame/dBehaviors/JetPackBehavior.cpp | 5 ++++- dGame/dComponents/ControllablePhysicsComponent.h | 8 +------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dGame/dBehaviors/JetPackBehavior.cpp b/dGame/dBehaviors/JetPackBehavior.cpp index d2aff182..e70d27a9 100644 --- a/dGame/dBehaviors/JetPackBehavior.cpp +++ b/dGame/dBehaviors/JetPackBehavior.cpp @@ -17,7 +17,7 @@ void JetPackBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_st } auto controllablePhysicsComponent = entity->GetComponent(); - if (controllablePhysicsComponent) controllablePhysicsComponent->Ser + if (controllablePhysicsComponent) controllablePhysicsComponent->SetJetpackFlying(true); } void JetPackBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext branch) { @@ -29,6 +29,9 @@ void JetPackBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext bra auto* character = entity->GetCharacter(); if (character) character->SetIsFlying(false); } + + auto controllablePhysicsComponent = entity->GetComponent(); + if (controllablePhysicsComponent) controllablePhysicsComponent->SetJetpackFlying(false); } void JetPackBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bit_stream, const BehaviorBranchContext branch) { diff --git a/dGame/dComponents/ControllablePhysicsComponent.h b/dGame/dComponents/ControllablePhysicsComponent.h index a05a11fd..a9aa641f 100644 --- a/dGame/dComponents/ControllablePhysicsComponent.h +++ b/dGame/dComponents/ControllablePhysicsComponent.h @@ -127,12 +127,6 @@ public: */ void SetDirtyAngularVelocity(bool val); - /** - * Sets whether or not the entity is currently wearing a jetpack - * @param val whether or not the entity is currently wearing a jetpack - */ - void SetInJetpackMode(bool val) { m_InJetpackMode = val; } - /** * Returns whether or not the entity is currently wearing a jetpack * @return whether or not the entity is currently wearing a jetpack @@ -143,7 +137,7 @@ public: * Sets whether or not the entity is currently flying a jetpack * @param val whether or not the entity is currently flying a jetpack */ - void SetJetpackFlying(bool val) { m_JetpackFlying = val; } + void SetJetpackFlying(bool val) { m_JetpackFlying = val; m_DirtyEquippedItemInfo = true;} /** * Returns whether or not an entity is currently flying a jetpack