SetPos on vehicles

So I’m working on this infinite map addon, and there’s a strange problem going on.
Basically how it works is that, once you reach the “edge” of the map, it will set your position to the opposite side of the map, and uses rendering tricks and ShouldCollide hooks to make it seem infinite. There’s a billion other hacks to make it work smoothly (including setting velocity and such), and it works fine. Except with vehicles. Props, players, etc all get set to the “other side” of the map, but with vehicles, it doesn’t work. The jeep is set to the proper cell, but on the wrong side of it. I went through the code and tested it and everything, but for some reason it’s just ignoring the setpos.

I believe it has something to do with these lines:

But I’m not sure what would be causing this. I used lua_run to manually set the position of the jeep to, say, 0 0 0, and it worked fine. Not sure what’s going on.

Sorry if this doesn’t make too much sense.

:snip: am blind