P_TryMove used by the player activates springs even when it returns false

Katmint

‫‬‭‮‪‫‬‭‮
The code in question:
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)
The result:
attachment.php


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

  • srb20001.gif
    srb20001.gif
    3.5 MB · Views: 284
Last edited:
Yeah this is partly due to the nature of P_TryMove itself, it runs all collision on objects for multiple x/y positions along the way to the destination, including springs (and in fact it returns false as a result of touching springs IIRC)
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top