19
19
params [" _vehicle" ];
20
20
TRACE_1(" params" ,_vehicle );
21
21
22
- // TODO: Fix for GM vehicles
23
22
GVAR(wheelSelections) getOrDefaultCall [typeOf _vehicle , {
24
23
// Get the vehicles wheel config
25
24
private _wheels = configOf _vehicle >> " Wheels" ;
@@ -33,6 +32,7 @@ GVAR(wheelSelections) getOrDefaultCall [typeOf _vehicle, {
33
32
34
33
private _wheelHitPoints = [];
35
34
private _wheelHitPointSelections = [];
35
+ private _isGM = 1 == getNumber (configOf _vehicle >> " isgmContent" );
36
36
37
37
{
38
38
private _wheelName = configName _x ;
@@ -54,6 +54,20 @@ GVAR(wheelSelections) getOrDefaultCall [typeOf _vehicle, {
54
54
};
55
55
} forEach _hitPointSelections ;
56
56
57
+ if (_isGM ) then {
58
+ _wheelHitPointSelection = _wheelBone + " _axis" ;
59
+ { // modified Commy's method, they tag "hitpoint_" onto their hitpoints when they have them
60
+ if ((_wheelBoneNameResized ! = " " ) && {_x find _wheelBoneNameResized == 9 }) exitWith { // same as above. Requirement for physx.
61
+ _wheelHitPoint = _hitPoints select _forEachIndex ;
62
+ TRACE_3(" wheel found [GM]" ,_wheelName ,_wheelHitPoint ,_wheelHitPointSelection );
63
+ };
64
+ } forEach _hitPointSelections ;
65
+ if (_wheelHitPoint == " " && _vehicle isKindOf " Car" ) then { // takes longer but a guarantee to find the hitpoint name
66
+ private _class = format [" " " %1" " in getText (_x >> " " visual" " )" ,_wheelName ] configClasses (configOf _vehicle >> " Hitpoints" );
67
+ _wheelHitPoint = toLowerANSI configName (_class #0 );
68
+ TRACE_3(" wheel found [GM Config)]" ,_wheelName ,_wheelHitPoint ,_wheelHitPointSelection );
69
+ };
70
+ };
57
71
58
72
if (_vehicle isKindOf " Car" ) then {
59
73
// Backup method, search for the closest hitpoint to the wheel's center selection pos.
0 commit comments