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