Remove unnecessary R_PointInSubsector calls in Z position functions
found a place where we called R_PointInSubsector
as an "optimization" to check if the object were inside the highest subsector to avoid having to iterate all lines in the sector. problem is that we've already established in !2168 (merged) that R_PointInSubsector
is CPU-intensive, and should really only be called if absolutely necessary.
removing this block of code reduced CPU time in R_PointInSubsector
from 24% to 21% without any other noticable performance impacts, so it goes to show that you should never optimize blindly and always measure the performance impact when trying to optimize.