From d1ec829d5fc94e0ad7c739ae2d78a4f232ee75fb Mon Sep 17 00:00:00 2001
From: Ashnal <ashnal52@gmail.com>
Date: Fri, 3 May 2024 20:52:43 -0400
Subject: [PATCH] Fix horn and and hitconfirm anim for fallback follower

---
 src/k_follower.c |  8 ++++++--
 src/k_kart.c     | 12 ++++++++----
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/k_follower.c b/src/k_follower.c
index 618efeedf..1052ec019 100644
--- a/src/k_follower.c
+++ b/src/k_follower.c
@@ -766,14 +766,18 @@ void K_FollowerHornTaunt(player_t *taunter, player_t *victim, boolean mysticmelo
 	if (
 		taunter == NULL
 		|| victim == NULL
-		|| taunter->followerskin < 0
+		|| taunter->followerskin < -1
 		|| taunter->followerskin >= numfollowers
 	)
 	{
 		return;
 	}
 
-	const follower_t *fl = &followers[taunter->followerskin];
+	follower_t *fl;
+	if (taunter->followerskin == -1) /// mmm spaghetti
+		fl = &followers[K_FollowerAvailable("Goddess")]; // special case for checking for fallback follower for autoring
+	else
+		fl = &followers[taunter->followerskin];
 
 	// Restrict mystic melody special status
 	if (mysticmelodyspecial == true)
diff --git a/src/k_kart.c b/src/k_kart.c
index 2bd89a293..4f8401935 100644
--- a/src/k_kart.c
+++ b/src/k_kart.c
@@ -2866,10 +2866,15 @@ void K_TryHurtSoundExchange(mobj_t *victim, mobj_t *attacker)
 	attacker->player->confirmVictimDelay = TICRATE/2;
 
 	if (attacker->player->follower != NULL
-		&& attacker->player->followerskin >= 0
+		&& attacker->player->followerskin >= -1
 		&& attacker->player->followerskin < numfollowers)
 	{
-		const follower_t *fl = &followers[attacker->player->followerskin];
+		follower_t *fl;
+		if (attacker->player->followerskin == -1) /// mmm spaghetti
+			fl = &followers[K_FollowerAvailable("Goddess")]; // special case for checking for fallback follower for autoring
+		else
+			fl = &followers[attacker->player->followerskin];
+
 		attacker->player->follower->movecount = fl->hitconfirmtime; // movecount is used to play the hitconfirm animation for followers.
 	}
 }
@@ -12612,8 +12617,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
 				if (
 					player->pflags & PF_AUTORING
 					&& leveltime > starttime
-					&& !(cmd->buttons & BT_BRAKE)
-					&& K_GetKartButtons(player)
+					&& K_GetForwardMove(player)
 					&& P_IsObjectOnGround(player->mo)
 				)
 				{
-- 
GitLab