Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refuel - Fix infinite recursion for getCapacity on a non-CfgVehicle #9622

Merged
merged 2 commits into from
Nov 4, 2023

Conversation

PabstMirror
Copy link
Contributor

Fix #9620
handle weird edge case when trying to run on "camera"/CfgNonAIVehicles which won't support setVariable and will inf-loop

getCapacity calls setFuel
setFuel calls getCapacity
normally works fine but some objects don't support setVariable and cause infinity loop
e.g. "camera" camCreate (getpos player)

I took out the warning because it was just getting spammed by the mod but I could leave it in

[ACE] (refuel) WARNING: trying to getCapacity from non-CfgVehicle [164071: honeybee.p3d]
[ACE] (refuel) WARNING: trying to getCapacity from non-CfgVehicle [164077: cl_leaf3.p3d]
[ACE] (refuel) WARNING: trying to getCapacity from non-CfgVehicle [82674: t_ficusb1s_f.p3d]

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Nov 4, 2023
@PabstMirror PabstMirror added this to the 3.16.2 milestone Nov 4, 2023
@LinkIsGrim
Copy link
Contributor

I'd leave the warning

@LinkIsGrim LinkIsGrim merged commit 2c5ef6a into master Nov 4, 2023
5 checks passed
@jonpas jonpas deleted the fuelFromBees branch November 4, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression - ace_refuel_fnc_getFuel infinite loop
2 participants