little CCam cleanup; fix in CWorld sphere test

This commit is contained in:
aap 2020-06-12 21:53:39 +02:00
parent 5a961d0284
commit 41dac0773f
3 changed files with 37 additions and 29 deletions

View file

@ -949,7 +949,11 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
if(e != entityToIgnore && e->bUsesCollision &&
!(ignoreSomeObjects && CameraToIgnoreThisObject(e))) {
#ifdef FIX_BUGS
CVector diff = spherePos - e->GetBoundCentre();
#else
CVector diff = spherePos - e->GetPosition();
#endif
float distance = diff.Magnitude();
if(e->GetBoundRadius() + radius > distance) {