mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 21:31:32 +00:00
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:
parent
f2e9186c7b
commit
935c0da7d2
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue