Commit Graph

598 Commits

Author SHA1 Message Date
asofold
c3ab80cd74 Reset last distances to Double.MAX_VALUE. 2015-10-06 09:49:10 +02:00
asofold
b21ca2093e Alter bunnyhop preconditions. Remove lostground stairs.
* Don't let doubleBunny bypass other conditions.
* Don't allow bunnyhop when lowjump is set.
2015-10-05 00:02:43 +02:00
asofold
7f8740bf30 Override block height for farmland (soil). 2015-10-04 22:08:10 +02:00
asofold
289d72757b Set a lower Y_ON_GROUND_DEFAULT.
Used to be 0.0625 for a while, but intentions are to cover ground-loss
as lostground workarounds. Later switch to calculate the distance to
ground (with a given max-distance).
2015-10-03 00:40:31 +02:00
asofold
ee2df3f05b Allow normal gravity slope after having been on ground. 2015-10-03 00:29:48 +02:00
asofold
7bcae640e9 Do debug log for block break and place and dig/place packets.
Dig/place is only logged if a debug flag is set in the config, it won't
activate with on-the-fly per player debug logging.
2015-10-03 00:21:37 +02:00
asofold
49c08c453a Only check vdistsb if moving upwards and not stepping. Confine vcollide. 2015-09-28 16:56:57 +02:00
asofold
222c6bd537 Add lostground_vcollide.
For efficiency (several?) other cases will be removable, once we model
the per-move ground/medium properties more accurately also for the past
move(s). At least lostground_pyramid should be removed then.
2015-09-28 15:46:06 +02:00
asofold
9efcf01766 [BREAKING] Move maps into a maps package. Prepare a linked CoordMap.
Splits CoordMap into interface, abstract hash map, implementations.
Sketch Linked version, hinting at access order, e.g. with
tracking piston effects with timeouts.

Missing:
* Implementation of a linked version.
2015-09-28 12:56:58 +02:00
asofold
01671a04fd Add yaw and pitch to getLocation. 2015-09-28 00:03:56 +02:00
asofold
95c6af9741 Optimize reset (no need for using per-count locks). 2015-09-27 22:09:11 +02:00
asofold
444fcb9761 Remove cancelling redundant packets, re-organize, debug log flying.
Cancelling redundant packets has to big problems:
* The normal case is to not run in the primary thread.
* For legit players a missed micro move could mean that survivalfly can
not detect ground properly.

Better approaches could be:
* Cancel asynchronous packets if they match the last sent one (only
simple hacks).
* Check for moves passing block borders, request block shapes and such
from the main thread.
* Detect actual cheating or unusual patterns instead.
* Queue packets for processing in the main thread.

Missing:
* Actually detect ACK packets for previous outgoing teleports.
* Do something upon detecting illegal coordinates (asynchronous
disconnect? queue kicking, config).
2015-09-27 21:54:36 +02:00
asofold
5f47eab770 Use more fine grained locks. Fix a couple of consistency issues. 2015-09-26 14:13:28 +02:00
asofold
7110d0ecca Adjust breaking times for DRAGON_EGG. 2015-09-24 19:28:55 +02:00
asofold
8230a13fc0 [BLEEDING][BREAKING] Rework much of y-axis handling.
* In addition to the "distance from set-back" check, we have a check of
the per-move distance for in-air checks, taking account of friction.
* In-air and liquid checks should consume vertical velocity once needed.
* Model vertical velocity "exact", i.e. positive and negative, use an
entry once a sub-check fails, quite strict invalidation of not matching
values, matching against the y-distance directly.
* Vertical accounting has been sharpened for the moment. The new
per-move checking might make it superfluous.
* Remove MediumLiftOff in favor of a LiftOffEnvelope carrying basic
lift-off max-gain/max-height/max-phase, enabling to distinguish between
normal lift-off and liquid near ground.
* Rename others (e.g. sfLastYDist -> lastYDist). Thus breaking internal
naming, adding velocity via MovingData still works, but should behave
slightly differently.
* Fixes (waterwalk with head obstructed, resetting of sfDirty, possibly
others).

Issues.
* Edge cases with velocity, water.
* Lava needs friction, at least with velocity.
* Lostground_edge(ydist < 0.0) ->
bunny with yDistance > 0.0. Need more flags or better model for keeping
past moves information.
* Plain ground misses (layered snow).
* lostground with yDist == 0.0, then seemingly in-air yDist== 0.0, then
bunny/lifft-off (similar to above). Needs better modeling of past moves,
because several lostgorund cases mean "the move has been on ground".
Also includes geting the distance to ground for hack-proof set-back-y.
* Vertical velocity is now matched with a margin, because the client
seems to add randomly.
* Possibly new loopholes/exploits (extreme large moves?).
* Cleanup pending.
2015-09-21 00:27:33 +02:00
asofold
f3a137709b Part-revert activating vertical accounting once velocity is used up.
* Don't activate accounting (velocity downwards issue, needs recode).
* Do still check yDirChange once velocity effects are gone.
2015-09-13 14:47:31 +02:00
asofold
b2caae38d2 [BREAKING] Group several classes into sub packages for moving. Renames.
* Group selected classes into sub-packages of moving.
* Rename classes.
* Must use LinkedList for velocity entries.
* Prepare SimpleAxisVelocity + entry for use-once accounting.

(Might not be the final naming.)
2015-09-13 14:39:25 +02:00
asofold
122e0727b8 Losen bounds for edgeasc5/7. 2015-09-12 23:22:23 +02:00
asofold
0a5f590801 [BLEEDING] Re-activate accounting once vertical velocity is used up. 2015-09-12 23:21:13 +02:00
asofold
6d1c56675b Rough coverage of another false postive (edgeasc5 and edgeasc7). 2015-09-12 15:39:00 +02:00
asofold
b288afa6e6 Test for depth strider on all armor items. 2015-09-12 12:37:44 +02:00
asofold
382ecd9f05 Add a lostground case for untracked (micro) moves. Reorder a few things. 2015-09-10 18:34:21 +02:00
asofold
134b8e7b3d Attempt to fix 1st move bunny and couldstep+vdist. 2015-09-10 14:09:13 +02:00
asofold
fbfa11be20 Don't wildcard allow bunny hop (seems not needed anymore). 2015-09-10 13:41:59 +02:00
asofold
ba40cfb6aa Do apply the cap for lostground_edgeasc1. 2015-09-10 11:05:19 +02:00
asofold
3db2484920 Revive lostground-interpolate as edgeasc1, slightly altered. 2015-09-09 13:49:43 +02:00
asofold
d37961ed49 Attempt to refine lostground/edge. 2015-09-09 01:20:37 +02:00
asofold
f2f66c1572 Another special case bunny (@Iceee). 2015-09-07 00:23:45 +02:00
asofold
30abbe0225 [BLEEDING] Remove "interpolate" workaround.
Instead adjust to client-side code, parameters still need adaption.
2015-09-07 00:08:13 +02:00
asofold
8c79309c7d Allow sprinting during flight, disregarding food level. 2015-08-11 18:30:01 +02:00
asofold
389df1aa86 Only ignore the first block of the primary line, if ignoreFirst is set. 2015-08-09 23:39:21 +02:00
asofold
0b89cdd90a Allow sfStepHeight for lostground_step. 2015-08-09 23:37:34 +02:00
asofold
463d16b0fd Demand moving up first for lowjump detection. Refine tag use. 2015-08-09 18:52:55 +02:00
asofold
56d32c4f3e Remove the "bedstep" workaround in favor of a configurable step height. 2015-08-09 16:17:43 +02:00
asofold
c9df8238f7 SF + set-back policy: Set back to void, group "falldamage" here. 2015-08-08 23:22:23 +02:00
asofold
2151d9d365 Adjustments to bunnyhop / bump.
* Use BlockProperties.collides to use the actual bounds of blocks.
* Don't test for sfLowJump to set allowHop.
* Set head bump margin to match 2-high spots and to prevent lowjump fps.
* Tighten conditions for actual hop.
2015-08-01 22:07:36 +02:00
asofold
c5574b5978 Bunny fix and bumping the head into the ceiling, various adjustments.
* Don't x > 1.314 * x.
* Add height, eyeHeight, isHeadObstructed to PlayerLocation.
* lowjump detection: from is higher than to, test both locations.
* Remove bunny reset within lowjump detection (defeated flying bunny).
* Check isHeadObstructed directly in the bunnyHop method.

Issues remaining:
* Moderate acceleration ground to ground, after having landed (+1st).
* Possibly transitions between 2-high and other.
* More edge cases with slowness potion.
2015-08-01 14:47:57 +02:00
asofold
866a2248cf Use tabs for all the pom.xml. 2015-08-01 00:58:33 +02:00
asofold
cccbcbb7c8 [FAIL] ... bunnyhop on the first move (or after resetting data).
This seems to be the same value on ground as with slowness potion and
2-step acceleration. Not possible to squeeze into the ordinary bunny
envelope.

On the fly: add PlayerLocation.isOnGroundOrResetCond.
2015-07-31 16:15:23 +02:00
asofold
3448f66e53 Allow stepping onto beds. Activated from 1.8 on, configurable. 2015-07-30 23:46:07 +02:00
asofold
7da874ad66 Attempt to deploy only the final plugin jar. 2015-07-30 11:27:30 +02:00
asofold
7c194e467e Ensure jump boost calculations don't result in negative numbers. 2015-07-30 01:28:12 +02:00
asofold
e7ec68d33a Use the given config. 2015-07-29 01:29:48 +02:00
asofold
7792f75564 Allow disabling the stance check (checks.moving.ignorestance). 2015-07-29 01:18:43 +02:00
asofold
53021bba98 [BLEEDING] Attempt to simplify/generalize the bunnyhop workaround(s).
Slowness+bunny will still not fully work, because we need to model
closer to the client here, i.e. acceleration and friction. Remaining
issues in rough order of naughtiness:
* On-ground friction based speed decrease.
* Increasing of speed, above slowness sprinting speed but below normal
sprinting speed.
* Two-step bunnyhop, having h-speed increase to bunny with two packets.
Similarly acceleration effects when touching ground, not modeled right
by bunny.
* Possibly more.
2015-07-28 23:08:38 +02:00
asofold
29358f1e64 Workaround a false positive for step with lost-ground. 2015-07-26 16:36:47 +02:00
asofold
9ed57399fa Quick cleanup for horizontal distance estimation.
* Remove early return, as we prefer to know what NCP would allow, at
least until sf changes have stabilized.
* Only count in speed effects for normal running/jumping, not
water/web/blocking/sneaking. Either check potion effects or attributes.
2015-07-26 15:44:42 +02:00
asofold
ca07ecc3ab Attributes: Allow detecting if attributes are available at all. 2015-07-24 23:09:41 +02:00
asofold
c28571166b Don't modify walkspeed by attributes. Allow air friction on bunnyfly. 2015-07-23 23:38:01 +02:00
asofold
135c89ca70 Ensure to reset the (mc) fall distance on ground. 2015-07-23 22:19:59 +02:00