|
24 | 24 |
|
25 | 25 | #include "macros.hpp"; |
26 | 26 |
|
27 | | -GVAR(officer) = [ |
28 | | - "OPT_NATO_Offizier_T", |
29 | | - "OPT_CSAT_Offizier_T", |
30 | | - "OPT_NATO_Offizier", |
31 | | - "OPT_CSAT_Offizier", |
32 | | - "I_officer_F" |
33 | | -]; |
34 | | - |
35 | | -// default GPS mode: all squad units are visible |
36 | | -// Auf Wunsch der Comm solle alle alle sehen können, Normal Modus ist GVAR(mode) = 1; |
37 | | -GVAR(mode) = 2; |
38 | | - |
39 | | -// GPS mode: all units are visible in mode 2 |
40 | | -if (typeOf player in GVAR(officer)) then |
41 | | -{ |
42 | | - GVAR(mode) = 2; |
| 27 | +//Erfassung der Einheiten beim Start |
43 | 28 |
|
44 | | -}; |
| 29 | +GVAR(unitnumber) = (count units Side player)+10; |
45 | 30 |
|
46 | | -//Erfassung der Einheiten beim Start |
47 | 31 | GVAR(unitsToMark) = []; |
48 | | -GVAR(unitsToMark) = [] call FUNC(selectUnits); |
49 | 32 |
|
50 | 33 | //Marker erstellen für die Spieler |
51 | 34 | GVAR(markerPool) = []; |
52 | 35 |
|
53 | | -for "_i" from 1 to (count GVAR(unitsToMark)) do |
54 | | - { |
55 | | - GVAR(markerPool) pushBack ([PLAYERSIDE, _i] call FUNC(createUnitMarker)); |
56 | | - }; |
| 36 | +for "_i" from 1 to GVAR(unitnumber) do |
| 37 | +{ |
| 38 | + GVAR(markerPool) pushBack ([PLAYERSIDE, _i] call FUNC(createUnitMarker)); |
| 39 | +}; |
57 | 40 |
|
58 | 41 | // create special local player marker |
59 | | -GVAR(markerplayer) = []; |
60 | 42 | GVAR(markerplayer) = [] call FUNC(createPlayerMarker); |
61 | 43 |
|
62 | 44 | // |
63 | 45 | [{ |
64 | | - private _markerplayer = []; |
65 | 46 | private _unitsToMark = []; |
| 47 | + |
| 48 | + { |
| 49 | + if (side _x == playerSide) then |
| 50 | + { |
| 51 | + _unitsToMark pushBack _x; |
66 | 52 |
|
67 | | - //Erneuerung der Spielererfassung |
68 | | - _unitsToMark = [] call FUNC(selectUnits); |
69 | | - |
70 | | - //Vergleich ob mehr Spieler da sind als Marker vonhanden |
71 | | - //bei mehr Spieler als Marker vorhanden sind, neue Marker erstellen |
72 | | - if ((count _unitsToMark) > (count GVAR(unitsToMark))) then |
73 | | - { |
74 | | - private _neuemarker = 0; |
75 | | - _neuemarker = (count _unitsToMark) - (count GVAR(unitsToMark)); |
76 | | - |
77 | | - for "_i" from 1 to (_neuemarker) do |
78 | | - { |
79 | | - GVAR(markerPool) pushBack ([PLAYERSIDE, ((count GVAR(unitsToMark))+_i)] call FUNC(createUnitMarker)); |
80 | | - }; |
81 | | - |
82 | | - GVAR(unitsToMark) = _unitsToMark; |
83 | | - }; |
| 53 | + }; |
| 54 | + } foreach allUnits; |
84 | 55 |
|
85 | 56 | GVAR(markerPool) apply |
86 | 57 | { |
|
0 commit comments