From 0d3ee9a109e3968dd1eb5bd71758ab5c2edaa338 Mon Sep 17 00:00:00 2001
From: toasterbabe <rollerorbital@gmail.com>
Date: Fri, 30 Sep 2016 20:14:23 +0100
Subject: [PATCH] Weapon rings are limited in how fast they can scroll, so I
 guess it's okay if objectplace is too - and makes it less awkward for people
 who do just use normal keys for weapon up/down for some reason.

---
 src/m_cheat.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/m_cheat.c b/src/m_cheat.c
index 1c1b8c6aa1..4c44d4b89e 100644
--- a/src/m_cheat.c
+++ b/src/m_cheat.c
@@ -1165,7 +1165,7 @@ void OP_ObjectplaceMovement(player_t *player)
 	if (player->pflags & PF_ATTACKDOWN)
 	{
 		// Are ANY objectplace buttons pressed?  If no, remove flag.
-		if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG)))
+		if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_WEAPONNEXT|BT_WEAPONPREV)))
 			player->pflags &= ~PF_ATTACKDOWN;
 
 		// Do nothing.
@@ -1173,9 +1173,16 @@ void OP_ObjectplaceMovement(player_t *player)
 	}
 
 	if (cmd->buttons & BT_WEAPONPREV)
+	{
 		OP_CycleThings(-1);
-	else if (cmd->buttons & BT_WEAPONNEXT)
+		player->pflags |= PF_ATTACKDOWN;
+	}
+
+	if (cmd->buttons & BT_WEAPONNEXT)
+	{
 		OP_CycleThings(1);
+		player->pflags |= PF_ATTACKDOWN;
+	}
 
 	// Place an object and add it to the maplist
 	if (cmd->buttons & BT_ATTACK)
-- 
GitLab