mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-13 01:51:22 +00:00
Fix asynchronous actions executing other strips actions
This commit is contained in:
parent
51e4273a53
commit
a909546e2f
@ -10,7 +10,6 @@
|
||||
#include "SimplePhysicsComponent.h"
|
||||
|
||||
#include "Database.h"
|
||||
#include "EntityInfo.h"
|
||||
|
||||
ModelComponent::ModelComponent(Entity* parent) : Component(parent) {
|
||||
m_OriginalPosition = m_Parent->GetDefaultPosition();
|
||||
@ -30,6 +29,9 @@ bool ModelComponent::OnResetModelToDefaults(GameMessages::GameMsg& msg) {
|
||||
unsmash.target = GetParent()->GetObjectID();
|
||||
unsmash.duration = 0.0f;
|
||||
unsmash.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
m_NumListeningInteract = 0;
|
||||
m_Dirty = true;
|
||||
Game::entityManager->SerializeEntity(GetParent());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -171,14 +173,14 @@ std::array<std::pair<int32_t, std::string>, 5> ModelComponent::GetBehaviorsForSa
|
||||
}
|
||||
|
||||
void ModelComponent::AddInteract() {
|
||||
LOG("adding interact %i", m_NumListeningInteract);
|
||||
LOG_DEBUG("adding interact %i", m_NumListeningInteract);
|
||||
m_Dirty = true;
|
||||
m_NumListeningInteract++;
|
||||
}
|
||||
|
||||
void ModelComponent::RemoveInteract() {
|
||||
DluAssert(m_NumListeningInteract > 0);
|
||||
LOG("Removing interact %i", m_NumListeningInteract);
|
||||
LOG_DEBUG("Removing interact %i", m_NumListeningInteract);
|
||||
m_Dirty = true;
|
||||
m_NumListeningInteract--;
|
||||
}
|
||||
|
@ -82,6 +82,8 @@ void Strip::HandleMsg(MigrateActionsMessage& msg) {
|
||||
|
||||
template<>
|
||||
void Strip::HandleMsg(GameMessages::RequestUse& msg) {
|
||||
if (m_PausedTime > 0.0f) return;
|
||||
|
||||
if (m_Actions[m_NextActionIndex].GetType() == "OnInteract") {
|
||||
IncrementAction();
|
||||
m_WaitingForAction = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user