Jump to content

[Fix]Prevent glitching through metal gates with suvs


StiflersM0M

Recommended Posts

Hey hey,
I wrote a small fix for the glitch here: https://github.com/vbawol/DayZ-Epoch/issues/1576, this will place a indestructible wood wall in the front of the metal gate on server start and will be removed, if you unlock the gate. 
Cause i hate self actions i was not in the state to write a self action for it to turn it on again if the gate is locked, Feel free to make one and post it here :)
 
So lets start, you will need: Custom compiles.sqf, Player_UnlockDoor.sqf, and some edits in the server_monitor.sqf.

 

1.

In your custom compiles.sqf find:

player_unlockDoor =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockDoor.sqf";

And Replace it with your custom path to the player_unlockDoor.sqf in my case:

player_unlockDoor =			compile preprocessFileLineNumbers "custom\player_unlockDoor.sqf";

2.  If you dont have a custom player_unlockDoor.sqf copy it out of the dayz_code folder and paste it in your custom folder or any path you point above.

3. In player_unlockDoor.sqf find:

KeyCodeTry = nil;

And add above this:

if ((typeOf _obj) == "CinderWallDoorLocked_DZ") then {
			_antiglitchvari = _obj getVariable "antiGlitchWall";
			if !(isNil "_antiglitchvari") then {
			deleteVehicle _antiglitchvari;
			_obj setVariable ["antiGlitchWall", Nil, true];
			};
			};

If you are done it should look like this:

http://s14.directupload.net/images/141014/sd5ob7hl.jpg

 

4.  In server_monitor.sqf (usually in your dayz_server.pbo/system/) if you use plot 4 life, it should be in your mission, find this:

if (count _intentory > 0) then { 
//or this if you use plot management: if ((count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ")) then { 

and add above:
 

if ((typeOf _object) == "CinderWallDoorLocked_DZ") then {
			_location = _object getVariable["OEMPos",(getposATL _object)];
			_dir = getDir _object;
			_objectCharacterID 	= _object getVariable ["CharacterID","0"];
			_ownerID = _object getVariable["ownerPUID","0"];
			_objectglitchwall = createVehicle ["WoodSmallWall_DZ", [0,0,0], [], 0, "CAN_COLLIDE"];
			_objectglitchwall setDir _dir;
			_objectglitchwall setPosATL _location;
			_objectglitchwall setVariable ["ownerPUID",_ownerID,true];
			_objectglitchwall addEventHandler ["HandleDamage", {false}];
			_objectglitchwall enableSimulation false;
			_object setVariable ["antiGlitchWall", _objectglitchwall, true];
			};

So it should look like this:

http://s14.directupload.net/images/141014/5hwht7hy.jpg

 

If you dont use Plot 4 life, find in step 4 this lines:


_ownerID = _object getVariable["ownerPUID","0"];
_objectglitchwall setVariable ["ownerPUID",_ownerID,true];

And replace this lines with this:

_ownerID = _object getVariable["CharacterID","0"];
_objectglitchwall setVariable ["CharacterID",_ownerID,true];

That should be all.

 

 

Link to comment
Share on other sites

Will try to do a video and post it here,

but till i did that:

 

From "Markokil321" (github comment)

Just tested, can confirm this is happening with cinder garage doors.

Keep driving backwards at it and eventually the suv will start "sliding" backwards through the door. Do it for long enough and you + vehicle have glitched through. Kinda fucked, lol.

It doesnt matter with which suv you do it, seems to be able with all suvs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...