Ace3: Barrel can be swapped on weapons with no ace_overheating_allowSwapBarrel entry.

Created on 27 Feb 2018  路  2Comments  路  Source: acemod/ACE3

Arma 3 Version: 1.80
CBA Version: 3.5.0
ACE3 Version: 3.12.1

Mods:

- CBA_A3
- ace

Description:

  • If a weapon has no ace_overheating_allowSwapBarrel entry then the barrel can be swapped.
  • Expected behaviour is to only allow swapping if entry is present and == 1

Steps to reproduce:

  • Have a spare barrel
  • Have a friend with any weapon that has no ace_overheating_allowSwapBarrel
  • Change your friends barrel

Where did the issue occur?

  • Noticed on Dedicated, tested in Editor (Singleplayer)

Placed Modules:

  • None

Most helpful comment

The problem is the && only if it is turned off THEN it check for 0... else if it is enabled then the 0 check get skipped! Need to be || or am i totaly confused?

All 2 comments

https://github.com/acemod/ACE3/blob/ffaa195fe576625f052eeee04b1af9f3f377434f/addons/overheating/functions/fnc_canSwapBarrel.sqf#L21
getNumber should return 0 though if entry is not present and thus fail that check and exit there.

The problem is the && only if it is turned off THEN it check for 0... else if it is enabled then the 0 check get skipped! Need to be || or am i totaly confused?

Was this page helpful?
0 / 5 - 0 ratings