mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
Suppress movement after teleport/portal, add shadow distance slider
- Add movementSuppressTimer to camera controller that forces all movement keys to read as false, preventing held W key from carrying through loading screens (fixes always-running-forward after instance portals) - Increase shadow frustum default from 60 to 72 units (+20%) - Make shadow distance configurable via setShadowDistance() (40-200 range) - Add shadow distance slider in Video settings tab (persisted to config)
This commit is contained in:
parent
e4d94e5d7c
commit
e001aaa2b6
7 changed files with 47 additions and 14 deletions
|
|
@ -97,6 +97,7 @@ public:
|
|||
void setExternalMoving(bool moving) { externalMoving_ = moving; }
|
||||
void setFacingYaw(float yaw) { facingYaw = yaw; } // For taxi/scripted movement
|
||||
void clearMovementInputs();
|
||||
void suppressMovementFor(float seconds) { movementSuppressTimer_ = seconds; }
|
||||
|
||||
// Trigger mount jump (applies vertical velocity for physics hop)
|
||||
void triggerMountJump();
|
||||
|
|
@ -211,6 +212,9 @@ private:
|
|||
static constexpr float SWIM_SINK_SPEED = -3.0f;
|
||||
static constexpr float WATER_SURFACE_OFFSET = 0.9f;
|
||||
|
||||
// Movement input suppression (after teleport/portal, ignore held keys)
|
||||
float movementSuppressTimer_ = 0.0f;
|
||||
|
||||
// State
|
||||
bool enabled = true;
|
||||
bool sitting = false;
|
||||
|
|
|
|||
|
|
@ -244,6 +244,7 @@ private:
|
|||
glm::vec3 shadowCenter = glm::vec3(0.0f);
|
||||
bool shadowCenterInitialized = false;
|
||||
bool shadowsEnabled = true;
|
||||
float shadowDistance_ = 72.0f; // Shadow frustum half-extent (default: 72 units)
|
||||
uint32_t shadowFrameCounter_ = 0;
|
||||
|
||||
|
||||
|
|
@ -254,6 +255,8 @@ public:
|
|||
|
||||
void setShadowsEnabled(bool enabled) { shadowsEnabled = enabled; }
|
||||
bool areShadowsEnabled() const { return shadowsEnabled; }
|
||||
void setShadowDistance(float dist) { shadowDistance_ = glm::clamp(dist, 40.0f, 200.0f); }
|
||||
float getShadowDistance() const { return shadowDistance_; }
|
||||
void setMsaaSamples(VkSampleCountFlagBits samples);
|
||||
|
||||
void setWaterRefractionEnabled(bool enabled);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue