mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- fixed FAFcansee not working in some edge cases where one actor is very small and poorly placed.
Instead of directly going to the alternative, let's just do a regular cansee anyway and only run the fallback if this fails. hitscan is not good enough to perform sight checks.
This commit is contained in:
parent
2cc81d0165
commit
d9453138f9
1 changed files with 8 additions and 1 deletions
|
@ -256,10 +256,17 @@ bool FAFcansee(const DVector3& start, sectortype* sects, const DVector3& end, se
|
|||
bool plax_found = false;
|
||||
// ASSERT(sects >= 0 && secte >= 0);
|
||||
|
||||
// luckily we do not have portal setups with otherwise connected sectors, so let's go to the original routine for all cases.
|
||||
// The hack job below won't always cut it.
|
||||
if (cansee(start, sects, end, secte))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// early out to regular routine
|
||||
if ((!sects || !FAF_Sector(sects)) && (!secte || !FAF_Sector(secte)))
|
||||
{
|
||||
return !!cansee(start, sects, end, secte);
|
||||
return false;
|
||||
}
|
||||
|
||||
// get angle
|
||||
|
|
Loading…
Reference in a new issue