Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Fix insurgency thirdperson
Browse files Browse the repository at this point in the history
  • Loading branch information
Kxnrl committed Jun 7, 2023
1 parent 4953b9f commit 838bf7b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions store/tpmode.sp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ static Action Command_Mirror(int client, int args)
return Plugin_Handled;
}

#if !defined GM_IS
if(mp_forcecamera == null)
{
tPrintToChat(client, "%T", "tp not allow", client);
return Plugin_Handled;
}
#endif

ToggleMirror(client, !g_bMirror[client]);

Expand Down Expand Up @@ -186,17 +188,23 @@ static void ToggleMirror(int client, bool state)
SetEntProp(client, Prop_Send, "m_iObserverMode", 1);
SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 0);
SetEntProp(client, Prop_Send, "m_iFOV", 120);

#if !defined GM_IS
mp_forcecamera.ReplicateToClient(client, "1");
#endif
}
else
{
SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", -1);
SetEntProp(client, Prop_Send, "m_iObserverMode", 0);
SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 1);
SetEntProp(client, Prop_Send, "m_iFOV", 90);

#if !defined GM_IS
char value[6];
mp_forcecamera.GetString(value, 6);
mp_forcecamera.ReplicateToClient(client, value);
#endif
}

g_bMirror[client] = state;
Expand Down

0 comments on commit 838bf7b

Please sign in to comment.