Cuberite Forum
AntiCheat - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: AntiCheat (/thread-1373.html)

Pages: 1 2 3


RE: AntiCheat - worktycho - 03-02-2014

Use Vector.Length.


RE: AntiCheat - daniel0916 - 03-09-2014

My AntiCheat Source can't compiled on Linux.

Error:
Code:
Entities/libEntities.a(Player.cpp.o): In function `cPlayer::TossHeldItem(char)':
Player.cpp:(.text+0x45d4): Undefined reference to `cFastDropChecker::Check(cPlayer&)'
Entities/libEntities.a(Player.cpp.o): In function `cPlayer::TossEquippedItem(char)':
Player.cpp:(.text+0x48f8): Undefined reference to `cFastDropChecker::Check(cPlayer&)'

Code: https://github.com/daniel0916/MCServer/tree/AntiCheat


RE: AntiCheat - bearbin - 03-09-2014

Looks like cFastDropChecker isn't included?


RE: AntiCheat - daniel0916 - 03-09-2014

But it is included.

#include "../AntiCheat/FastDropChecker.h"



RE: AntiCheat - bearbin - 03-09-2014

Is it added to the cmakelists.txt? (AFAIK that's where you need to add it, but ask tycho).


RE: AntiCheat - worktycho - 03-09-2014

Youve got a glob so it should be included. Have you tried rerunning cmake?


RE: AntiCheat - daniel0916 - 03-09-2014

(03-09-2014, 04:41 AM)worktycho Wrote: Youve got a glob so it should be included. Have you tried rerunning cmake?

What do you mean with rerun?
I'm using:
Code:
cmake -DCMAKE_BUILD_TYPE=RELEASE .. && make
from the COMPILING file.
Should i redownload the code and then try to compile it?

Edit: Redownload and compile make the same error.


RE: AntiCheat - bearbin - 03-09-2014

It's a new folder, would that still be included in the glob?


RE: AntiCheat - worktycho - 03-09-2014

I can't see anything wrong. Might need to have a play with it tomorrow.

@bearbin He's added his folder to the folders list and added a CMakelist to the directory so it should all be set up.

Got It now. The problem is that you haven't added a library dependency between AntiCheat and Entities. I set the system up to compile each folder as a library to reduce link times. And Entities is being linked before anticheat so its missing relocations. To fix this you need to move AntiCheat before Entities in the folders list then add
Code:
target_link_libraries(Entities AntiCheat)
to the end of Entities.


RE: AntiCheat - daniel0916 - 03-09-2014

Thanks for your help Smile. Now it's working.
https://github.com/daniel0916/MCServer/commit/9df8150ba09d66cefcdabef89d5aa8761d9107ca