fixes towards g36 carry handle sights

This commit is contained in:
notGreg 2022-12-10 16:35:27 +01:00
parent c5dc51a0db
commit 98767f520f

View File

@ -30,7 +30,7 @@ namespace notGreg.UniformAim
//this function can be replaced by FixedUpdate() at 50Hz (adjustable via Time.fixedDeltaTime)
//FixedUpdate() proved to be slightly more reliable in the past, however it had other unintended effects on the game.
void Update()
void FixedUpdate()
{
//check if the world instance exists
//Logger.LogInfo("Checking world instance");
@ -165,6 +165,8 @@ namespace notGreg.UniformAim
var scopeIndex = currentAimingMode.SelectedScopeIndex;
var scopeMode = currentAimingMode.SelectedScopeMode;
//Logger.LogInfo("Index: " + scopeIndex + "\nMode: " + scopeMode);
//patches for specific scopes, matches item name
switch (scopeName)
{
@ -187,6 +189,18 @@ namespace notGreg.UniformAim
return scopeCamera;
}
}
case "scope_base_trijicon_acog_ta11_3,5x35":
{
if (scopeIndex == 1)
{
//Logger.Loginfo($"G36 Rail sight");
return mainCamera;
}
else
{
return scopeCamera;
}
}
default:
{
if (scopeCamera == null || scopeCamera.isActiveAndEnabled == false)