Commit Graph

2351 Commits

Author SHA1 Message Date
asofold
70ce2086ab Let target switching only count with significant yaw changes. 2015-05-31 20:35:08 +02:00
asofold
35a9171934 Correct javadocs. 2015-05-31 19:56:38 +02:00
asofold
40b919935f Disable conflicting velocity invalidation.
This leads to trouble with high jumps, e.g. with slimes. Halfing the
freedom after counter runs out has to do for the moment.
2015-05-31 00:58:34 +02:00
asofold
c9468cd861 Log tags, if updated after violation handling. 2015-05-30 23:53:58 +02:00
asofold
cb62547fc0 More complete go on speed attributes.
* Undo the sprint boost modifier until we add it (minimize code change).
* Implement methods for MCAccess implementations down to 1_6_R1.
2015-05-30 02:22:49 +02:00
asofold
2450636f3c [BLEEDING] First go on generic speed attribute support. 2015-05-29 00:33:16 +02:00
asofold
a259f90d66 Prepare more on friction: Split off setNextFriction, distinguish h/v.
Vertical velocity handling can be much simplified (and possibly extended
to including downwards velocity) with using a friction-based modeling.
Absolute envelopes can still be checked extra, where appropriate.
2015-05-28 23:39:15 +02:00
asofold
9a79b85599 [BLEEDING] Allow friction based horizontal speed-decrease in water.
Still uses a little bit of the buffer, but much less. In essence this
allows rather more h-speed than before, based on friction.
2015-05-27 01:00:43 +02:00
asofold
9aa315360b Adjust friction factor for bunny hopping decrease to match air (@Iceee). 2015-05-26 23:22:44 +02:00
asofold
cf9f119f67 Fix compat not loading for latest spigot versions. 2015-05-26 03:13:03 +02:00
asofold
83660b0c2b Don't use lower-case naming for the _R part in packages. 2015-05-25 21:24:44 +02:00
asofold
ddf4c305a1 y ~ pain. 2015-05-25 08:51:14 +02:00
asofold
d6ec0c332a [BLIND] Attempt to fix double-jump issues. 2015-05-24 22:13:06 +02:00
asofold
3cf6943efb [BLIND] Add compat module for Spigot/CB 1.8.4 (1_8_R3). 2015-05-24 16:07:50 +02:00
asofold
888f1cbaa8 Dedicated compat module for Spigot/CB 1.8.3 (1_8_R2). 2015-05-24 15:29:12 +02:00
asofold
806b31ec4f Include the _R... part for naming compat modules. 2015-05-24 14:56:45 +02:00
asofold
2d74443a7b Merge pull request #35 from Iceee/master
Fix false positives when blocking or sneaking in the air
2015-04-20 01:26:38 +02:00
Iceee
805fafbe4e Require from to be on the ground before we slow movement speed for sneaking or blocking 2015-04-19 15:29:22 -05:00
asofold
7ae63211c2 Reset bunny if low jumping is legit (experiment for 2-high places). 2015-04-12 01:41:19 +02:00
asofold
393787e2e3 Fix logic of velocityTick as suggested by @Iceee. 2015-04-11 01:18:50 +02:00
asofold
aa147f692b Add framework for (debug-) logging map parts with ray-tracing / cuboids.
Not very efficient in terms of code-output, but enabling us to log test
cases for visible (and potentially passable too), using real-life
examples.
* Add the capability to log a FakeBlockCache as java code.
* Add utility to record map parts (cuboid, ray-tracing with margin) to a
FakeBlockCache.

Missing:
* Actually log stuff (visible).
2015-04-11 00:57:33 +02:00
asofold
9e7736963f Use TrigUtil for coordinate comparison. 2015-04-07 23:07:57 +02:00
asofold
5b27f62223 Move DebugUtil to a debug package inside of the logging package. 2015-04-07 23:02:12 +02:00
asofold
1510f01144 [BLEEDING] Fixes and refactoring for vertical velocity handling.
This is not the thing (lots of yet), but it is a small step.

Refactor:
* Use access methods for several details on vertical velocity.

Fixes:
* Dont reset the current jump phase if there is vertical freedom left,
because the next jump might then cause a violation.
* Fix clearActiveVerVel (remainder used to clear hVel, yet unused).
* Clear vertical velocity on removeAllVelocity (!).
* Keep setting sfDirty if velocity is found, to prevent premature reset.

Missing:
* Some resetting conditions for sfDirty might be missing.
* Implement an error counter increasing with velocity-add by 1.0 or
slightly more , decreasing with violations, but undo violations if count
is > 0.0. Use at least for vertical accounting, in order to go stricter
on cheating with velocity.
* Revise setting sfDirty on horizontal velocity as well.
* Switch to AxisVelocity (vertical), accounting for + and -.
2015-03-29 03:19:35 +02:00
asofold
4180d3b20b Let fight.direction use the location trace (simplified version @Iceee).
Allow 15 ticks total latency (2 x attacker + 1 x damaged) for the
looping, decrease tolerance for direction by a lot.
2015-03-26 23:29:42 +01:00
asofold
dc1f5eced5 Fix an issue with the maxphase detection.
Ignore if sfDirty is set, ignore falling, ignore bunnies.
2015-03-26 22:44:40 +01:00
asofold
45e5ae8cf3 We work with doubles there, use 0.0 values where appropriate. 2015-03-22 00:54:09 +01:00
asofold
e1385f2aba [BLEEDING] Attempt to fix and extend the Angle check.
* Use a LinkedList for storing past locations (prevents overriding if
t_last = t_now, also allows storing differences there right away).
* Calculate the yaw difference vs. the maximally possible value (180).
* Add switching the target as an extra weight.
2015-03-22 00:07:25 +01:00
asofold
139d47a7b1 Set version to 3.12.1-SNAPSHOT for continued development. 2015-03-21 22:13:24 +01:00
asofold
2ef6a541e5 Set version to 3.12.0-BETA2 for beta release. 2015-03-21 18:50:16 +01:00
asofold
9f33033976 Don't set NCPCompatCBDev as option dependency. 2015-03-21 18:49:11 +01:00
asofold
ef72564e3d Set version to 3.12.0-BETA for beta-release. 2015-03-21 12:15:04 +01:00
asofold
067ce0d5a5 Vanish-o. 2015-03-21 11:58:37 +01:00
asofold
ef1ef05115 Spaces. 2015-03-20 23:35:36 +01:00
asofold
ccf9242402 Update entity widths in NCPCompatBukkit. 2015-03-20 23:23:59 +01:00
asofold
4d4e48d790 Random code changes #1. 2015-03-20 20:46:23 +01:00
asofold
28abc009f0 Typo. 2015-03-20 19:45:14 +01:00
asofold
d53d5c7bc1 Use reflection for all Compat+CB modules.
This won't solve any problems directly, but it might later allow easier
splitting off dependencies and ease up removing modules for custom
builds.
2015-03-20 19:36:45 +01:00
asofold
6c5c6941f9 Set NCPCompatCBDev as optional dependency. 2015-03-13 22:52:11 +01:00
asofold
e0318a6df3 [BLEEDING/INSTABLE] Recode blockinteract.visible/ray-tracing.
The workarounds in InteractRayTracing and using multiple
reference-targets in Visible have all been removed in favor of using the
actual looking direction for ray-tracing.

On quick testing, there remain false positives, allowing to somewhat
escalate violation levels, if intended to. On normal playering false
positives seem to happen very near the very edges between blocks on
occasion.
2015-03-13 01:14:40 +01:00
asofold
f87873ba04 Remove blockinteract.speed debug feedback message. 2015-03-12 16:59:12 +01:00
asofold
3a64ab960f [Bleeding] Update to MC 1.8.3 Spigot/CraftBukkit. 2015-03-12 16:43:41 +01:00
asofold
26d7122a57 Add dedicated compatibility module for MC 1.8 with CraftBukkit/Spigot. 2015-03-11 22:55:00 +01:00
asofold
9c75a07378 AutoSign: Allow skipping empty signs. 2015-03-11 22:19:21 +01:00
asofold
0973149f0f Spaces/comment. 2015-03-11 21:58:00 +01:00
asofold
a5d6594591 Fixes, more tests and more to do for RayTracing.
* More tests for PassableRayTracing (room, rays from outside).
* Alter InteractRayTracing to account for the block interacted with.
* Added tests for InteractRayTracing.

Problems:
* RayTracing may end x-th digit off target, thus in the wrong block.
Suggested fix is to keep correcting t by the absolute coordinates of the
blocks, i.e. calculate the absolute position rather than adding up.
* InteractRayTracing with strict set to false (like in the
blockinteract.visible check) will be too lenient with 1-thick wall
setups and fail test cases.
2015-03-11 11:36:12 +01:00
asofold
8856f68e55 Run consistency tests reversed as well. 2015-03-09 11:55:46 +01:00
asofold
2e4a47f3c1 Remove unused option, clean up or and clarify some comments.
The secondaryPassSingular option doesn't seem to make much sense in case
of triple-transitions (6 secondary ones).
2015-03-09 11:40:38 +01:00
asofold
e871d205f6 Let RayTracing test all combinations of transitions for all axes.
Previously only "random" transitions were taken, for simplicity. For the
sake of better debugging and consistency we check all combinations of
transitions now, calling the iteration with all transitions done at once
the "primary line", while calling step with a subset of transitions done
would be the "secondary line".

Currently an iteration might still end x-th digit off the target, so it
does not necessarily end on the target block itself. This is not a
problem for passable, but might be one for interaction and other
applications, thus this should be fixed at some point.
2015-03-09 02:15:02 +01:00
asofold
e0f7e53c57 Skip fall damage penalty, if no damage would have resulted previously.
To avoid cheaters accumulating velocity dealt by damage, we skip dealing
fall damage, if they would not have received any, without taking the
current move into account. This is only for the case a player causes a
violation for which NoFall would usually have dealt fall damage.
2015-03-08 21:17:31 +01:00