Skip to content

Commit f3fcd71

Browse files
authored
Merge pull request #2 from TaskForce47/0.2.2
0.2.2
2 parents 27efc57 + 54b7d36 commit f3fcd71

12 files changed

+24
-15
lines changed

addons/main/script_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#define MAJOR 0
22
#define MINOR 2
3-
#define PATCH 1
3+
#define PATCH 2
44
#define BUILD 0

addons/ticketsystem/functions/fn_changeTickets.sqf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ params [
77
["_uid", "", [""]]
88
];
99

10-
if (!isServer) exitWith {
11-
_this remoteExecCall [QFUNC(changeTickets),2];
12-
};
10+
EXEC_ONLY_SERVER;
1311

1412
private _oldTicketCount = GVAR(tickets);
1513

addons/ticketsystem/functions/fn_handleUnitKilled.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
params ["_unit"];
44

5+
EXEC_ONLY_SERVER;
6+
57
private _slotName = str _unit;
68
private _data = GVAR(registeredUnits) getOrDefault [_slotName, []];
79

addons/ticketsystem/functions/fn_handleVehicleKilled.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
params ["_vehicle"];
44

5+
EXEC_ONLY_SERVER;
6+
57
private _objectName = [_vehicle, "tf47_vehicle_"] call BIS_fnc_objectVar;
68
private _data = GVAR(registeredVehicles) getOrDefault [_objectName, []];
79

addons/ticketsystem/functions/fn_loadTicketsFromProfile.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "macros.hpp"
22

3+
EXEC_ONLY_SERVER;
4+
35
private _ticketCount = profileNamespace getVariable [format ["%1_%2", QGVAR(savedTickets), worldName], -1];
46
if (_ticketCount == -1) then {
57
_ticketCount = GVAR(defaultTickets);

addons/ticketsystem/functions/fn_registerUnit.sqf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ params [
66
["_role", "Rifleman", [""]]
77
];
88

9-
if (!isServer) exitWith {
10-
_this remoteExecCall [QFUNC(registerUnit), 2];
11-
};
12-
13-
if (isNull _unit) exitWith {};
14-
if (_cost < 0) then { _cost = _cost * -1; };
9+
EXEC_ONLY_SERVER;
1510

1611
if (_unit isEqualType objNull) then {
12+
if (isNull _unit) exitWith {};
1713
_unit = str _unit;
1814
};
1915

16+
if (_cost < 0) then { _cost = _cost * -1; };
17+
2018
GVAR(registeredUnits) set [_unit, [_unit, _cost, _role]];
2119

2220
true

addons/ticketsystem/functions/fn_registerVehicle.sqf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ params [
55
["_cost", 0, [0]]
66
];
77

8-
if (!isServer) exitWith {
9-
_this remoteExecCall [QFUNC(registerVehicle), 2];
10-
};
8+
EXEC_ONLY_SERVER;
119

1210
if (isNull _vehicle) exitWith {};
1311
if (_cost < 0) then { _cost = abs _cost };

addons/ticketsystem/functions/fn_registerVehicleTicketcost.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ params [
44
["_classnames", [], [[]]]
55
];
66

7+
EXEC_ONLY_SERVER;
8+
79
{
810
_x params ["_classname", "_cost"];
911
GVAR(vehicleTicketCosts) set [_classname, _cost];

addons/ticketsystem/functions/fn_saveTicketsToProfile.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ params [
55
["_resetTickets", false, [true]]
66
];
77

8+
EXEC_ONLY_SERVER;
9+
810
if (_ticketCount <= 0 || _resetTickets) then {
911
_ticketCount = -1;
1012
};

addons/ticketsystem/functions/fn_unregisterVehicle.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ params [
44
["_vehicle", objNull, [objNull]]
55
];
66

7+
EXEC_ONLY_SERVER;
8+
79
if (isNull _vehicle) exitWith { false };
810
if (! (_vehicle getVariable [QGVAR(registered), false])) exitWith { false };
911

0 commit comments

Comments
 (0)