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

AI sometimes do not react when loaded in vehicles VCOM MOD 3.3.3 steam version #150

Open
Explodie opened this issue Sep 13, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@Explodie
Copy link

Explodie commented Sep 13, 2019

Describe the bug
I have found that fairly frequently AI just sit around waiting to die instead of disembarking a vehicle under fire. Noted at same time in the logs is this:

22:12:17 Error in expression <_ClstEmy;
private _DisembarkLocation1 = getPosWorld _nearestFriend;

if (_Disemb>
22:12:17 Error position: <getPosWorld _nearestFriend;

if (_Disemb>
22:12:17 Error getposworld: Type Array, expected Object
22:12:17 File \vcomai\Vcom\Functions\VCM_Functions\fn_VehicleMove.sqf [VCM_fnc..., line 34

To Reproduce
Almost every time you attack a vehicle loaded with AI - can shoot them they sit calm in the vehicle waiting to die.

Expected behavior
AI should react to being under fire, and if vehicle is stationary they should disembark.

VCOM Version:

  • Branch: Master
  • Version 3.3.3 (Steam MOD version)

Additional mods used:

  • CBA_A3 (v3.12.2.190909)
  • Exile 1.04
  • A3XAI 0.2.1

POSSIBLY FIXED

in fn_VehicleMove.sqf

find:
private _DisembarkLocation1 = getPosWorld _nearestFriend;

replace with:

	private _allZeros = [0,0,0];
	if (_nearestFriend isEqualTo _allZeros) exitWith {};
	
	private _DisembarkLocation1 = getPosWorld _nearestFriend;

This has stopped the error from appearing in my log files and fixed the behavior of the AI. I believe the change I've made was the original intention of the code, it's just that the getPosWorld in fn_VehicleMove.sqf did not like being fed an array (ie _rtrn = [0,0,0]) as populated in VCM_fnc_ClstEmy if there's nobody near.

PS: if this is already fixed in DEV then my bad... if not then I hope this helps!

@Explodie Explodie added the bug Something isn't working label Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant