fix: pause bbb models

This commit is contained in:
David Markowitz
2026-09-30 18:43:14 -07:00
parent bbb3e10b88
commit c10828a905

View File

@@ -42,6 +42,7 @@
#include "eStateChangeType.h" #include "eStateChangeType.h"
#include "ServiceType.h" #include "ServiceType.h"
#include "ePlayerFlag.h" #include "ePlayerFlag.h"
#include "ModelComponent.h"
#include <sstream> #include <sstream>
#include <future> #include <future>
@@ -2627,6 +2628,8 @@ void GameMessages::HandleBBBSaveRequest(RakNet::BitStream& inStream, Entity* ent
Entity* newEntity = Game::entityManager->CreateEntity(info, nullptr); Entity* newEntity = Game::entityManager->CreateEntity(info, nullptr);
if (newEntity) { if (newEntity) {
Game::entityManager->ConstructEntity(newEntity); Game::entityManager->ConstructEntity(newEntity);
auto* const modelComponent = newEntity->GetComponent<ModelComponent>();
if (modelComponent) modelComponent->Pause();
//Make sure the propMgmt doesn't delete our model after the server dies //Make sure the propMgmt doesn't delete our model after the server dies
//Trying to do this after the entity is constructed. Shouldn't really change anything but //Trying to do this after the entity is constructed. Shouldn't really change anything but