axblk / teeworlds

A retro multiplayer shooter
http://teeworlds.com
Other
11 stars 2 forks source link

Race: tees get stuck after entering teleports #11

Closed Dune-jr closed 5 years ago

Dune-jr commented 5 years ago

Forwarding this report.

Teleports are broken. Some tees get stuck after entering them. I've observed it on servers with more than one player. At first I thought it was only because the exit TP was very close to collision tiles and this is certainly true to some extent, but sometimes it can also teleport you to anywhere on the map even though the exit isn't occupied and was placed in a big open area - which is very weird.

TeeSlayer at https://www.teeworlds.com/forum/viewtopic.php?pid=122471#p122471

Any clue what could cause this? I haven't investigated, but I'll update if I find something.

Edit: this could be a bug introduced by player collision, which the teleport system could be counting on. In which case, it's on my side :) In fact, pure races don't seem to run into the issue.

Edit2:

so if a tee is moving exactly X+3 and Y+3 from the tp out (assuming 4th quandrant) and is standing on top of a collision tile, the tp out is moving to his location causing the other tee to get stuck

So it is indeed a player collision thing. I didn't understand the issue much yet, not sure if it should be fixed in race too.

axblk commented 5 years ago

Maybe https://github.com/axblk/teeworlds/commit/687b1cc7a7a4301913ad3200ca6e3a78217719fc fixed it. If you are able to reproduce it, could you try again? At least teleporting to random positions and negative scores (https://github.com/axblk/teeworlds/commit/95aee788e0722f4cf3f0107b887b6dc8debdca7b) should be fixed now. Not sure about tees getting stuck though.

Dune-jr commented 5 years ago

Thanks @axblk, I will update and try to reproduce

Dune-jr commented 5 years ago

Yes, I made a few tests and it appears to be fixed. :+1:

@TeeSlayer in https://github.com/Dune-jr/teeworlds/issues/45#issuecomment-453558688