Swap psTarget->pos and psViewer->pos back, so visibility and targetting rays are cast in the correct direction.
Visibility and targetting are no longer very weird.master
parent
7a1d9ead68
commit
478424e0b6
|
@ -393,7 +393,7 @@ int visibleObject(const BASE_OBJECT* psViewer, const BASE_OBJECT* psTarget, bool
|
|||
return 0;
|
||||
}
|
||||
|
||||
diff = Vector3i_Sub(psViewer->pos, psTarget->pos);
|
||||
diff = Vector3i_Sub(psTarget->pos, psViewer->pos);
|
||||
range = objSensorRange(psViewer);
|
||||
|
||||
/* Get the sensor Range and power */
|
||||
|
@ -794,7 +794,7 @@ bool lineOfFire(const BASE_OBJECT* psViewer, const BASE_OBJECT* psTarget, bool w
|
|||
return false;
|
||||
}
|
||||
|
||||
diff = Vector3i_Sub(psViewer->pos, psTarget->pos);
|
||||
diff = Vector3i_Sub(psTarget->pos, psViewer->pos);
|
||||
range = objSensorRange(psViewer);
|
||||
|
||||
distSq = Vector3i_ScalarP(diff, diff);
|
||||
|
|
Loading…
Reference in New Issue