Fix startbumps.

A more detailed explanation:
* P_CheckPosition is the function which determines collisions.
* In Vanilla, collisions do not happen between players unless tailspickup is off (which it basically never is).
* Even with tailspickup off, on-spawn player collisions do not affect momentum.
* However, in kart, player collisions cause the player to get bumped.
* It would succeed at the P_CheckPosition call because players aren't *solid* solid, even though they cause bumps.
* It would fail at the K_CheckPlayersRespawnColliding call, but that would be too late, *as the player already has been bumped.*
* The player would therefore be moved to a new location, but still retain bump momentum, and the bump sound would have played for both players.
* Therefore, the obvious solution is to swap P_CheckPosition and K_CheckPlayersRespawnColliding, so that it checks for players BEFORE it performs object collisions at that spot.
* The reason we didn't see this MUCH before is that it can only ever happen in the case of ties.

I could've easily done this into master, but obviously I figure yalls'd at least like to check this first.
This commit is contained in:
toaster 2018-11-06 13:33:27 +00:00
parent f2e9186c7b
commit 935c0da7d2
1 changed files with 2 additions and 2 deletions

View File

@ -2621,10 +2621,10 @@ static boolean G_CheckSpot(INT32 playernum, mapthing_t *mthing)
x = mthing->x << FRACBITS;
y = mthing->y << FRACBITS;
if (!P_CheckPosition(players[playernum].mo, x, y))
if (!K_CheckPlayersRespawnColliding(playernum, x, y))
return false;
if (!K_CheckPlayersRespawnColliding(playernum, x, y))
if (!P_CheckPosition(players[playernum].mo, x, y))
return false;
return true;