mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
rename and shorted BehaviorTemplate enum (#1512)
just a renaming of the enum and the value names and deletion of the empty cpp file. Code compiles still.
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
void MovementSwitchBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStream, const BehaviorBranchContext branch) {
|
||||
uint32_t movementType{};
|
||||
if (!bitStream.Read(movementType)) {
|
||||
if (this->m_groundAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY &&
|
||||
this->m_jumpAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY &&
|
||||
this->m_fallingAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY &&
|
||||
this->m_doubleJumpAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY &&
|
||||
this->m_airAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY &&
|
||||
this->m_jetpackAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY &&
|
||||
this->m_movingAction->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY) {
|
||||
if (this->m_groundAction->m_templateId == BehaviorTemplate::EMPTY &&
|
||||
this->m_jumpAction->m_templateId == BehaviorTemplate::EMPTY &&
|
||||
this->m_fallingAction->m_templateId == BehaviorTemplate::EMPTY &&
|
||||
this->m_doubleJumpAction->m_templateId == BehaviorTemplate::EMPTY &&
|
||||
this->m_airAction->m_templateId == BehaviorTemplate::EMPTY &&
|
||||
this->m_jetpackAction->m_templateId == BehaviorTemplate::EMPTY &&
|
||||
this->m_movingAction->m_templateId == BehaviorTemplate::EMPTY) {
|
||||
return;
|
||||
}
|
||||
LOG("Unable to read movementType from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
@@ -47,7 +47,7 @@ void MovementSwitchBehavior::Handle(BehaviorContext* context, RakNet::BitStream&
|
||||
Behavior* MovementSwitchBehavior::LoadMovementType(std::string movementType) {
|
||||
float actionValue = GetFloat(movementType, -1.0f);
|
||||
auto loadedBehavior = GetAction(actionValue != -1.0f ? actionValue : 0.0f);
|
||||
if (actionValue == -1.0f && loadedBehavior->m_templateId == BehaviorTemplates::BEHAVIOR_EMPTY) {
|
||||
if (actionValue == -1.0f && loadedBehavior->m_templateId == BehaviorTemplate::EMPTY) {
|
||||
loadedBehavior = this->m_groundAction;
|
||||
}
|
||||
return loadedBehavior;
|
||||
|
Reference in New Issue
Block a user