Player Attributes (#578)
* feat: add max interaction distance functionality to Player class and Lua bindings * feat: add getter and setter for max interaction distance in Player class documentation * feat: add speed and gravity scale properties with corresponding getters and setters in Player class * fix: replace deprecated __max and __min with std::max and std::min in setMaxInteractionDistance * feat: add time scale functionality with getters and setters in World and Engine classes * remove speed and gravity scale functions from player and world libraries * remove time scale setting on world open and close * rename interaction distance functions for consistency * refactor: update interaction distance functions and remove time scale methods * refactor: revert classes.lua to dev * refactor: remove time scale functionality from Engine and World classes * fix: Now I’ve definitely rolled back `classes.lua`. * refactor: remove unused player attributes and clean up player class * Update Player.hpp removed unused methods from Player.cpp
This commit is contained in:
@@ -488,7 +488,7 @@ void PlayerController::updateInteraction(const Input& inputEvents, float delta)
|
||||
}
|
||||
const auto& bindings = inputEvents.getBindings();
|
||||
bool xkey = bindings.active(BIND_PLAYER_FAST_INTERACTOIN);
|
||||
float maxDistance = xkey ? 200.0f : 10.0f;
|
||||
float maxDistance = xkey ? 200.0f : player.getMaxInteractionDistance();
|
||||
bool longInteraction = interactionTimer <= 0 || xkey;
|
||||
bool lclick = bindings.jactive(BIND_PLAYER_DESTROY) ||
|
||||
(longInteraction && bindings.active(BIND_PLAYER_DESTROY));
|
||||
|
||||
Reference in New Issue
Block a user