From 52bd4b05e1d4d74083e6c50331df07363e92e73d Mon Sep 17 00:00:00 2001
From: toaster <rollerorbital@gmail.com>
Date: Fri, 15 Nov 2019 15:20:36 +0000
Subject: [PATCH] * Make the Egg Capsule only explode for one second, but have
 the number of explosions (and flickies) multiplied 1.5 times. * If the player
 is spindashing when the level is exited, they will un-spindash. (Currently
 you get stuck in charging)

---
 src/p_inter.c | 2 +-
 src/p_mobj.c  | 6 +++---
 src/p_user.c  | 5 +++++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/p_inter.c b/src/p_inter.c
index b0a401b10..4f1b5c5bb 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -2741,7 +2741,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
 
 		case MT_EGGTRAP:
 			// Time for birdies! Yaaaaaaaay!
-			target->fuse = TICRATE*2;
+			target->fuse = TICRATE;
 			break;
 
 		case MT_MINECART:
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 5d6a8a10f..2fff12fa4 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -8227,7 +8227,7 @@ void P_MobjThinker(mobj_t *mobj)
 			mobj->flags2 ^= MF2_DONTDRAW;
 			break;
 		case MT_EGGTRAP: // Egg Capsule animal release
-			if (mobj->fuse > 0 && mobj->fuse < 2*TICRATE-(TICRATE/7))
+			if (mobj->fuse > 0)// && mobj->fuse < TICRATE-(TICRATE/7))
 			{
 				INT32 i;
 				fixed_t x,y,z;
@@ -8236,9 +8236,9 @@ void P_MobjThinker(mobj_t *mobj)
 				mobj_t *flicky;
 
 				z = mobj->subsector->sector->floorheight + FRACUNIT + (P_RandomKey(64)<<FRACBITS);
-				for (i = 0; i < 2; i++)
+				for (i = 0; i < 3; i++)
 				{
-					const angle_t fa = (P_RandomByte()*FINEANGLES/16) & FINEMASK;
+					const angle_t fa = P_RandomKey(FINEANGLES) & FINEMASK;
 					ns = 64 * FRACUNIT;
 					x = mobj->x + FixedMul(FINESINE(fa),ns);
 					y = mobj->y + FixedMul(FINECOSINE(fa),ns);
diff --git a/src/p_user.c b/src/p_user.c
index 3c481e7e2..f992ae679 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -2158,6 +2158,11 @@ void P_DoPlayerExit(player_t *player)
 		player->pflags |= P_GetJumpFlags(player);
 		P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
 	}
+	else if (player->pflags & PF_STARTDASH)
+	{
+		player->pflags &= ~PF_STARTDASH;
+		P_SetPlayerMobjState(player->mo, S_PLAY_STND);
+	}
 	player->powers[pw_underwater] = 0;
 	player->powers[pw_spacetime] = 0;
 	P_RestoreMusic(player);