Skip to content

Commit

Permalink
auto third person upon saber selection should also apply to fists
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes committed Jun 22, 2024
1 parent 7c62d22 commit 4cdf468
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code/game/bg_pmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4cdf468

Please sign in to comment.