Skip to content

Instantly share code, notes, and snippets.

@AgentRev
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AgentRev/4caeb6dd68a7cf0310a8 to your computer and use it in GitHub Desktop.
Save AgentRev/4caeb6dd68a7cf0310a8 to your computer and use it in GitHub Desktop.
First Person Cam
// @file Name: cameraChecks.sqf
// @file Author: AgentRev
if (!hasInterface) exitWith {};
private ["_fpOnFoot", "_forceFP"];
_fpOnFoot = (difficultyEnabled "3rdPersonView" && ["A3W_firstPersonCamOnFoot"] call isConfigOn);
while {true} do
{
waitUntil
{
_forceFP = (_fpOnFoot && alive player && cameraOn == player);
((_forceFP && cameraView == "EXTERNAL") || cameraView == "GROUP")
};
if (cameraView == "GROUP") then
{
cameraOn switchCamera "EXTERNAL";
};
if (_forceFP && cameraView == "EXTERNAL") then
{
cameraOn switchCamera "INTERNAL";
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment