r-anticheat. or any anticheat

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
I was just joking. My humor tends to very dry.

Terrain.activeTerrain.SampleHeight(vector3 location) returns the Y of the terrain for any Vector3 passed to it. Therefore:

C#:
public int GetGroundDist(Vector3 location)
{
        return Math.Abs(Terrain.activeTerrain.SampleHeight(location) - location.y);
}
Yeah, but that's what I was talking about.

That method gets the player distance to the Terrain distance but what people usually uses is the Player distance to what he has below.

I've been doing lots of testing with Raycast and reached a way to get what a player has below.

---

The problem is that if you stand on a corner, with more than half of your body out, you don't fall but if you raycast on Vector3.down you don't hit the corner, so returns a big distance, like if you were standing still on the air.

I was looking on something to this and still testing going on but seems fine. I'll post results when I finish.

But that's another story.


---

Well what I'm using to get the player distance is something like :

C#:
RaycastHit[] allhits = Physics.RaycastAll(pl.Location, Vector3.down, Mathf.Infinity);

foreach (RaycastHit hit in allhits)
{
     if (!hit.transform.name.StartsWith("Player", StringComparison.Ordinal))
     {
          float hitdist = hit.distance;
          if (hitdist < dist)
          {
                    float floordist = hitdist;
          }
     }
}
So basically, raycasting on the player position, direction down, infinite. Then looping through all the hits and selecting the one that has the lowest distance, ignoring hits which name starts with "Player".

By investigating I've found that you hit your own hitbox, and the hitbox name uses the format :

Code:
"Player" + name + "(" + id + "):player_soldier"

So here you have, my investigation resumed. I'm using this on the server side anti cheat that I've been working these days and seems to work pretty good.
 

Jeffro

Member
Member
Sep 1, 2014
25
3
8
Would be nice if anticheat is going to get released soon. I'm getting tons of hackers and my player base pretty much dropped from 50-60 players on average to 20-25 players on average :( So is the anti speedhack / antifly hack mentioned in this topic worth using. I really need some protection at this point to prevent ppl going to an oxide server again
 

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
Would be nice if anticheat is going to get released soon. I'm getting tons of hackers and my player base pretty much dropped from 50-60 players on average to 20-25 players on average :( So is the anti speedhack / antifly hack mentioned in this topic worth using. I really need some protection at this point to prevent ppl going to an oxide server again
Well I'll release the Beta today I guess. Still needs to be improved but works quite good, I just need to test but I guess you can test it and give feedback.
 

Jeffro

Member
Member
Sep 1, 2014
25
3
8
Would be awesome. I'm trying to convince friends and fellow server admins that Fougerite is better. One thing we all agree on though it's there's a lot less lag then on Oxide :)
 

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
Would be awesome. I'm trying to convince friends and fellow server admins that Fougerite is better. One thing we all agree on though it's there's a lot less lag then on Oxide :)
Finishing the anti-cheat commands right now. I hope it will be up in an hour or so.