From d860202b8a5ec90ceb0c903a0c9adf629fba0460 Mon Sep 17 00:00:00 2001 From: Sryder Date: Sun, 5 Mar 2017 23:24:17 +0000 Subject: [PATCH 1/2] use R_PointToDist2 to avoid an overflow when walls glitch out and you can accelerate into them endlessly --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index 430c57396..bdf77ca4f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1155,7 +1155,7 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, boolean forwardmove if (!onground) return 0; // If the player isn't on the ground, there is no change in speed // ACCELCODE!!!1!11! - oldspeed = P_AproxDistance(player->rmomx, player->rmomy); // FixedMul(P_AproxDistance(player->rmomx, player->rmomy), player->mo->scale); + oldspeed = R_PointToDist2(0, 0, player->rmomx, player->rmomy); // FixedMul(P_AproxDistance(player->rmomx, player->rmomy), player->mo->scale); newspeed = FixedDiv(FixedDiv(FixedMul(oldspeed, accelmax - p_accel) + FixedMul(p_speed, p_accel), accelmax), ORIG_FRICTION); finalspeed = newspeed - oldspeed; From 2472d3e39fc830a094b059053b3c9d12db7ded5a Mon Sep 17 00:00:00 2001 From: Sryder Date: Mon, 6 Mar 2017 00:38:08 +0000 Subject: [PATCH 2/2] Send kartstuff when joining netgame --- src/p_saveg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/p_saveg.c b/src/p_saveg.c index 4f15f2cba..d10cbcbcd 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -136,6 +136,8 @@ static void P_NetArchivePlayers(void) for (j = 0; j < NUMPOWERS; j++) WRITEUINT16(save_p, players[i].powers[j]); + for (j = 0; j < NUMKARTSTUFF; j++) + WRITEUINT16(save_p, players[i].kartstuff[j]); WRITEUINT8(save_p, players[i].playerstate); WRITEUINT32(save_p, players[i].pflags); @@ -315,6 +317,8 @@ static void P_NetUnArchivePlayers(void) for (j = 0; j < NUMPOWERS; j++) players[i].powers[j] = READUINT16(save_p); + for (j = 0; j < NUMKARTSTUFF; j++) + players[i].kartstuff[j] = READUINT16(save_p); players[i].playerstate = READUINT8(save_p); players[i].pflags = READUINT32(save_p);