Skip to content

Commit c10c8f2

Browse files
committed
Merge branch 'development-feature-AdditionalParameters' into development
2 parents d71ddd3 + 1fc605d commit c10c8f2

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

source/INIT.sqf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ if (!isMultiplayer) then {
2424
if (isMultiplayer) then {
2525

2626
// Get the variables from the parameters lobby
27-
_revive_activated = paramsArray select 0; // Revives, true or false
28-
DUWSMP_CP_death_cost = paramsArray select 1;
27+
_revive_activated = ["Revive", 1] call BIS_fnc_getParamValue;
28+
DUWSMP_CP_death_cost = ["DeathPenalty", 1] call BIS_fnc_getParamValue;
29+
staminaEnabled = ["Stamina", 0] call BIS_fnc_getParamValue;
30+
31+
if(staminaEnabled == 0) then {
32+
staminaEnabled = false;
33+
} else {
34+
staminaEnabled = true;
35+
};
36+
2937
if (support_armory_available) then {
3038
hq_blu1 addaction ["<t color='#ff0066'>Armory (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
3139
{
@@ -152,6 +160,10 @@ if (hasInterface) then {
152160
// init High Command
153161
_handle = [] execVM "dialog\hc_init.sqf";
154162
[] execVM "dialog\startup\weather_client.sqf";
163+
164+
if(!staminaEnabled) then {
165+
player enableStamina false;
166+
};
155167
};
156168

157169
if (!isMultiplayer) then {

source/duws_revive/respawnClicked.sqf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ DUWS_player_injured = false;
66
player setpos [getpos hq_blu1 select 0, (getpos hq_blu1 select 1)+10];
77
player allowdamage true;
88

9-
closedialog 0;
9+
if(!staminaEnabled) then {
10+
player enableStamina false;
11+
};
1012

13+
closedialog 0;

source/params.hpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ class Params {
66
default = true;
77
};
88

9-
class DeatPenalty {
9+
class DeathPenalty {
1010
title = "CP death penalty";
1111
values[] = {1,2,3,4,5,6,7,8,9,10,0};
1212
texts[] = {"1","2","3","4","5","6","7","8","9","10","No penalty"};
1313
default = 1;
1414
};
15-
}
15+
16+
class Stamina {
17+
title = "Stamina System";
18+
values[] = {1,0};
19+
texts[] = {"On","Off"};
20+
default = 1;
21+
};
22+
}

0 commit comments

Comments
 (0)