From 70428c4d2e0b1480f0a01f93034c66f64febb3f2 Mon Sep 17 00:00:00 2001
From: Zack Middleton <zack@cloemail.com>
Date: Sun, 4 Jun 2023 13:53:25 -0500
Subject: [PATCH] Fix controls menu not updating weapon model

Q3 updates the weapon model at end of drop weapon animation but
Q3Rally doesn't use animations. So update the weapon model when
triggering the weapon change sound.
---
 engine/code/q3_ui/ui_players.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/engine/code/q3_ui/ui_players.c b/engine/code/q3_ui/ui_players.c
index 8b6be91b..f518673d 100644
--- a/engine/code/q3_ui/ui_players.c
+++ b/engine/code/q3_ui/ui_players.c
@@ -1111,6 +1111,10 @@ void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int ti
 		if( pi->currentWeapon != pi->weapon ) {
 			trap_S_StartLocalSound( weaponChangeSound, CHAN_LOCAL );
 		}
+
+		// Q3 changes weapon model at end of TORSO_DROP animation
+		// but Q3Rally doesn't use it so just change weapon now.
+		UI_PlayerInfo_SetWeapon( pi, pi->weapon );
 	}
 
 	UI_AdjustFrom640( &x, &y, &w, &h );