Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
startpos fix
Browse files Browse the repository at this point in the history
  • Loading branch information
McDiod committed Feb 3, 2017
1 parent 51d755b commit 0fb03cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cfgParams.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Params
title = "Debug Mode";
values[] = {true, false};
texts[] = {"On", "Off"};
default = true;
default = false;
};

class randomteams
Expand Down
4 changes: 2 additions & 2 deletions functions/init/fn_initIsland.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (!isServer) exitWith {};

call compile preprocessFile "islandConfig.sqf";

if (!isServer) exitWith {};

ISLAND_CENTER = (ISLAND_CONFIG select (ISLANDS find worldName)) select 1;
ISLAND_SPAWNSEARCHRADIUS = (ISLAND_CONFIG select (ISLANDS find worldName)) select 2;
ISLAND_USEWHOLE = (ISLAND_CONFIG select (ISLANDS find worldName)) select 5;
Expand Down
6 changes: 3 additions & 3 deletions functions/setup/fn_spawnVehicles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (ARMED_VEHICLES) then {_vehicles = _vehicles + _armedVehicles};
private ["_vehicleAmount","_min","_max", "_spawnPos", "_vehicle", "_spawnedVehicle", "_spawnFound", "_spawnPositions", "_searchCounter", "_tooCloseFound"];
_min = MINMAX_CARS select 0;
_max = MINMAX_CARS select 1;
_vehicleAmount = round ((random _max-_min) + _min);
_vehicleAmount = round ((random (_max-_min)) + _min);
_spawnPositions = [];
_searchCounter = 0;

Expand All @@ -45,8 +45,8 @@ for [{_i = 0},{_i < _vehicleAmount},{_i = _i + 1}] do {

for [{_j=0}, {_j<100}, {_j=_j+1}] do {

_spawnPos = [PLAYAREACENTER,[0,ISLAND_PLAYAREASIZE],[0,360]] call koka_fnc_randomPos;
_road = [_spawnPos,200,[]] call BIS_fnc_nearestRoad;
_spawnPos = [PLAYAREACENTER,[0,ISLAND_PLAYAREASIZE],[0,360],0] call koka_fnc_randomPos;
_road = [_spawnPos,300,[]] call BIS_fnc_nearestRoad;
_spawnPos = if (isNull _road) then {_spawnPos} else {getPos _road};

//are there any other cars too close by?
Expand Down

0 comments on commit 0fb03cd

Please sign in to comment.