[Mod] Anticheat for subgame server [fairplay]

Post Reply
User avatar
TalkLounge
Member
Posts: 324
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

[Mod] Anticheat for subgame server [fairplay]

by TalkLounge » Post

What's that?
Fairplay adds anticheat to server. Extends the default anticheat, because that doesn't detect all types of cheats. Programmed by Arclemi & me for our subgame servers

Includes
Range
Ignore action, if the player try to interact with a higher range than default when:
  • punching a player
  • digging a node
  • placing a node
Placing in air
Ignore action, if the player try to place a block while pointing at air

Interact through block
Ignore action, if the player try to interact trough block(line of sight) when:
  • punching a player
  • digging a node
Fly
Kick player, if the player try to fly without privilege

Noclip
Kick player, if the player try to fly through blocks without privilege

Dependencies
None

Download
Download
Browse on Github

License
CC BY-NC 3.0

Changelog
31.05.2018: Released.
Last edited by TalkLounge on Sat Jun 29, 2019 14:05, edited 2 times in total.
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod] Anticheat for subgame server [fairplay]

by GreenXenith » Post

I looked at your code for the fly detection, it seems it has no way to detect if a player is just falling from a large height.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
TalkLounge
Member
Posts: 324
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

Re: [Mod] Anticheat for subgame server [fairplay]

by TalkLounge » Post

I looked at your code for the fly detection, it seems it has no way to detect if a player is just falling from a large height.
Of course there is a detection for falling in line 99:

Code: Select all

posbevor.y > pos.y + 1
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

User avatar
Lejo
Member
Posts: 718
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [Mod] Anticheat for subgame server [fairplay]

by Lejo » Post

Very Nice!
Also the idea of the Look Direction check!

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Anticheat for subgame server [fairplay]

by Krock » Post

TalkLounge wrote:Look direction
You must look in the direction where you
  • punch a player
  • dig a node
  • place a node
I can confirm that the fly cheat prevention once worked nicely when jumping down from regular solid nodes through air. What happens in combination with climbing up on ladders or in water?
Also this pointing direction anticheat seems to work fine - as long you're using a mouse or joystick. As soon you play on a touchscreen (Android players), this detection needs to check the entire viewing range of the player, since the players can dig any node or punch any object which is on their screen.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
TalkLounge
Member
Posts: 324
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

Re: [Mod] Anticheat for subgame server [fairplay]

by TalkLounge » Post

I can confirm that the fly cheat prevention once worked nicely when jumping down from regular solid nodes through air. What happens in combination with climbing up on ladders or in water?
#minetest.find_nodes_in_area({x = pos.x - 2, y = pos.y - 2, z = pos.z - 2}, {x = pos.x + 2, y = pos.y, z = pos.z + 2}, {"air"}) == 75
As soon you play on a touchscreen (Android players), this detection needs to check the entire viewing range of the player, since the players can dig any node or punch any object which is on their screen.
:(
Any ideas?
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Anticheat for subgame server [fairplay]

by Krock » Post

TalkLounge wrote:Any ideas?
Yes.
1) Detect whether the player can point at the node using minetest.raycast(player_eye_pos, place_node_pos, true, false) and get the pointed thing like this: (code from here, myself)

Code: Select all

	local raycast = core.raycast(player_eye_pos, place_node_pos, true, false)
	local pointed = raycast:next()
	-- Skip the player selection box
	if pointed and pointed.type == "object"
			and pointed.ref == player then
		pointed = raycast:next()
	end
	return pointed -- pointed (pointed_thing) must be at node_pos
2) Check where the node is placed to (when place_node is buildable_to: below, else pointed.above) and use vector.distance to get the actual distance to the node. Compare it with the wielded tool.
3) Decide yourself for a maximal fov value which you accept to use by players. Use the X and Z coordinates only (unless you want to make use of the player look pitch) to calculate the angle from the player to the node, subtract the view angle from the result and check whether its absolute value is within the half of your maximal fov value.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Lejo
Member
Posts: 718
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [Mod] Anticheat for subgame server [fairplay]

by Lejo » Post

Github PR
Macht speed/jump physics support und chekt nicht wenn du fast hast.

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Anticheat for subgame server [fairplay]

by LMD » Post

Also man kann auch bei fast checken indem man das dann in Verhältnis zu get_player_physics setzt...
My stuff: Projects - Mods - Website

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests