Skip to content

Commit 4f2352e

Browse files
committed
Removed cleanup script
Replaced by the vanilla implementation.
1 parent 7e43798 commit 4f2352e

File tree

6 files changed

+51
-235
lines changed

6 files changed

+51
-235
lines changed

source/functions/generic/fn_repetitive_cleanup.sqf

Lines changed: 0 additions & 157 deletions
This file was deleted.

source/functions/initHQ/fn_HQaddactions.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (isServer) then {
99
};
1010

1111
if (!isServer) then {
12-
_hq addaction ["<t color='#00b7ff'>Rest</t>",{[] spawn duws_fnc_savegameClient}, "", 0, true, true, "", "_this == player"];
12+
_hq addaction ["<t color='#00b7ff'>Rest</t>",duws_fnc_savegameClient, "", 0, true, true, "", "_this == player"];
1313
};
1414

1515
_hq addaction ["<t color='#00FFFF'>RESET SQUAD LEADER</t>",{[] call duws_fnc_groupReset}, "", 0, true, true, "", "_this == player"];

source/functions/initMission/fn_clientInit.sqf

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ player allowDamage false;
1111

1212
#include "..\..\includes\supports_init.hpp"
1313
#include "..\..\includes\squad_number_init.hpp"
14-
14+
1515
if (hasInterface) then {[] spawn duws_fnc_gps_marker;};
1616
if (!isMultiplayer) then {
1717
getsize_script = [player] spawn duws_fnc_mapsize;
@@ -42,12 +42,12 @@ if (isMultiplayer) then {
4242
_x addaction ["<t color='#ff0066'>Armory (VA)</t>",{[] call duws_fnc_bisArsenal}, "", 0, true, true, "", "_this == player"];
4343
} forEach (Array_of_FOBS);
4444
};
45-
45+
4646
PlayerKilledEH = player addEventHandler ["killed", {
4747
commandpointsblu1 = commandpointsblu1 - DUWSMP_CP_death_cost;
4848
publicVariable "commandpointsblu1";
4949
}];
50-
50+
5151
PlayerBetrayerEH = player addEventHandler ["HandleRating", {
5252
// If playerRating is negative (traitor) then reset to zero
5353
_playerRating = rating (_this select 0);
@@ -56,9 +56,9 @@ if (isMultiplayer) then {
5656
};
5757
// If final rating is positive, do not modify, else zero.
5858
_rating = _this select 1;
59-
[0,_rating] select ((_playerRating - _rating) > 0);
59+
[0,_rating] select ((_playerRating - _rating) > 0);
6060
}];
61-
61+
6262
"support_specialized_training_available" addPublicVariableEventHandler {lbSetColor [2103, 11, [0, 1, 0, 1]];};
6363
"support_armory_available" addPublicVariableEventHandler {
6464
hq_blu1 addaction ["<t color='#ff0066'>Armory (VA)</t>",{[] call duws_fnc_bisArsenal}, "", 0, true, true, "", "_this == player"];
@@ -81,23 +81,23 @@ if (isMultiplayer) then {
8181
_fobAmount = count Array_of_FOBS;
8282
_fobIndex = _fobAmount - 1;
8383
_createdFOB = Array_of_FOBS select _fobIndex;
84-
84+
8585
[missionNamespace, _createdFOB] call BIS_fnc_addRespawnPosition;
8686
};
87-
87+
8888
if (!isServer) then {
8989
"savegameNumber" addPublicVariableEventHandler {[] spawn duws_fnc_savegameClient};
9090
};
9191
if (!isServer) then {
92-
"capturedZonesNumber" addPublicVariableEventHandler {[] call duws_fnc_persistent_stats_zones_add;}; // change the shown CP for request dialog
92+
"capturedZonesNumber" addPublicVariableEventHandler {[] call duws_fnc_persistent_stats_zones_add;}; // change the shown CP for request dialog
9393
};
9494
if (!isServer) then {
95-
"finishedMissionsNumber" addPublicVariableEventHandler {[] call duws_fnc_persistent_stats_missions_total;}; // change the shown CP for request dialog
96-
};
97-
95+
"finishedMissionsNumber" addPublicVariableEventHandler {[] call duws_fnc_persistent_stats_missions_total;}; // change the shown CP for request dialog
96+
};
97+
9898
player globalChat format ["gamemaster: %1", game_master];
9999
player globalChat format ["HQ_pos_found_generated: %1", HQ_pos_found_generated];
100-
100+
101101
if (!isDedicated && !HQ_pos_found_generated) then { // SERVER INIT
102102
if (((vehiclevarname player) in game_master)) then {
103103
DUWS_host_start = false;
@@ -117,18 +117,18 @@ if (isMultiplayer) then {
117117
if (!isDedicated && !HQ_pos_found_generated) then {
118118
if (((vehiclevarname player) in game_master)) then {
119119
[] spawn duws_fnc_placement;
120-
waitUntil {chosen_hq_placement};
120+
waitUntil {chosen_hq_placement};
121121
player globalChat format ["hq_manually_placed: %1", hq_manually_placed];
122122
player globalChat format ["player_is_choosing_hqpos: %1", player_is_choosing_hqpos];
123123
// create random HQ
124124
if (!hq_manually_placed && !player_is_choosing_hqpos) then {
125125
player globalChat "lance recherche position...";
126126
hq_create = [20, 0.015] spawn duws_fnc_locatorhq;
127-
waitUntil {scriptDone hq_create};
127+
waitUntil {scriptDone hq_create};
128128
};
129129
};
130130
};
131-
131+
132132
/*
133133
//////// DEBUG LOOP /////////////
134134
[] spawn {
@@ -143,37 +143,25 @@ if (!isDedicated && !HQ_pos_found_generated) then {
143143
// AMBIANCE LOOP
144144
//_nul = [] execVM "musicloop.sqf";
145145

146-
if (isServer) then {
147-
// group cleaning script
148-
clean = [
149-
5*60, // seconds to delete dead bodies (0 means don't delete)
150-
5*60, // seconds to delete dead vehicles (0 means don't delete)
151-
0, // seconds to delete immobile vehicles (0 means don't delete)
152-
5*60, // seconds to delete dropped weapons (0 means don't delete)
153-
0, // seconds to deleted planted explosives (0 means don't delete)
154-
10*60 // seconds to delete dropped smokes/chemlights (0 means don't delete)
155-
] spawn duws_fnc_repetitive_cleanup;
156-
};
157-
158-
if (hasInterface) then {
146+
if (hasInterface) then {
159147
// WHEN CLIENT CONNECTS INIT (might need sleep)
160148
waitUntil {isPlayer Player};
161-
hintsilent "Waiting for the host to find an HQ...";
149+
hintsilent "Waiting for the host to find an HQ...";
162150
waitUntil {HQ_pos_found_generated && time > 0.1};
163151
player setpos [(getpos hq_blu1 select 0),(getpos hq_blu1 select 1)+10];
164152
_drawicon = [] spawn duws_fnc_drawIcon;
165-
hintsilent "Waiting for the host to select the campaign parameters...";
166-
waitUntil {chosen_settings};
153+
hintsilent "Waiting for the host to select the campaign parameters...";
154+
waitUntil {chosen_settings};
167155
[hq_blu1] call duws_fnc_HQaddactions;
168156
sleep 1;
169-
player setdamage 0;
157+
player setdamage 0;
170158
player allowDamage true;
171159
hintsilent format["Joined game, welcome to %1, %2",worldName,profileName];
172160

173161
// init High Command
174162
[] call duws_fnc_hc_init;
175163
[] spawn duws_fnc_weather_client;
176-
164+
177165
// process purchasable units
178166
[] call duws_fnc_processUnitConfig;
179167
[] call duws_fnc_processVehicleConfig;
@@ -189,7 +177,7 @@ if (!isMultiplayer) then {
189177
};
190178

191179
// Create help for DUWS
192-
_index = player createDiarySubject ["help","DUWS-R Manual"];
180+
_index = player createDiarySubject ["help","DUWS-R Manual"];
193181
player createDiaryRecord ["help", ["Feedback/bug report", "Internal team members: Use the ""issues"" section to report items."]];
194182
player createDiaryRecord ["help", ["Export to another island", "<font color='#FF0000'>How to export to another island:</font color><br />You just need to take the .pbo file and rename it with the name of the island you want to export the mission to. You don't have anything else to do<br /><br />Example:<br />SP_DUWS-R.stratis.pbo >>> SP_DUWS-R.chernarus.pbo"]];
195183
player createDiaryRecord ["help", ["Credits", "Many thanks goes out to everyone that worked on the original DUWS by kibot!"]];
@@ -259,7 +247,7 @@ if (mission_DUWS_firstlaunch) then {
259247
sleep 20;
260248
["info",["DUWS Manual","Check the manual in the briefing for more info"]] call bis_fnc_showNotification;
261249

262-
profileNamespace setVariable ["profile_DUWS_firstlaunch", false];
250+
profileNamespace setVariable ["profile_DUWS_firstlaunch", false];
263251
saveProfileNamespace;
264252
};
265253

@@ -279,8 +267,8 @@ _dynam = [player,"DynamicSupportMenu"] call BIS_fnc_addCommMenuItem;
279267
//Loading player position and gear.
280268
//TODO: Add bought supports.
281269
/*
282-
if(isServer) then
283-
{
270+
if(isServer) then
271+
{
284272
execVM "persistent\missionSpecific\saveFuncs.sqf";
285273
waitUntil {!isNil "saveFuncsLoaded"};
286274

0 commit comments

Comments
 (0)