lineIntersectsSurfaces ignores it's ignoreObj parameter if the object is inside a vehicle...
lineIntersectsSurfaces [ eyepos unit2, eyepos unit1, unit2, unit1, true, 10, "FIRE", "NONE" ];
I'm doing lineIntersectsSurfaces between a unit in a vehicle and an outsider... Not only is it ignoring it's ignoreObj parameter.. But also It's returning a intersection for the weapon of the unit inside the vehicle
I have unit1 inside the vehice and unit2 right beside it.
the ignoreObj parameters on lineIntersectsSurfaces are unit1 and unit2
If unit1 is in the vehicle the ignoreObj parameter for him gets ignored and lineIntersectsSurfaces returns unit1 and the vehicle.
Vehicle in question is the AMV-7 Marshall and unit1 is in the commander seat.
Also if he is in vehicle lineIntersectsSurfaces takes 0.08ms instead of 0.04 if he is outside.
Even if keeping the points of the line the same instead of dynamically using eyePos (which also takes over 2x the time to execute if he is in a vehicle) the same performance degredation happens just by one of the ignoreObj's being inside a vehicle... To be exact it only happens when unit1 (the server host) is inside the vehicle... If i swap and unit1 stands outside with unit2 inside it works fine...
Will investigate more tomorrow.