Skip to content

Commit

Permalink
pluto now transmit only first hand informations (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparfell committed Nov 23, 2022
1 parent d4b97ae commit f0cbf8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gdc_lib_main/functions/gdc_pluto/fn_plutoAction.sqf
Expand Up @@ -13,7 +13,7 @@
nothing
*/
params ["_side","_groupList","_targetList"];
private ["_unit","_group","_count","_range"];
private ["_unit","_group","_count","_range","_targets"];

// Boucle sur tous les groupes sous le commandement de PLUTO
{
Expand All @@ -31,7 +31,7 @@ private ["_unit","_group","_count","_range"];
_targets = _targetList select {(_unit distance _x) < _range};
// Révéler les cibles ainsi sélectionnées :
{
_group reveal _x;
_group reveal [_x,1.5];
} forEach _targets;
// Si des cibles ont été révélées, générer des actions en fonction des ordres des unités
_targets = _targets select {(_unit knowsAbout _x) >= 1}; // Ne lancer des actions spéciales que si la cible est suffisament connue
Expand Down
6 changes: 3 additions & 3 deletions gdc_lib_main/functions/gdc_pluto/fn_plutoAnalize.sqf
Expand Up @@ -17,7 +17,7 @@ private ["_unit","_veh","_targets","_range"];
if (gdc_plutoDebug) then {
{
deleteMarker _x;
} forEach (allMapMarkers select {(_x find "mk_plutotarget") >= 0});
} forEach (allMapMarkers select {(_x find ("mk_plutotarget_" + (str _side))) >= 0});
};

// Mettre à jour la liste des groupes sous le commandement de PLUTO
Expand All @@ -44,11 +44,11 @@ private _targetList = [];
// Vérifier que la cible n'est pas le HC, qu'elle n'est pas déjà dans la liste, qu'elle n'est pas amie et qu'elle est bien réelle
if ((_target != HC_Slot) && !(_target in _targetList) && (_targetSide != _side) && ((_side getFriend _targetSide) < 0.6) && (_target iskindof "AllVehicles")) then {
// Vérifier que la cible est vivante, que le groupe a suffisament d'infos sur la cible, que la cible n'est pas captive et que ce n'est pas un véhicule vide
if ((alive _target) && ((_unit knowsAbout _target) >= 0.2) && (!captive _target) && ((count (crew _target)) > 0)) then {
if ((alive _target) && ((_unit knowsAbout _target) >= 1.6) && (!captive _target) && ((count (crew _target)) > 0)) then {
_targetList = _targetList + [_target]; // ajouter la cible dans la liste
// DEBUG
if (gdc_plutoDebug) then {
_mk = createMarkerLocal [(format ["mk_plutotarget_%1",_target]),_targetPos];
_mk = createMarkerLocal [(format ["mk_plutotarget_%2_%1",_target,_side]),_targetPos];
_mk setMarkerTypeLocal "mil_dot";
_mk setMarkerColorLocal ("Color" + (str _targetSide));
};
Expand Down

0 comments on commit f0cbf8b

Please sign in to comment.