Skip to content

Add 'player_physics' table in dimension definition#152

Open
1SDANi wants to merge 1 commit into
Unarelith:masterfrom
1SDANi:Movement
Open

Add 'player_physics' table in dimension definition#152
1SDANi wants to merge 1 commit into
Unarelith:masterfrom
1SDANi:Movement

Conversation

@1SDANi

@1SDANi 1SDANi commented Jul 9, 2020

Copy link
Copy Markdown

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

@Unarelith Unarelith left a comment

Copy link
Copy Markdown
Owner

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

Comment thread source/client/world/ClientPlayer.cpp Outdated
Comment thread source/client/world/ClientPlayer.cpp Outdated
Comment thread source/client/states/GameState.cpp
Comment thread source/client/world/ClientPlayer.cpp Outdated
Comment thread source/client/world/ClientPlayer.cpp Outdated
Comment thread source/common/world/DimensionPhysics.cpp Outdated
Comment thread source/common/world/DimensionPhysics.hpp
Comment thread source/common/world/DimensionPhysics.hpp Outdated
Comment thread source/server/lua/loader/LuaDimensionLoader.cpp Outdated
Comment thread source/server/lua/loader/LuaDimensionLoader.cpp
@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
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread source/client/world/ClientPlayer.cpp Outdated
Comment thread source/client/world/ClientPlayer.cpp Outdated

@Unarelith Unarelith left a comment

Copy link
Copy Markdown
Owner

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

Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread source/common/world/Dimension.hpp Outdated
Comment thread source/server/lua/loader/LuaDimensionLoader.cpp Outdated
Comment thread source/server/lua/loader/LuaDimensionLoader.cpp Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread mods/default/dimensions.lua Outdated
Comment thread source/client/world/ClientPlayer.hpp Outdated
Comment thread source/common/world/DimensionPhysics.hpp
Comment thread source/server/lua/loader/LuaDimensionLoader.cpp Outdated
Comment thread source/server/lua/loader/LuaDimensionLoader.cpp Outdated
Comment thread source/common/world/DimensionPhysics.hpp Outdated
@Unarelith Unarelith changed the title Movement Updates Add 'player_physics' table in dimension definition Jul 16, 2020
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md Outdated
Comment thread docs/lua-api-dimension.md
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