SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion > Bug Reports

Reply
 
Thread Tools Search this Thread
Old 05-14-2020   #1
Katmint
 
Katmint's Avatar
Default P_TryMove used by the player activates springs even when it returns false

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:


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.
Attached Thumbnails
Click image for larger version

Name:	srb20001.gif
Views:	95
Size:	3.55 MB
ID:	31351  

Last edited by Katmint; 05-14-2020 at 09:27 PM.
Katmint is offline   Reply With Quote
Old 05-17-2020   #2
Monster Iestyn
Fangtastic
Administrator
 
Monster Iestyn's Avatar
Default

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)
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record. Also, it's pronounced "Yes-tin".
Monster Iestyn is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.