Skip to content

Commit

Permalink
Fix soulswitcher when special active (#523)
Browse files Browse the repository at this point in the history
This fixes the soul-switching gun so that if it is used while Michael's special ability is active, the ability will first turn off before the switch takes place.
  • Loading branch information
nomakewan authored Feb 26, 2023
1 parent cbcf6fb commit b91068a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Solution/source/Menu/Routine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,12 @@ void set_soulswitch_gun()
if (soulswitchentity.IsPed() && soulswitchentity.IsAlive()
&& (IS_DISABLED_CONTROL_JUST_PRESSED(0, INPUT_ATTACK) || (IS_PED_IN_ANY_VEHICLE(playerPed.Handle(), false) && IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_VEH_ATTACK))))
{
if (IS_SPECIAL_ABILITY_ACTIVE(PLAYER_ID(), 0))
{
SPECIAL_ABILITY_DEACTIVATE_FAST(PLAYER_ID(), 0);
WAIT(16);
}

Game::Sound::PlayFrontend("Knuckle_Crack_Hard_Cel", "MP_SNACKS_SOUNDSET");
ANIMPOSTFX_PLAY("MinigameEndNeutral", 0, 0); // FocusIn
set_become_ped(soulswitchentity);
Expand Down

1 comment on commit b91068a

@kucukoneralp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

What is the solution to this warning I receive?

Please sign in to comment.