mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix hashmap bug in laser seeker (#8531)
* fix bug in laser * use `hashValue`
This commit is contained in:
parent
e9912a4c33
commit
2dfbaa90b0
@ -95,7 +95,7 @@ private _finalOwner = objNull;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach (GVAR(laserEmitters) select 2); // Go through all values in hash
|
||||
} forEach (values GVAR(laserEmitters)); // Go through all values in hash
|
||||
|
||||
TRACE_2("",count _spots, _spots);
|
||||
|
||||
@ -164,8 +164,8 @@ if ((count _spots) > 0) then {
|
||||
{
|
||||
_x params ["_xPos", "_owner"];
|
||||
_finalPos = _finalPos vectorAdd _xPos;
|
||||
private _count = _ownersHash getOrDefault [_owner, 0];
|
||||
_ownersHash set [_owner, _count + 1];
|
||||
private _count = _ownersHash getOrDefault [hashValue _owner, 0];
|
||||
_ownersHash set [hashValue _owner, _count + 1];
|
||||
} forEach _finalBucket;
|
||||
|
||||
_finalPos = _finalPos vectorMultiply (1 / (count _finalBucket));
|
||||
|
Loading…
Reference in New Issue
Block a user