Re: Issues with the Map Seam
The issue is that you're moving a position outside of the map to the ground. Let's say you're on a 640x480 map which wraps, and you're standing on the very right (at 640), looking exactly right.
Code:
self.newpos = SceneMan:MovePointToGround(Vector(self.Pos.X + 80 * math.cos(-self:GetAimAngle(true)),self.Pos.Y + 80 * math.sin(-self:GetAimAngle(true))),20,8);
This is going to be trying to move you to the ground position at an x-position of 720. However, the map doesn't actually go that far. Where you want to land is 720 - 640 = 80. Try this:
Code:
local newX = self.Pos.X + 80 * math.cos(-self:GetAimAngle(true));
newX = newX % 640;
self.newpos = SceneMan:MovePointToGround(Vector(newX,self.Pos.Y + 80 * math.sin(-self:GetAimAngle(true))),20,8);
What the % operator does is modulus. It gets the remainder of the number divided by the second number.
Apply that to both pieces that use that piece of code and it should work.