29.08.2010, 16:22
If your server is fast enough, you could use OnPlayerUpdate, but a 200-300 ms timer should be fine too.
The dimensions will be the major problem, did not thought about this yet. You could calc the point the vehicle will be at in 300ms or so, and then check the distance to the position of the npc, but this wont be very accurate, especially for too long or too short vehicles. Maybe this works fine enough, else you would have to "map" the vehicle dimensions, and thats a lot of work. I think no one did this before or at least did not publish the result.
The dimensions will be the major problem, did not thought about this yet. You could calc the point the vehicle will be at in 300ms or so, and then check the distance to the position of the npc, but this wont be very accurate, especially for too long or too short vehicles. Maybe this works fine enough, else you would have to "map" the vehicle dimensions, and thats a lot of work. I think no one did this before or at least did not publish the result.