Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions sp/src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8620,15 +8620,19 @@ void CMovementSpeedMod::InputEnable(inputdata_t &data)

pPlayer->HideViewModels();
}

// Turn off the flashlight
if ( pPlayer->FlashlightIsOn() )

if ( !HasSpawnFlags( SF_SPEED_MOD_DONT_SUPPRESS_FLASHLIGHT ) )
{
pPlayer->FlashlightTurnOff();
}
// Turn off the flashlight
if ( pPlayer->FlashlightIsOn() )
{
pPlayer->FlashlightTurnOff();
}

// Disable the flashlight's further use
pPlayer->SetFlashlightEnabled( false );
// Disable the flashlight's further use
pPlayer->SetFlashlightEnabled( false );
}

pPlayer->DisableButtons( GetDisabledButtonMask() );

// Hide the HUD
Expand Down Expand Up @@ -8663,9 +8667,13 @@ void CMovementSpeedMod::InputDisable(inputdata_t &data)
pPlayer->GetActiveWeapon()->Deploy();
}
}

if ( !HasSpawnFlags( SF_SPEED_MOD_DONT_SUPPRESS_FLASHLIGHT ) )
{
// Allow the flashlight again
pPlayer->SetFlashlightEnabled( true );
}

// Allow the flashlight again
pPlayer->SetFlashlightEnabled( true );
pPlayer->EnableButtons( GetDisabledButtonMask() );

// Restore the HUD
Expand Down