mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 01:34:07 +00:00
fix: prevent negative imagination (#1083)
* fix: prevent negative imagination And fail switch if we don't have enough imagination * Make better
This commit is contained in:
@@ -30,7 +30,7 @@ void SwitchBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStre
|
||||
|
||||
Game::logger->LogDebug("SwitchBehavior", "[%i] State: (%d), imagination: (%i) / (%f)", entity->GetLOT(), state, destroyableComponent->GetImagination(), destroyableComponent->GetMaxImagination());
|
||||
|
||||
if (state || (entity->GetLOT() == 8092 && destroyableComponent->GetImagination() >= m_imagination)) {
|
||||
if (state) {
|
||||
this->m_actionTrue->Handle(context, bitStream, branch);
|
||||
} else {
|
||||
this->m_actionFalse->Handle(context, bitStream, branch);
|
||||
|
Reference in New Issue
Block a user