diff --git a/dGame/dBehaviors/SwitchMultipleBehavior.cpp b/dGame/dBehaviors/SwitchMultipleBehavior.cpp index 078464bb..23411429 100644 --- a/dGame/dBehaviors/SwitchMultipleBehavior.cpp +++ b/dGame/dBehaviors/SwitchMultipleBehavior.cpp @@ -22,13 +22,9 @@ void SwitchMultipleBehavior::Handle(BehaviorContext* context, RakNet::BitStream* for (unsigned int i = 0; i < this->m_behaviors.size(); i++) { const double data = this->m_behaviors.at(i).first; + trigger = i; - if (value <= data) { - - trigger = i; - - break; - } + if (value <= data) break; } auto* behavior = this->m_behaviors.at(trigger).second;