Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'player_physics' table in dimension definition #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

1SDANi
Copy link

@1SDANi 1SDANi commented Jul 9, 2020

It can have the following fields (all optional):

  • gravity: Gravity (constant -z velocity)
  • jump_speed: Jump speed.
  • jump_antigravity: The gravity is decreased by this amount while holding the jump key prior to the peak of the jump.
  • glide_gravity: Fall speed while holding Jump key in this dimension.
  • horizontal_sprint_mod: Horizontal sprint speed multiplier.
  • vertical_sprint_mod: Vertical sprint speed multiplier.
  • move_speed: Movement speed.
  • air_speed_mod: The movement speed of players in this dimension is multiplied by this amount while in the air.
  • fly_speed: Fly speed in this dimension.
  • sneak_verticalSpeed: The vertical movement speed is multiplied by this amount while sneaking.
  • sneak_horizontalMod: The horizontal movement speed is multiplied by this amount while sneaking.
  • is_sneak_always_mod

OP:

Migrated Move Speed, Fly Speed, Sneak Fall Vertical Speed, and Horizontal and Vertical Sprint Mods declaration to Lua moddabl Dimension attributes

Added Jump Antigravity and Glide Gravity as Lua moddable Dimension attributes:

Holding Jump while moving upwards after a jump will reduce the effects of Gravity on the player, granting them greater control over the height of their Jump. Values of this and Jump height were modifier to preserve the inability to jump 2 full blocks high
Holding Jump while falling will reduce the player's downwards speed cap from being equal to their Move Speed to the Glide Gravity as defined in the current dimension
Move and Process Inputs now require an instance of ClientWorld to be passed to them

@1SDANi 1SDANi force-pushed the Movement branch 4 times, most recently from a948425 to 1832f1b Compare July 9, 2020 02:36
@Unarelith Unarelith force-pushed the master branch 2 times, most recently from d10b70e to 5b77f61 Compare July 10, 2020 20:50
@1SDANi 1SDANi force-pushed the Movement branch 3 times, most recently from 247381f to 76d278c Compare July 11, 2020 16:54
Copy link
Owner

@Unarelith Unarelith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I really like what you did in your PR and can't wait to merge that. :)

Just check the changes I requested + you should add documentation in docs/lua-api-dimension.md

source/client/world/ClientPlayer.cpp Outdated Show resolved Hide resolved
source/client/world/ClientPlayer.cpp Outdated Show resolved Hide resolved
source/client/states/GameState.cpp Outdated Show resolved Hide resolved
source/client/world/ClientPlayer.cpp Outdated Show resolved Hide resolved
source/client/world/ClientPlayer.cpp Outdated Show resolved Hide resolved
source/common/world/DimensionPhysics.cpp Outdated Show resolved Hide resolved
source/common/world/DimensionPhysics.hpp Show resolved Hide resolved
source/common/world/DimensionPhysics.hpp Outdated Show resolved Hide resolved
source/server/lua/loader/LuaDimensionLoader.cpp Outdated Show resolved Hide resolved
source/server/lua/loader/LuaDimensionLoader.cpp Outdated Show resolved Hide resolved
@Unarelith Unarelith force-pushed the master branch 3 times, most recently from 997871c to 5db8341 Compare July 12, 2020 21:46
@1SDANi 1SDANi force-pushed the Movement branch 5 times, most recently from 1ccf093 to 3fe772d Compare July 13, 2020 03:58
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
source/client/world/ClientPlayer.cpp Outdated Show resolved Hide resolved
source/client/world/ClientPlayer.cpp Outdated Show resolved Hide resolved
Copy link
Owner

@Unarelith Unarelith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please edit CONTRIBUTORS.md file and add you to the list

docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
source/common/world/Dimension.hpp Outdated Show resolved Hide resolved
source/server/lua/loader/LuaDimensionLoader.cpp Outdated Show resolved Hide resolved
source/server/lua/loader/LuaDimensionLoader.cpp Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
mods/default/dimensions.lua Outdated Show resolved Hide resolved
source/client/world/ClientPlayer.hpp Outdated Show resolved Hide resolved
source/common/world/DimensionPhysics.hpp Show resolved Hide resolved
source/server/lua/loader/LuaDimensionLoader.cpp Outdated Show resolved Hide resolved
source/server/lua/loader/LuaDimensionLoader.cpp Outdated Show resolved Hide resolved
source/common/world/DimensionPhysics.hpp Outdated Show resolved Hide resolved
@Unarelith Unarelith changed the title Movement Updates Add 'player_physics' table in dimension definition Jul 16, 2020
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
docs/lua-api-dimension.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants