The way you have it currently set up no matter where you're looking when you use the trigger mod it activates the deposit attack, this makes sense at first because there's nothing else to trigger, but sometimes people have mods where either enemies spawn at the company or someone's using control company and you can't possess because of deposit trigger. So this code right here simply just makes it work like every other object where you have to look at it.
Trigger Mod:
Remove:
if (HaxObjects.Instance?.DepositItemsDesk?.Object.Unfake() is DepositItemsDesk deposit) {
deposit.AttackPlayersServerRpc();
return;
}
Add:
foreach (RaycastHit raycastHit in camera.transform.SphereCastForward()) {
Collider collider = raycastHit.collider;
if (collider.TryGetComponent(out DepositItemsDesk deposit)) { // New
deposit.AttackPlayersServerRpc();
}
// Rest of code
}
Current Commit Hash
none
Injector
[X] SharpMonoInjectorCore
[ ] Others
If you selected "Others" above, please specify the injector you are using.
No response
Log output
No response
Acknowledgement
[X] I have confirmed that my anti-virus is not blocking any of the relevant programs
[X] I have done my due diligence to check for similar issues
What happened?
The way you have it currently set up no matter where you're looking when you use the trigger mod it activates the deposit attack, this makes sense at first because there's nothing else to trigger, but sometimes people have mods where either enemies spawn at the company or someone's using control company and you can't possess because of deposit trigger. So this code right here simply just makes it work like every other object where you have to look at it.
Trigger Mod:
Remove:
Add:
Current Commit Hash
none
Injector
If you selected "Others" above, please specify the injector you are using.
No response
Log output
No response
Acknowledgement