mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-14 20:22:56 +03:00
Update if (ty @vos)
This commit is contained in:
@@ -230,11 +230,11 @@ spawn_vehicles = {
|
|||||||
|
|
||||||
// vehicle limit reached, remove vehicle from list
|
// vehicle limit reached, remove vehicle from list
|
||||||
// since elements cannot be removed from an array, overwrite it with the last element and cut the last element of (as long as order is not important)
|
// since elements cannot be removed from an array, overwrite it with the last element and cut the last element of (as long as order is not important)
|
||||||
|
_lastIndex = (count AllowedVehiclesList) - 1;
|
||||||
if (_lastIndex != _index) then {
|
if (_lastIndex != _index) then {
|
||||||
_lastIndex = (count AllowedVehiclesList) - 1;
|
|
||||||
AllowedVehiclesList set [_index, AllowedVehiclesList select _lastIndex];
|
AllowedVehiclesList set [_index, AllowedVehiclesList select _lastIndex];
|
||||||
AllowedVehiclesList resize _lastIndex;
|
|
||||||
};
|
};
|
||||||
|
AllowedVehiclesList resize _lastIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count AllowedVehiclesList == 0) then {
|
if (count AllowedVehiclesList == 0) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user