File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Code/client/Services/Generic Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -975,7 +975,7 @@ void CharacterService::OnNotifyRelinquishControl(const NotifyRelinquishControl&
975975 std::optional<uint32_t > serverIdRes = Utils::GetServerId (entity);
976976 if (!serverIdRes.has_value ())
977977 {
978- spdlog::error (" {} : failed to find server id" , __FUNCTION__ );
978+ spdlog::error (__FUNCTION__ " : failed to find server id for entity " );
979979 continue ;
980980 }
981981
@@ -992,12 +992,19 @@ void CharacterService::OnNotifyRelinquishControl(const NotifyRelinquishControl&
992992 }
993993
994994 Actor* pActor = Cast<Actor>(TESForm::GetById (formIdComponent.Id ));
995+ if (!pActor)
996+ {
997+ // Probably left the room and/or temporary.
998+ spdlog::info (__FUNCTION__ " : no local Actor for serverId {:X} to relinquish" , serverId);
999+ continue ;
1000+ }
1001+
9951002 pActor->GetExtension ()->SetRemote (true );
9961003
9971004 InterpolationSystem::Setup (m_world, entity);
9981005 AnimationSystem::Setup (m_world, entity);
9991006
1000- spdlog::info (" Relinquished control of actor {:X} with server id {:X}" , pActor->formID , acMessage.ServerId );
1007+ spdlog::info (__FUNCTION__ " : relinquished control of actor {:X} with server id {:X}" , pActor->formID , acMessage.ServerId );
10011008
10021009 return ;
10031010 }
You can’t perform that action at this time.
0 commit comments