Commit Graph

1729 Commits

Author SHA1 Message Date
asofold
fc788f55c4 [Bleeding] Optimize preparation for PlayerLocation use.
1. Only collect flags for survivalfly.
2. Set all properties for the to location if it is the same position as
the from location.
2013-03-12 09:59:52 +01:00
asofold
a7c4539783 Let NoFall be more generous with the on-ground search.
Extend xz and y margins.
2013-03-12 08:19:19 +01:00
asofold
7b4fe7acc4 Regroup lost-ground workarounds. Fix some aspects.
Check some preconditions in the check method, delegate to different
methods for different cases, also to have smaller method bodies.

IsAboveStairs is only checked for "mild" y-distances. For faster
descending an individual edge-check has been added.
2013-03-12 07:55:50 +01:00
asofold
409ba0b2ee Don't check god mode for dead players. 2013-03-12 07:05:49 +01:00
asofold
d60c77b66a Confine bounding boxes and y-distance for flag collection.
This leads to less blocks visited. (Cleanup pending.)
2013-03-12 04:25:45 +01:00
asofold
186eec69ab Moving: Only set sfDirty flag if velocity is really used. 2013-03-11 19:18:22 +01:00
asofold
ea0b26ad19 SurvivalFly: adjust "swimup" workarounds.
1. After-failure workarounds checking (performance).
2. Hopefully fixes issues with flowing water and stairs.
2013-03-11 18:42:45 +01:00
asofold
3f2780fe7d Fix block-flag-setup for bukkit-api-only.
Allow all blocks that get the IGN_PASSABLE flag set but which the player
can stand on to be ground from height 0 on (GROUND_HEIGHT, takes
effect unless for blocks with an explicit workaround). Set IGN_PASSABLE
and GROUND_HEIGHT for ENDER_PORTAL_FRAME explicitly.
2013-03-11 07:50:44 +01:00
asofold
ae0cdff5f2 Remove debug message. 2013-03-11 06:34:58 +01:00
asofold
ba8ebb2a61 Fix cauldron workarounds. 2013-03-11 06:34:39 +01:00
asofold
d4616f415d [Bleeding] Various fixes for collision logic and consequent changes.
General:
- Wrong flags checked or flags checked in the wrong way.
- isPassable should use collidesBlock.
- collidesBlock should not see high-value-only matches as collisions.
- collidesCenter returns true for the case of collision (...).

Liquid blocks:
- New flag introduced to model rough liquid height for flowing liquids.
- One more workaround condition for moving in/off liquids.
- Use exact bounding-box for liquids checking in PlayerLocation.
- Check for water first in PlayerLocation.isInLiquid.

Other:
- Alter some block flags and workarounds.
- (other)
2013-03-11 06:01:39 +01:00
asofold
4ff54f0020 Revert setting set-back-y to block bottom on some occasions. 2013-03-11 03:23:10 +01:00
asofold
2fe9f1e668 Higher default capacity for CoordMap instances in BlockCache. 2013-03-10 00:30:00 +01:00
asofold
f882c8bc8c Another attempt to set the bounding box (use Math.round). 2013-03-09 20:04:16 +01:00
asofold
0c59487a0a Use the same Location instance for passable and nofall. 2013-03-09 19:42:16 +01:00
asofold
dfc8e7c5a7 Attempt to fix issues with falling through narrow spots.
The bounding box gets "corrected" by decreasing maxX and maxZ slightly.
This is not a generic approach, might get replaced by something else
later on.
2013-03-09 17:13:33 +01:00
asofold
434a83c398 [BLEEDING] Adjust the set-back y-coordinate to block bottom for some
cases.
2013-03-09 03:53:51 +01:00
asofold
8d9e2fdadc Add more detailed tags to lost-ground workarounds. 2013-03-09 03:53:06 +01:00
asofold
7eab369a00 Alter small-range-tp margin. Add debug info for teleport and setback-y. 2013-03-09 03:04:50 +01:00
asofold
498f23e704 Reduce amount fed to improbable by fight.reach. 2013-03-09 00:34:04 +01:00
asofold
de4faa392d Allow fight.speed to create improbable violations for higher violation
levels.

Might need configuration/testing.
2013-03-08 23:26:57 +01:00
asofold
61bc88b64f Add "strict" method to fight.direction.
Set as default, the "strict" option will also check the angle between
the viewing direction and the direction towards the target. This might
not stay the default method, but it does help against auras in close
combat.
2013-03-08 23:24:51 +01:00
asofold
593ea71c9b Add convenience methods for combinedDirectionCheck. 2013-03-08 23:10:05 +01:00
asofold
c23482fcf5 Fix standing on cactus. 2013-03-08 23:08:53 +01:00
asofold
926556a358 Implement JoinLeaveListener with MovingListener and ChatListener. 2013-03-08 17:28:35 +01:00
asofold
5dd09d4476 [BLEEDING, INSTABLE] Switch horizontal velocity to a new method.
This method remembers (currently) each velocity added and only uses it
when it is needed not to generate a violation. Further (currently
simple) activation and invalidation logics are applied. With this method
latency will be much less of a problem, though stacking of queued
entries (especially for rocket-boots style flying) and more
merging of entries and more invalidation logics are required, thus
bleeding+instable.

On the long term this should make cheating much more difficult, possible
steps are:
1. Use method for vertical velocity too (only positive)
2. Distinguish positive and negative vertical velocity (opens a way to
control the speed downwards in any medium!).
3. Per-axis velocity (either absolute or pos/neg with more invalidation
logic on direction changes).
2013-03-08 04:06:17 +01:00
asofold
24c1599e94 Remove angle data on players leaving. 2013-03-08 03:47:02 +01:00
asofold
be49a7855c Add JoinLeaveListener component. 2013-03-08 03:44:54 +01:00
asofold
157e957122 Add comments. 2013-03-08 03:05:32 +01:00
asofold
5500cd15bf More on-ground: Faster return + fixing some workarounds.
Question remains if this opens bypasses. At first glance it seems good.
2013-03-07 18:26:16 +01:00
asofold
5a76b22ef6 Sharpen maximum jump distance. 2013-03-07 04:20:26 +01:00
asofold
eb4c537e65 Revert too fast return, add other, comments, indentation. 2013-03-07 03:28:40 +01:00
asofold
08de1cb576 Tweak isOnGround for faster exclusion. 2013-03-07 02:34:52 +01:00
asofold
9a5b988735 Higher or same height... 2013-03-07 00:21:12 +01:00
asofold
0543eb8200 Don't count blocks as ground the players foot is in. 2013-03-07 00:11:45 +01:00
asofold
db21e49576 Player must be above getBlockHeight. 2013-03-06 21:06:19 +01:00
asofold
83abefb630 Fix walking on a block below COCOA. 2013-03-06 20:36:00 +01:00
asofold
348ba34e35 Commend on potential issue with join. 2013-03-06 19:36:50 +01:00
asofold
11628b2863 [BLEEDING] Squash a couple of spiders.
Reworking parts of the on-ground judgment to exclude blocks the player
is inside of rather than standing on them.
2013-03-06 19:19:49 +01:00
asofold
2d5dd8770d Fix block dump not respecting the checks.debug and blockbreak.debug
flags.
2013-03-06 18:54:11 +01:00
asofold
ce3d1ba89c Attempt to fix issues with (non exact) respawn. 2013-03-06 15:40:35 +01:00
asofold
0eaf9587d8 Add null check and refine preconditions for on-ground shortcut. 2013-03-06 04:08:20 +01:00
asofold
f20fc8575d isOnGround: Fix shape judgment for shape-changing blocks. 2013-03-05 21:49:16 +01:00
asofold
8762d38020 Fix isOnGround issue with shape judgment. 2013-03-05 21:36:30 +01:00
asofold
3ad9ba3993 Fix isOnGround stopping loop with "walls". 2013-03-05 21:23:18 +01:00
asofold
7adef83687 Change resetting of yOnGround for NoFall.
Use CheckConfig to determine if it is necessary. Move resetting to a
method. Collect block flags again.
2013-03-05 20:21:29 +01:00
asofold
8bed6fb2de Change resetting of yOnGround for NoFall.
Use CheckConfig to determine if it is necessary. Move resetting to a
method. Collect block flags again.
2013-03-05 20:11:51 +01:00
asofold
2b0ab5cae3 Reset block-flags with setYonGround. Add setter for block-flags. 2013-03-05 20:10:37 +01:00
asofold
d7110b3239 Adjust/fix moving debug output. 2013-03-05 19:45:01 +01:00
asofold
b73f68dd55 Add javadocs about levels. 2013-03-05 18:39:49 +01:00