From 4cdf4688866c9524381850d478d615cf3bdabcd7 Mon Sep 17 00:00:00 2001 From: Gene Date: Fri, 21 Jun 2024 22:49:50 -0700 Subject: [PATCH] auto third person upon saber selection should also apply to fists --- code/game/bg_pmove.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/game/bg_pmove.cpp b/code/game/bg_pmove.cpp index 77569b4fbf..6425afc88b 100644 --- a/code/game/bg_pmove.cpp +++ b/code/game/bg_pmove.cpp @@ -9014,6 +9014,21 @@ static void PM_FinishWeaponChange( void ) { if ( pm->gent && pm->gent->client && pm->gent->client->NPC_class == CLASS_ATST ) {//do nothing } + else if ( weapon == WP_MELEE ) + {//player wants to fist + if ( pm->gent ) + {// remove gun if we had it. + G_RemoveWeaponModels( pm->gent ); + } + + if ( pm->gent ) + {//cg_saberAutoThird should also apply to fists + if ( (pm->ps->clientNum < MAX_CLIENTS||PM_ControlledByPlayer()) && cg_saberAutoThird.integer ) + { + gi.cvar_set( "cg_thirdperson", "1" ); + } + } + } else if ( weapon == WP_SABER ) {//turn on the lightsaber //FIXME: somehow sometimes I still end up with 2 weapons in hand... usually if I