Skip to content

Commit

Permalink
close #8 grad-replay
Browse files Browse the repository at this point in the history
  • Loading branch information
McDiod committed Nov 20, 2018
1 parent afe7823 commit 3491f58
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions functions/endings/fn_endMissionClient.sqf
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
#include "component.hpp"

_this spawn {
params ["_configName","_winText","_winners","_winTextParams"];
private ["_winText","_winners","_winTextParams"];
params [["_winners",[]]];

if (isNil "_winText") then {
_winText = [missionConfigFile >> "CfgWinConditions" >> _configName,"winText",""] call BIS_fnc_returnConfigEntry;
};
if (isNil "_winners") then {
_winners = ([missionConfigFile >> "CfgWinConditions" >> _configName,"winners",[]] call BIS_fnc_returnConfigEntry) apply {call compile _x};
};
private _winTextParams = ([missionConfigFile >> "CfgWinConditions" >> _configName,"winTextParams",[]] call BIS_fnc_returnConfigEntry) apply {call compile _x};

_winText = "<img size= '6' style='vertical-align:middle' shadow='false' image='data\gruppe-adler.paa'/><br/><t size='.9' color='#FFFFFF'>" + _winText + "</t>";

_text = format ([_winText] + _winTextParams);
[_text,0,0,4,2] spawn BIS_fnc_dynamicText;

INFO_3("%1 %2 %3",_winText,_text,_winners);

sleep 5;

if (({[_x] call grad_points_fnc_getPoints > 0} count [WEST,EAST,INDEPENDENT,CIVILIAN]) > 0) then {
[] call grad_points_fnc_displayPoints;
sleep 16;
};

["end1",playerSide in _winners,true,true,true] spawn BIS_fnc_endMission;
};
waitUntil {missionNamespace getVariable ["REPLAY_FINISHED",false]};
["end1",playerSide in _winners,true,true,true] spawn BIS_fnc_endMission;

0 comments on commit 3491f58

Please sign in to comment.