Skip to content

Commit 49d7737

Browse files
committed
Added new parameter for stamina
Warning: does not yet work for multiple players and JIPs.
1 parent 27cba2f commit 49d7737

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

source/INIT.sqf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ if (isMultiplayer) then {
2626
// Get the variables from the parameters lobby
2727
_revive_activated = paramsArray select 0; // Revives, true or false
2828
DUWSMP_CP_death_cost = paramsArray select 1;
29+
30+
if(paramsArray select 2 == 0) then {
31+
staminaEnabled = false;
32+
} else { staminaEnabled = true; };
33+
2934
if (support_armory_available) then {
3035
hq_blu1 addaction ["<t color='#ff0066'>Armory (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
3136
{
@@ -152,6 +157,10 @@ if (hasInterface) then {
152157
// init High Command
153158
_handle = [] execVM "dialog\hc_init.sqf";
154159
[] execVM "dialog\startup\weather_client.sqf";
160+
161+
if(!staminaEnabled) then {
162+
player enableStamina false;
163+
};
155164
};
156165

157166
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ class Params {
1212
texts[] = {"1","2","3","4","5","6","7","8","9","10","No penalty"};
1313
default = 1;
1414
};
15+
16+
class Stamina {
17+
title = "Stamina System";
18+
values[] = {1,0};
19+
texts[] = {"On","Off"};
20+
default = true;
21+
};
1522
}

0 commit comments

Comments
 (0)