Ticket #1827: GameView.cpp.patch
File GameView.cpp.patch, 1.1 KB (added by , 11 years ago) |
---|
-
source/graphics/GameView.cpp
773 773 if (m->FollowEntity) 774 774 { 775 775 CmpPtr<ICmpPosition> cmpPosition(*(m->Game->GetSimulation2()), m->FollowEntity); 776 if (cmpPosition && cmpPosition->IsInWorld()) 776 CmpPtr<ICmpRangeManager> cmpRangeManager(*(m->Game->GetSimulation2()), SYSTEM_ENTITY); 777 if (cmpPosition && cmpPosition->IsInWorld() && 778 cmpRangeManager && cmpRangeManager->GetLosVisibility(m->FollowEntity, m->Game->GetPlayerID(), false) == ICmpRangeManager::VIS_VISIBLE) 777 779 { 778 780 // Get the most recent interpolated position 779 781 float frameOffset = m->Game->GetSimulation2()->GetLastFrameOffset(); … … 849 851 850 852 CVector3D desiredPivot = pivot; 851 853 852 CmpPtr<ICmpRangeManager> cmpRangeManager(* m->Game->GetSimulation2(), SYSTEM_ENTITY);854 CmpPtr<ICmpRangeManager> cmpRangeManager(*(m->Game->GetSimulation2()), SYSTEM_ENTITY); 853 855 if (cmpRangeManager && cmpRangeManager->GetLosCircular()) 854 856 { 855 857 // Clamp to a circular region around the center of the map