From 69354856b70208f9b72219c5ddfe43b191e2eb06 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 02:46:16 -0400 Subject: [PATCH 01/11] "Joined with" kicks display in the chat instead of console --- src/d_clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 3d5b90a2..97b352da 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2922,7 +2922,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum) if (otherp >= 0) \ { \ if (otherp != pnum) \ - CONS_Printf("\x82%s\x80 left the game (Joined with \x82%s\x80)\n", player_names[otherp], player_names[pnum]); \ + HU_AddChatText(va("\x82*%s left the game (Joined with %s)", player_names[otherp], player_names[pnum]), false); \ buf[0] = (UINT8)otherp; \ SendNetXCmd(XD_REMOVEPLAYER, &buf, 1); \ otherp = -1; \ From db731209e521daa39c1308fb8a8ec76a95a7ead3 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 03:06:36 -0400 Subject: [PATCH 02/11] Fix ENTER GAME option not working --- src/d_netcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index a2dd550f..df9fb54a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3234,6 +3234,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum) players[playernum].playerstate = PST_REBORN; } + players[playernum].pflags &= ~PF_WANTSTOJOIN; + //Now that we've done our error checking and killed the player //if necessary, put the player on the correct team/status. if (G_TagGametype()) @@ -3315,8 +3317,6 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum) else CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80'); } - else if (players[playernum].pflags & PF_WANTSTOJOIN) - players[playernum].pflags &= ~PF_WANTSTOJOIN; else HU_AddChatText(va("\x82*%s became a spectator.", player_names[playernum]), false); From 20d86f01c7ab2a45455dcb0641b05f6fbc372bfe Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 03:07:33 -0400 Subject: [PATCH 03/11] Cancel pogo spring when bumping a wall Prevents instances where you can use it to stick in one spot in Battle --- src/p_map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_map.c b/src/p_map.c index 1d8a2daa..0078a969 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3784,6 +3784,7 @@ void P_BouncePlayerMove(mobj_t *mo) S_StartSound(mo, sfx_s3k49); } + mo->player->kartstuff[k_pogospring] = 0; // Cancel pogo spring effect so you aren't shoved forward back into the wall you just bounced off P_PlayerHitBounceLine(bestslideline); mo->eflags |= MFE_JUSTBOUNCEDWALL; From cc5d248c9095d30a3aa6fdd0dc41483a95391c2e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 03:13:56 -0400 Subject: [PATCH 04/11] Time over cam & signposts support mobjscale --- src/p_mobj.c | 4 ++-- src/p_spec.c | 6 +++--- src/p_user.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index f4fd40c9..9802c88e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8509,8 +8509,8 @@ void P_MobjThinker(mobj_t *mobj) case MT_FZEROBOOM: // F-Zero explosion if (!mobj->extravalue1) { - fixed_t mx = P_ReturnThrustX(NULL, mobj->angle, 32<angle, 32<angle, 32*mobj->scale); + fixed_t my = P_ReturnThrustY(NULL, mobj->angle, 32*mobj->scale); mobj_t *explosion = P_SpawnMobj(mobj->x + (2*mx), mobj->y + (2*my), mobj->z+(mobj->height/2), MT_THOK); P_SetMobjState(explosion, S_FZEROBOOM1); diff --git a/src/p_spec.c b/src/p_spec.c index 76ed73aa..b7006c87 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3219,7 +3219,7 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (768<z += (768*thing->scale) * P_MobjFlip(thing); thing->movecount = 1; ++numfound; @@ -3247,7 +3247,7 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (768<z += (768*thing->scale) * P_MobjFlip(thing); thing->movecount = 1; ++numfound; @@ -3259,7 +3259,7 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: FINALLY, add in an alternative if no place is found if (player->mo) { - mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (768<mo->x, player->mo->y, player->mo->z + (768*mapheaderinfo[gamemap-1]->mobj_scale), MT_SIGN); P_SetTarget(&sign->target, player->mo); P_SetMobjState(sign, S_SIGN1); diff --git a/src/p_user.c b/src/p_user.c index 8cd31f72..b5d9397d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8606,8 +8606,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (timeover == 1) { - thiscam->momx = P_ReturnThrustX(NULL, mo->angle, 32<momy = P_ReturnThrustY(NULL, mo->angle, 32<momx = P_ReturnThrustX(NULL, mo->angle, 32*mo->scale); // Push forward + thiscam->momy = P_ReturnThrustY(NULL, mo->angle, 32*mo->scale); thiscam->momz = 0; } else if (player->exiting || timeover == 2) From 66a7adfc34e1b82d45ec62f66eed194ff5805570 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 04:46:24 -0400 Subject: [PATCH 05/11] Push fakes away from other items Prevents stupid item stacking in Battle (you can still do it with bananas, but THOSE are removable, and don't have a similar sprite) --- src/p_map.c | 25 +++++++++++++++++++++++++ src/p_mobj.c | 1 + 2 files changed, 26 insertions(+) diff --git a/src/p_map.c b/src/p_map.c index 0078a969..2bcfd73a 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -665,8 +665,33 @@ static boolean PIT_CheckThing(mobj_t *thing) // SRB2kart 011617 - Colission code for kart items //{ + // Push fakes out of other items + if (tmthing->type == MT_FAKEITEM && (thing->type == MT_RANDOMITEM || thing->type == MT_FAKEITEM)) + { + // see if it went over / under + if (tmthing->z > thing->z + thing->height) + return true; // overhead + if (tmthing->z + tmthing->height < thing->z) + return true; // underneath + + P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y), thing->radius/4); + return true; + } + else if (thing->type == MT_FAKEITEM && (tmthing->type == MT_RANDOMITEM || tmthing->type == MT_FAKEITEM)) + { + // see if it went over / under + if (tmthing->z > thing->z + thing->height) + return true; // overhead + if (tmthing->z + tmthing->height < thing->z) + return true; // underneath + + P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y), tmthing->radius/4); + return true; + } + if (tmthing->type == MT_RANDOMITEM) return true; + if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD || tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD) { diff --git a/src/p_mobj.c b/src/p_mobj.c index 9802c88e..407ddc39 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8151,6 +8151,7 @@ void P_MobjThinker(mobj_t *mobj) } case MT_BANANA: case MT_FAKEITEM: + mobj->friction = ORIG_FRICTION/4; if (mobj->momx || mobj->momy) P_SpawnGhostMobj(mobj); if (mobj->z <= mobj->floorz && mobj->health > 1) From 6da700629fd5ae63a191a724157343c715f5e6a3 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 04:55:00 -0400 Subject: [PATCH 06/11] Fix incorrect scale of player arrows in non-splitscreen whoops --- src/p_mobj.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 407ddc39..611562a9 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6829,10 +6829,10 @@ void P_MobjThinker(mobj_t *mobj) if (!splitscreen) { - scale += FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x, + scale = mobj->target->scale + FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x, players[displayplayer].mo->y-mobj->target->y)), RING_DIST), mobj->target->scale); - if (scale > 16*FRACUNIT) - scale = 16*FRACUNIT; + if (scale > 16*mobj->target->scale) + scale = 16*mobj->target->scale; } mobj->destscale = scale; @@ -7025,10 +7025,10 @@ void P_MobjThinker(mobj_t *mobj) if (!splitscreen) { - scale += FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x, + scale = mobj->target->scale + FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x, players[displayplayer].mo->y-mobj->target->y)), RING_DIST), mobj->target->scale); - if (scale > 16*FRACUNIT) - scale = 16*FRACUNIT; + if (scale > 16*mobj->target->scale) + scale = 16*mobj->target->scale; } mobj->destscale = scale; } From 54f71d3dbf0ab2443bd8e01b51148c9f74e250f8 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 05:28:39 -0400 Subject: [PATCH 07/11] Use frameangle for rocket sneakers so they rotate around you when you spinout --- src/k_kart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index ee59566f..be902e97 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3630,7 +3630,7 @@ static void K_MoveHeldObjects(player_t *player) #if 1 { - angle_t input = player->mo->angle - cur->angle; + angle_t input = player->frameangle - cur->angle; boolean invert = (input > ANGLE_180); if (invert) input = InvAngle(input); @@ -3642,7 +3642,7 @@ static void K_MoveHeldObjects(player_t *player) cur->angle = cur->angle + input; } #else - cur->angle = player->mo->angle; + cur->angle = player->frameangle; #endif angoffset = ANGLE_90 + (ANGLE_180 * num); From e76da7d5caa6da4b6991ef8896406674ce88d9f2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 05:32:59 -0400 Subject: [PATCH 08/11] No item usage while squished or respawning --- src/k_kart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index be902e97..fc90de2b 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4662,7 +4662,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground) else if (cmd->buttons & BT_ATTACK) player->pflags |= PF_ATTACKDOWN; - if (player && player->mo && player->mo->health > 0 && !player->spectator && !(player->exiting || mapreset) && player->kartstuff[k_spinouttimer] == 0) + if (player && player->mo && player->mo->health > 0 && !player->spectator && !(player->exiting || mapreset) + && player->kartstuff[k_spinouttimer] == 0 && player->kartstuff[k_squishedtimer] == 0 && player->kartstuff[k_respawn] == 0) { // First, the really specific, finicky items that function without the item being directly in your item slot. // Karma item dropping From 80b8aefdb2bc0d055314276c995ab5b992ed1537 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 05:35:06 -0400 Subject: [PATCH 09/11] Nerfed squishing After fixing flashing tics not being set properly, 2 seconds of being fully stopped and then another 1.5 seconds minimum of being unable to be hit just feels like an eternity :V --- 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 fc90de2b..4e576ea3 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1940,7 +1940,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source) K_CheckBumpers(); } - player->kartstuff[k_squishedtimer] = 2*TICRATE; + player->kartstuff[k_squishedtimer] = TICRATE; player->powers[pw_flashing] = K_GetKartFlashing(player); From 2999c45d05550c3f184420496acad5ae9d2309a7 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 31 Oct 2018 15:14:53 -0400 Subject: [PATCH 10/11] Item distribution experiments based on my experience in netgames Needs tested tonight. - Grow & Rocket Sneakers are slightly more in the back - Sneaker x3 gets handed out more in the back-middle - Removed 5% from Ballhog towards the front - Removed 5% from Shrink in the forward-most column it was in --- src/k_kart.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 4e576ea3..23b84ff1 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -487,22 +487,22 @@ static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] = { //P-Odds 0 1 2 3 4 5 6 7 8 /*Sneaker*/ {20, 0, 0, 4, 6, 6, 0, 0, 0 }, // Sneaker - /*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 2, 5, 5, 0 }, // Rocket Sneaker - /*Invincibility*/ { 0, 0, 0, 0, 0, 1, 4, 6,16 }, // Invincibility + /*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 1, 3, 5, 3 }, // Rocket Sneaker + /*Invincibility*/ { 0, 0, 0, 0, 0, 1, 4, 6,14 }, // Invincibility /*Banana*/ { 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana /*Eggman Monitor*/ { 0, 4, 3, 2, 0, 0, 0, 0, 0 }, // Eggman Monitor /*Orbinaut*/ { 0, 6, 5, 3, 2, 0, 0, 0, 0 }, // Orbinaut /*Jawz*/ { 0, 0, 3, 2, 1, 1, 0, 0, 0 }, // Jawz - /*Mine*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Mine - /*Ballhog*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Ballhog + /*Mine*/ { 0, 0, 2, 2, 1, 0, 0, 0, 0 }, // Mine + /*Ballhog*/ { 0, 0, 0, 2, 1, 0, 0, 0, 0 }, // Ballhog /*Self-Propelled Bomb*/ { 0, 0, 1, 2, 3, 4, 2, 2, 0 }, // Self-Propelled Bomb - /*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 5, 4 }, // Grow - /*Shrink*/ { 0, 0, 0, 0, 0, 0, 1, 2, 0 }, // Shrink + /*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 5, 3 }, // Grow + /*Shrink*/ { 0, 0, 0, 0, 0, 0, 0, 2, 0 }, // Shrink /*Thunder Shield*/ { 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Thunder Shield /*Hyudoro*/ { 0, 0, 0, 0, 1, 2, 1, 0, 0 }, // Hyudoro /*Pogo Spring*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Pogo Spring /*Kitchen Sink*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Kitchen Sink - /*Sneaker x3*/ { 0, 0, 0, 0, 3, 6, 6, 2, 0 }, // Sneaker x3 + /*Sneaker x3*/ { 0, 0, 0, 0, 3, 7, 9, 2, 0 }, // Sneaker x3 /*Banana x3*/ { 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Banana x3 /*Banana x10*/ { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // Banana x10 /*Orbinaut x3*/ { 0, 0, 0, 1, 0, 0, 0, 0, 0 }, // Orbinaut x3 From 5c7de7559292fb462303ba96edcc830dda9f2d38 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 1 Nov 2018 19:50:31 -0400 Subject: [PATCH 11/11] Fix random crash on squishing Why does this cause a crash? I dunno, beats me, but this seemed to fix it. --- src/p_map.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 2bcfd73a..5784b3ff 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1411,19 +1411,17 @@ static boolean PIT_CheckThing(mobj_t *thing) // Make sure they aren't able to damage you ANYWHERE along the Z axis, you have to be TOUCHING the person. && !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height)) { - // SRB2kart - Squish! - if (tmthing->scale > thing->scale + (FRACUNIT/8)) + + if (tmthing->scale > thing->scale + (FRACUNIT/8)) // SRB2kart - Handle squishes first! K_SquishPlayer(thing->player, tmthing); else if (thing->scale > tmthing->scale + (FRACUNIT/8)) K_SquishPlayer(tmthing->player, thing); - - // SRB2kart - Invincibility! - if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) + else if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) // SRB2kart - Then invincibility! P_DamageMobj(thing, tmthing, tmthing, 1); else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer]) P_DamageMobj(tmthing, thing, thing, 1); - if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam)) + /*if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam)) { if ((tmthing->player->powers[pw_invulnerability] || tmthing->player->powers[pw_super]) && !thing->player->powers[pw_super]) @@ -1441,7 +1439,7 @@ static boolean PIT_CheckThing(mobj_t *thing) P_DamageMobj(thing, tmthing, tmthing, 1); else if ((thing->player->pflags & PF_TAGIT) && !(tmthing->player->pflags & PF_TAGIT)) P_DamageMobj(tmthing, thing, tmthing, 1); - } + }*/ } // Force solid players in hide and seek to avoid corner stacking.