mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00
fix(Spectate): Don't force spectate unless it's explicitly enabled
This commit is contained in:
parent
5426bf2862
commit
9dd5a1232f
@ -4,16 +4,26 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
static Ped spectated_ped = -1;
|
||||
static bool bLastSpectating = false;
|
||||
static bool bReset = true;
|
||||
|
||||
void looped::player_specate()
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED(g.selected_player.id);
|
||||
if (!g.selected_player.is_online || !g.player.spectating)
|
||||
{
|
||||
if (g.player.spectating) g.player.spectating = false;
|
||||
|
||||
if (player != spectated_ped || (!bLastSpectating && bLastSpectating != g.player.spectating))
|
||||
g_pointers->m_spectate_player(g.player.spectating, player);
|
||||
if (!bReset)
|
||||
{
|
||||
bReset = true;
|
||||
|
||||
bLastSpectating = g.player.spectating;
|
||||
g_pointers->m_spectate_player(false, -1);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
g_pointers->m_spectate_player(true, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g.selected_player.id));
|
||||
|
||||
bReset = false;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user