Add DoDamage behavior and dont try and start the same node multiple times

This commit is contained in:
David Markowitz
2026-09-26 23:36:37 -07:00
parent 1a27ecb59d
commit bbb3e10b88
13 changed files with 60 additions and 30 deletions

View File

@@ -802,13 +802,13 @@ const std::map<LWOOBJID, LWOOBJID>& PropertyManagementComponent::GetModels() con
return models;
}
void PropertyManagementComponent::OnChatMessageReceived(const std::string& sMessage) const {
void PropertyManagementComponent::OnChatMessageReceived(const std::string& sMessage, const LWOOBJID sender) const {
for (const auto& modelID : models | std::views::keys) {
auto* const model = Game::entityManager->GetEntity(modelID);
if (!model) continue;
auto* const modelComponent = model->GetComponent<ModelComponent>();
if (!modelComponent) continue;
modelComponent->OnChatMessageReceived(sMessage);
modelComponent->OnChatMessageReceived(sMessage, sender);
}
}