Skip to content

Commit

Permalink
Merge pull request #25 from tuntematonjr/fix-specator-stats
Browse files Browse the repository at this point in the history
Fix specator stats
  • Loading branch information
tuntematonjr authored Dec 1, 2024
2 parents 5859caa + 065f59c commit a5e4dcc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ parameters = [
"-debug",
"-filePatching",
"C:\\Users\\mikal\\Documents\\Arma 3 - Other Profiles\\Tuntematon\\missions\\startmarkers.Enoch\\mission.sqm", # Launch into existing Editor Mission - \\ needed
"-mod=C:\\Users\\mikal\\Documents\\GitHub\\Tun-Respawn-System\\.hemttout\\build",
]

[hemtt.release]
Expand All @@ -55,6 +56,7 @@ parameters = [
"-filePatching",
"-cfg=C:\\Users\\mikal\\Documents\\GitHub\\tun-utilities\\server\\server_basic.cfg",
"-config=C:\\Users\\mikal\\Documents\\GitHub\\tun-utilities\\server\\server_config.cfg",
"-mod=C:\\Users\\mikal\\Documents\\GitHub\\Tun-Respawn-System\\.hemttout\\build",
]

[hemtt.launch.player]
Expand All @@ -75,4 +77,5 @@ parameters = [
"-connect=localHost",
"-port=2302",
"-window",
"-mod=C:\\Users\\mikal\\Documents\\GitHub\\Tun-Respawn-System\\.hemttout\\build",
]
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 4
#define PATCH 4
#define PATCH 5
#define BUILD 1
2 changes: 1 addition & 1 deletion addons/planningmode/functions/fnc_createLine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ params ["_lineStart", "_lineEnd", "_color"];
private _lineDistance = (_lineEnd distance2D _lineStart) / 2;
private _lineDir = _lineStart getDir _lineEnd;
private _lineMiddlePos = _lineStart getPos [_lineDistance, _lineDir];
private _markerLine = createMarkerLocal [format["%%3_%1-%2", _lineStart, _lineEnd, QGVAR(losCheckMarker)], _lineMiddlePos];
private _markerLine = createMarkerLocal [format["%3_%1-%2", _lineStart, _lineEnd, QGVAR(losCheckMarker)], _lineMiddlePos];
_markerLine setMarkerDirLocal _lineDir;
_markerLine setMarkerShapeLocal "RECTANGLE";
_markerLine setMarkerBrushLocal "SolidBorder";
Expand Down
4 changes: 2 additions & 2 deletions addons/planningmode/functions/fnc_planningModeServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ if !(GVAR(isRunning)) then { //Start planning mode
{
private _unit = _x;
private _marker = createMarker [format["%1_%2", QGVAR(playerPosMarker),_unit], position _unit];
_marker setMarkerText name _unit ;
_marker setMarkerType "mil_triangle";
_marker setMarkerTextLocal name _unit ;
_marker setMarkerTypeLocal "mil_triangle";
_marker setMarkerDir direction _unit;
GVAR(playerPositionMarkers) pushBack _marker;
} forEach allPlayers;
Expand Down
13 changes: 5 additions & 8 deletions addons/utilities/functions/fnc_initSpectatorStats.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ private _id = ["ace_spectator_displayLoaded", {
_handle call CBA_fnc_removePerFrameHandler;
};

private _hashWaitTime = tunres_Respawn_nextWaveTimesHash;
private _allowRespawnHash = tunres_Respawn_allowRespawnHash;
private _waitingRespawnListHash = tunres_Respawn_allowRespawnHash;
private _waitingRespawnDelayedListHash = tunres_Respawn_allowRespawnHash;

{
_x params ["_side"];
Expand All @@ -65,12 +62,12 @@ private _id = ["ace_spectator_displayLoaded", {
_ticketCount = str(_hash get _side);
};

private _waitingRespawnCount = count (_waitingRespawnListHash getOrDefault [_side, []]) + count (_waitingRespawnDelayedListHash getOrDefault [_side, []]);
private _allowRespawn = _allowRespawnHash get _side;
private _waitingRespawnCount = ([_side, false] call tunres_Respawn_fnc_getWaitingRespawnCount) + ([_side, true] call tunres_Respawn_fnc_getWaitingRespawnCount);

private _time = "Disabled";
if (_allowRespawn) then {
private _waitTime = _hashWaitTime get _side;
_time = [ceil (_waitTime - cba_missiontime), "MM:SS"] call BIS_fnc_secondsToString;
if (_allowRespawnHash getOrDefault [_side,false]) then {
_time = [_side] call tunres_respawn_fnc_getRemainingTime;
_time = [_time, "M:SS"] call CBA_fnc_formatElapsedTime;
};

_text = format["%2Respawn:%1Tickets: %4%1Next Wave: %3%1Waiting Respawn: %5",endl, _text, _time, _ticketCount, _waitingRespawnCount];
Expand Down
2 changes: 1 addition & 1 deletion debugMultiplayer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rem Sleep for 5 seconds
timeout /t 5 >nul

rem Launch the Arma 3 clients (2 clients)
hemtt launch player -i 2 -Q
hemtt launch player -i 3 -Q

rem sleep for 5 seconds
timeout /t 5 >nul
Expand Down

0 comments on commit a5e4dcc

Please sign in to comment.