pastel
The code in question:
The result:
I should note that I originally wanted to use P_CheckPosition followed by P_TeleportMove for this but that apparently does not work as P_CheckPosition always returns true even when the position is outside the map entirely. So to get around this spring interaction I had to use the silly workaround of spawning an object with the same properties as the player and trymove that instead.
Code:
if P_TryMove(player.mo, player.mo.x+FixedMul(624*FRACUNIT, cos(player.mo.angle)), player.mo.y+FixedMul(624*FRACUNIT, sin(player.mo.angle)), player.mo.z)
I should note that I originally wanted to use P_CheckPosition followed by P_TeleportMove for this but that apparently does not work as P_CheckPosition always returns true even when the position is outside the map entirely. So to get around this spring interaction I had to use the silly workaround of spawning an object with the same properties as the player and trymove that instead.
Attachments
Last edited: