Jump to content
  • 0

In Search of a way to prevent players from glitching through walls using vehicles on Overwatch


DangerRuss

Question

Ok so I run an overwatch server... and currently, people are able to ride a bicycle up to a barracks I added or a castle wall or something, and get off of their bike right next to it which glitches them through the wall. I know epoch managed to fix this by killing the player when they try to do this, but HOW did they do it? I could really use something like this because players are really taking advantage of this exploit. I have a couple fortresses which are rendered useless if the player can glitch in through any wall. Thanks for any help.

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Looking throught the dayz_code.pbo, it seems to be the "player_antiwall.sqf" in the compiles folder.

/*
	DayZ Epoch anti wall
	Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected].
*/
private ["_vehicle","_vehiclePos","_playerPos","_activated","_id","_intersectsWith"];

_activated = false;
_vehicle = _this;

// position usually the drivers head area
_vehiclePos = aimpos _vehicle;

// works best for this type of check on players
_playerPos = visiblePositionASL player;

// ignore if distance is too far
if((_playerPos distance _vehiclePos) > 10) exitWith {};

// Important! without this we looking at the players feet this gets us torso area
_playerPos set [2,(_playerPos select 2)+1];

// Look for any intersecting objects
_intersectsWith = lineIntersectsWith [_playerPos, _vehiclePos, player, _vehicle];
if ((count _intersectsWith) > 0) then {
	{
		// buildings
		if (_x isKindOf "Building" || _x isKindOf "DZE_Housebase") exitWith {
			_activated = true;
		};
		// walls
		if ((typeOf _x) == "" && {["wall_", str _x, false] call fnc_inString}) exitWith {
			_activated = true;
		};
	} count _intersectsWith;
};

if(_activated) then {
	
	// this method is said to be faster than switch, lets try it.
	call {
		if (DZE_AntiWallCounter == DZE_AntiWallLimit) exitWith {
			cutText [(localize "str_epoch_player_9"), "PLAIN DOWN"];
			_id = [player,"crushed"] spawn player_death;
		};
		if ((_vehicle emptyPositions "driver") > 0) exitWith {
			cutText [(localize "STR_EPOCH_ACTIONS_15"), "PLAIN DOWN"];
			player action ["getInDriver", _vehicle];
			DZE_AntiWallCounter = DZE_AntiWallCounter + 1;
		};
		if ((_vehicle emptyPositions "gunner") > 0) exitWith {
			cutText [(localize "STR_EPOCH_ACTIONS_15"), "PLAIN DOWN"];
			player action ["GetInGunner", _vehicle];
			DZE_AntiWallCounter = DZE_AntiWallCounter + 1;
		};
		if ((_vehicle emptyPositions "commander") > 0) exitWith {
			cutText [(localize "STR_EPOCH_ACTIONS_15"), "PLAIN DOWN"];
			player action ["getInCommander", _vehicle];
			DZE_AntiWallCounter = DZE_AntiWallCounter + 1;
		};
		if ((_vehicle emptyPositions "cargo") > 0) exitWith {
			cutText [(localize "STR_EPOCH_ACTIONS_15"), "PLAIN DOWN"];
			player action ["getInCargo", _vehicle];
			DZE_AntiWallCounter = DZE_AntiWallCounter + 1;
		};
		// kill player if none of the above are matched
		cutText [(localize "str_epoch_player_9"), "PLAIN DOWN"];
		_id = [player,"crushed"] spawn player_death;
	};
	
} else {
	DZE_AntiWallCounter = 0;
};

Link to comment
Share on other sites

  • 0

@tesla- how would I get this to work on Overwatch? It seems very specific to epoch.

@storm - I have to disagree with you. They are lucky it just kills them instead of banning them. This is cheating. Killing them would be harsh if it was an accident, but no one glitches through walls on accident. I've watched several players do it and it's very deliberate. I have already banned a couple repeat offenders.

Link to comment
Share on other sites

  • 0

I ended up just putting barriers around whatever I dont want people glitching through.. kind of ghetto but it works.

That's an interesting point, so did you remove tank traps and wire from the array of items that can be removed with a crowbar? Think I may give that a go...

Link to comment
Share on other sites

  • 0

That's an interesting point, so did you remove tank traps and wire from the array of items that can be removed with a crowbar? Think I may give that a go...

I think in overwatch all they need is a toolbox? I forget. But no, I just counted on the general laziness of people. You could always just add barriers in the map editor which aren't removable.

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...