Skip to content

Commit

Permalink
freecam culling fix + effect removal + fastmode
Browse files Browse the repository at this point in the history
Co-Authored-By: Mihai <[email protected]>
  • Loading branch information
devbence and mihaicm93 committed Apr 24, 2024
1 parent db32ff1 commit 5cd9b20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Coop/FreeCamera/FreeCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void Update()
}

var fastMode = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
var movementSpeed = fastMode ? 10f : 2f;
var movementSpeed = fastMode ? 20f : 3f;

if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow))
{
Expand Down
12 changes: 12 additions & 0 deletions Source/Coop/FreeCamera/FreeCameraController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ public void Update()
DisableAndDestroyEffect(effectsController.GetComponent<CC_Wiggle>());
DisableAndDestroyEffect(effectsController.GetComponent<CC_RadialBlur>());
DisableAndDestroyEffect(effectsController.GetComponent<MotionBlur>());
DisableAndDestroyEffect(effectsController.GetComponent<BloodOnScreen>());
DisableAndDestroyEffect(effectsController.GetComponent<GrenadeFlashScreenEffect>());
DisableAndDestroyEffect(effectsController.GetComponent<DepthOfField>());
//DisableAndDestroyEffect(effectsController.GetComponent<RainScreenDrops>());

var ccBlends = fpsCamInstance.EffectsController.GetComponents<CC_Blend>();
if (ccBlends != null)
Expand Down Expand Up @@ -162,6 +166,14 @@ public void ToggleCamera()

if (!_freeCamScript.IsActive)
{
GameObject[] allGameObject = Resources.FindObjectsOfTypeAll<GameObject>();
foreach (GameObject gobj in allGameObject)
{
if (gobj.GetComponent<DisablerCullingObject>() != null)
{
gobj.GetComponent<DisablerCullingObject>().ForceEnable(true);
}
}
SetPlayerToFreecamMode(localPlayer);
}
else
Expand Down

0 comments on commit 5cd9b20

Please sign in to comment.