Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////
- // Author: Veshai / netripper
- //////////////////////////
- // Metal bridges on Panthera are bugged. Only some vehicles can drive over them.
- // You cannot walk over them and a lot of other vehicles are bugged.
- //
- // This script searches the area of the given location for objects with a diameter
- // of 39 meters and assumes those are the original bridge objects. It then places
- // a properly working bridge on top of each of those objects.
- // Map objects are classless, hence the check using diameter.
- //
- // Might not result in the prettiest look, but it works and saves a lot of adminwork.
- //////////////////////////
- if (!isServer) exitWith {};
- fnc_pantheraBridgeFix = {
- private ["_box", "_diameter", "_pos", "_newpos", "_obj", "_up"];
- diag_log format["fnc_pantheraBridgeFix - Fixing bridge at %1", _this];
- _up = false;
- {
- if (typeOf _x == "") then {
- _box = boundingBox _x;
- _diameter = round ((_box select 0) distance (_box select 1));
- diag_log format["fnc_pantheraBridgeFix - Object with diameter of %1 meters", _diameter];
- if (_diameter == 39) then {
- diag_log format["fnc_pantheraBridgeFix - Found bridge at %1, direction: %2, up: %3", getposatl _x, direction _x, _up];
- _pos = getPosATL _x;
- if (_up) then {
- _newpos = [_pos select 0, _pos select 1, (_pos select 2) - 0.2 + 0.01];
- } else {
- _newpos = [_pos select 0, _pos select 1, (_pos select 2) - 0.2];
- };
- _obj = createVehicle ["MAP_bridge_asf1_25", _newpos, [], 0, "CAN_COLLIDE"];
- _obj setVectorUp [0,0,1];
- _obj setDir (getDir _x);
- _obj setPosATL _newpos;
- _up = !_up;
- //_x setDamage 1;
- };
- };
- true;
- } count nearestObjects[_this select 0, [], _this select 1];
- };
- // Fixing panthera bridges
- //[position of original bridge, search distance]
- [[4724.19, 2152.75, 3.1], 40] call fnc_pantheraBridgeFix;
- [[4467.81, 2592.61, 7.5], 40] call fnc_pantheraBridgeFix;
- [[3343.18, 3394.55, 7.3], 40] call fnc_pantheraBridgeFix;
- [[8105.18, 4936.79, 6.7], 40] call fnc_pantheraBridgeFix;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement