update
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Invector.vCharacterController;
|
||||
using Invector.vCharacterController;
|
||||
using OnlyScove.Scripts;
|
||||
|
||||
namespace Invector.vShooter
|
||||
{
|
||||
[vClassHeader("Shooter Lock-On")]
|
||||
@@ -30,9 +32,10 @@ namespace Invector.vShooter
|
||||
|
||||
protected override void LockOnInput()
|
||||
{
|
||||
if (tpInput.tpCamera == null || tpInput.cc == null) return;
|
||||
if (tpInput == null || tpInput.tpCamera == null || tpInput.cc == null || inputReader == null) return;
|
||||
|
||||
// lock the camera into a target, if there is any around
|
||||
if (lockOnInput.GetButtonDown() && !tpInput.cc.customAction)
|
||||
if (inputReader.ConsumeToggleView() && !tpInput.cc.customAction)
|
||||
{
|
||||
isLockingOn = !isLockingOn;
|
||||
LockOn(isLockingOn);
|
||||
@@ -43,10 +46,11 @@ namespace Invector.vShooter
|
||||
isLockingOn = false;
|
||||
LockOn(false);
|
||||
}
|
||||
|
||||
// choose to use lock-on with strafe of free movement
|
||||
if (strafeWhileLockOn && !tpInput.cc.locomotionType.Equals(vThirdPersonMotor.LocomotionType.OnlyStrafe))
|
||||
{
|
||||
if (shooterMelee.isAimingByInput || strafeWhileLockOn && isLockingOn && tpInput.tpCamera.lockTarget != null)
|
||||
if (shooterMelee.isAimingByInput || (strafeWhileLockOn && isLockingOn && tpInput.tpCamera.lockTarget != null))
|
||||
tpInput.cc.lockInStrafe = true;
|
||||
else
|
||||
tpInput.cc.lockInStrafe = false;
|
||||
|
||||
Reference in New Issue
Block a user