Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
106d4b7d
Commit
106d4b7d
authored
9 years ago
by
ASL97
Committed by
ShadowNinja
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Cache disable_anticheat and check it for "interacted_too_far"
parent
71180834
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/network/serverpackethandler.cpp
+4
-2
4 additions, 2 deletions
src/network/serverpackethandler.cpp
with
4 additions
and
2 deletions
src/network/serverpackethandler.cpp
+
4
−
2
View file @
106d4b7d
...
...
@@ -1358,7 +1358,9 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
Check that target is reasonably close
(only when digging or placing things)
*/
if
(
action
==
0
||
action
==
2
||
action
==
3
)
{
static
const
bool
enable_anticheat
=
!
g_settings
->
getBool
(
"disable_anticheat"
);
if
((
action
==
0
||
action
==
2
||
action
==
3
)
&&
(
enable_anticheat
&&
!
isSingleplayer
()))
{
float
d
=
player_pos
.
getDistanceFrom
(
pointed_pos_under
);
float
max_d
=
BS
*
14
;
// Just some large enough value
if
(
d
>
max_d
)
{
...
...
@@ -1495,7 +1497,7 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
/* Cheat prevention */
bool
is_valid_dig
=
true
;
if
(
!
isSingleplayer
()
&&
!
g_settings
->
getBool
(
"disable_anticheat"
))
{
if
(
enable_anticheat
&&
!
isSingleplayer
(
))
{
v3s16
nocheat_p
=
playersao
->
getNoCheatDigPos
();
float
nocheat_t
=
playersao
->
getNoCheatDigTime
();
playersao
->
noCheatDigEnd
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment