Jump to content

Anti Glitch


Brunz

Recommended Posts

Hi,
 
One of the major problems and complaints from players in epoch is people glitching into bases or through walls using various methods.
 
I started with the epoch EPOCH_KeyDown.sqf as a basis and put in only what was needed for my purpose.
 
I thought that i had it all working beautifully but then when i tested with non admin players the Anti Hack software was picking it up and causing problems.
 
1. Infistar completely removed the event handler from what i can gather.
2. When using the Skaronator ( EPOCH builtin ) antihack i was getting autobanned almost straight away.
 
I need help from the community to try to get this to work with both Antihacks as ive exhausted my limited skills, i believe this may help to improve the glitching situation for all players.
 
The code all lives in the mission currently.

init.sqf

AntiGlitch_KeyDown = compile preprocessFile "scripts\antiglitch\fnc_AntiGlitch_KeyDown.sqf";   
[] spawn {
   waitUntil{!isNull (findDisplay 46)};
	AntiGlitch_Delay = diag_tickTime;
   (findDisplay 46) displayAddEventHandler ["KeyDown","_this call AntiGlitch_KeyDown"];
};

scripts\antiglitch\fnc_AntiGlitch_KeyDown.sqf

private["_dikCode", "_handled"];
_dikCode = _this select 1;
_shift = _this select 2;
_ctrl = _this select 3;
_alt = _this select 4;
_handled = false;

/*
	File: fnc_AntiGlitch_KeyDown.sqf
	Author: Brun
	Basis: @Epoch\Addons\a3_epoch_code\compile\interface_event_handlers\EPOCH_KeyDown.sq
	Description: Anti Glitch
*/

if !(alive player) exitWith{ false };

//Define Actions which can be used to glitch
_actionKeys = (actionKeys 'GetOver') + (actionKeys 'moveDown') + (actionKeys 'Prone') + (actionKeys 'moveFastForward') + (actionKeys 'moveForward');
 
if (_dikCode in _actionKeys) then{	
	
	//No Poking head through walls
	if ((_dikCode in(actionKeys "moveFastForward") || (_shift && _dikCode in(actionKeys "moveForward")) ) && (diag_tickTime - AntiGlitch_Delay) > 30) then {
	    AntiGlitch_Delay = diag_tickTime;	
        if ((count (player nearObjects ["Const_All_Walls_F", 3])) > 0) then{	
		hint "Anti Glitch Activated";
		_handled = true;
		};
	};	
	
	
	//No Superman Prone near Epoch Buildables
	if (_dikCode in((actionKeys "moveDown") + (actionKeys "Prone")) && speed player > 0) then{	
		_buildcount = count (player nearObjects ["Const_All_Walls_F", 5]);
		if (_buildcount > 0) then{
		hint "Prone Anti Glitch Activated";
		_handled = true;
		};
	};
		
	//Vault
	if (!_ctrl && _dikCode in(actionKeys "GetOver")) then{
		
		if ((count (player nearObjects ["Const_All_Walls_F", 30])) == 0) then{	
		
			if (isTouchingGround player && (vehicle player == player) && speed player > 10) then{
								
				if ((primaryWeapon player != "") && (currentWeapon player == primaryWeapon player)) then{
					
					player switchMove "AovrPercMrunSrasWrflDf";
					EPOCH_switchMove_PVS = [player, 1, Epoch_personalToken];
					publicVariableServer "EPOCH_switchMove_PVS";
					_handled = true;
				} else {
					if (currentWeapon player == "") then{					
						player switchMove "epoch_unarmed_jump";
						EPOCH_switchMove_PVS = [player, 2, Epoch_personalToken];
						publicVariableServer "EPOCH_switchMove_PVS";
						_handled = true;
					};
				};
				
			} else {_handled = false;};
		} else {
		hint "Vault Anti Glitch Activated";
		_handled = true;};		
	};
	
};

_handled

Link to comment
Share on other sites

Hey,

 

Reading through this it looks very good and detailed actually however infiSTAR itself has an anti-glitch function built in that logs, punishes and kicks players that attempt glitching. If you are running infiSTAR then I would suggest taking a look over that as it runs well for me, makes glitching through walls impossible as far as I've seen.

Link to comment
Share on other sites

Hey,

 

Reading through this it looks very good and detailed actually however infiSTAR itself has an anti-glitch function built in that logs, punishes and kicks players that attempt glitching. If you are running infiSTAR then I would suggest taking a look over that as it runs well for me, makes glitching through walls impossible as far as I've seen.

 

The infistar anti glitch just references to the epoch get out of vehicles anti glitch, from i have seen and tested it doesn't do what i am trying to do which is restrict vaulting and proning and excessive running next to epoch buildables,

 

edit: looks like the new version has some antiglitch, will take a look

Link to comment
Share on other sites

The infistar anti glitch just references to the epoch get out of vehicles anti glitch, from i have seen and tested it doesn't do what i am trying to do which is restrict vaulting and proning and excessive running next to epoch buildables,

 

edit: looks like the new version has some antiglitch, will take a look

 

Then you have either a very old version of it or you did not look in the right place, it currently has the only real anti glitch system that works (unlike the epoch default one). Best thing however would be if the girl who makes the models for Epochmod would make proper models, right? :)

Link to comment
Share on other sites

  • 4 months later...

Um....thanks for including the date.......

And after a few weeks I'm really surprised the devs are still allowing all those competing mod signatures...w I te odd since they banned someone for just having a Chernarus Epoch server in their sig back in November last year....when they were adamant about no Chernarus :)

Link to comment
Share on other sites

since we are posting on a 5 month old post, 

Brunz, you can now add your keydown function to our EAH config via security_checks.h found in the a3_epoch_server_settings.pbo to allow your custom function. 

class displayAddEventHandler {
        keyDown = "if (_this call EPOCH_KeyDown) then {true} else {_this call AntiGlitch_KeyDown}"
        keyUp   = "";
};

Also see this post for more information:

Link to comment
Share on other sites

glitching is still working.

 

you can still glitch with prone and with holster.

 

im still able to keep running against a door and then pushing prone several times to get through the door.

i also can run against a door and then press holster.

 

 

i think this script need some improvement ,-(

Link to comment
Share on other sites

yep i know. its working with some parts. by example im not able to press V or barrell-roll if im next to a wall/door-

and its showing the messages : anti glitch, anti prone, ..

 

 

BUT. im still able to press PRONE next to walls..if i keep pressing the fastforward keys and press PRONE continuesly. then it will break through the anti glitch and then im through the door. 

 

what i have to modify so that its not possible anymore to PRONE if im near a wall/door ???? 

 

i think if the scrtipt would deactivate the prone+holster key next to walls (5m) , then the glitching will be ALMOST done. 

 

can someone give me a hint how i get rid of the glitching shit ?! 

Link to comment
Share on other sites

how would it be possible to play if you could not go prone next to a wall? Or even draw a gun? There were many occasions where I am in a tiny house surrounded by enemies and I lay down on the ground to avoid bullets coming through walls. Disabling key game mechanics is not a fix. Just like amputating a leg isn't a fix if you accidentally hurt your toe into coffee table.

Link to comment
Share on other sites

The simple solution to the issue is to put Tank Traps and Wire fences into the mod so they can be placed beside an object.

 

This will stop players from getting to the object to glitch/pass through it.

 

 

I must of mentioned this 4 times now.

 

 

 

 

I don't think they can fully fix this issue.. It's built into the game mechanics.. Next time you get into a vehicle/chopper notice you DO NOT open the door.. you pass through it.

Link to comment
Share on other sites

doesnt matter if im allowed to go prone in my own base near walls or not.

but i think it would give the game a HUGH plus if nobody can go prone next(1m) to epoch Walls/doors.

 

 

SO. anybody has the knowledge to modify it, so prone is blocked next to walls?

Link to comment
Share on other sites

add this right before the line //No Superman Prone near Epoch Buildables

	//No Prone near Epoch Buildables
	if (_dikCode in(actionKeys "Prone") then{	
		_buildcount = count (player nearObjects ["Const_All_Walls_F", 2]);
		if (_buildcount > 0) then{
		hint "No Prone Next to Walls! Anti Glitch Activated!";
		_handled = true;
		};
	};

That should work fine. have limited it to within 2m of the wall.

Link to comment
Share on other sites

add this right before the line //No Superman Prone near Epoch Buildables

	//No Prone near Epoch Buildables
	if (_dikCode in(actionKeys "Prone")) then{	
		_buildcount = count (player nearObjects ["Const_All_Walls_F", 2]);
		if (_buildcount > 0) then{
		hint "No Prone Next to Walls! Anti Glitch Activated!";
		_handled = true;
		};
	};

That should work fine. have limited it to within 2m of the wall.

 

 

NOPE. not really. same useless like superman prone and the movedown antiglitch

maybe i should add after HINT :

player setUnitPos "UP";

player forcewalk true;

player setspeed 1;

 

then if antiglitch is activated the player is standing up+moving slowly ?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...