mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
fix: suspend gravity for 10s after world entry to prevent WMO fall-through
Stormwind WMO collision takes 25+ seconds to fully load. The warmup ground check couldn't detect the WMO floor because collision data wasn't finalized yet. Player spawned and immediately fell through the unloaded WMO floor into the terrain below (Dun Morogh). New approach: suspendGravityFor(10s) after world entry. Gravity is disabled (Z position frozen) until either: 1. A floor is detected by the collision system (gravity resumes instantly) 2. The 10-second timer expires (gravity resumes as fallback) This handles the case where WMO collision loads during the first few seconds of gameplay — the player hovers at spawn Z until the floor appears, then lands normally. Also fixes faction language for chat (ORCISH for Horde, COMMON for Alliance) and adds SMSG_MESSAGECHAT diagnostic logging.
This commit is contained in:
parent
b1e2b8866d
commit
91c6eef967
4 changed files with 25 additions and 1 deletions
|
|
@ -126,6 +126,7 @@ public:
|
|||
void setFacingYaw(float yaw) { facingYaw = yaw; } // For taxi/scripted movement
|
||||
void clearMovementInputs();
|
||||
void suppressMovementFor(float seconds) { movementSuppressTimer_ = seconds; }
|
||||
void suspendGravityFor(float seconds) { gravitySuspendTimer_ = seconds; }
|
||||
|
||||
// Auto-follow: walk toward a target position each frame (WoW /follow).
|
||||
// The caller updates *targetPos every frame with the followed entity's render position.
|
||||
|
|
@ -270,6 +271,8 @@ private:
|
|||
|
||||
// Movement input suppression (after teleport/portal, ignore held keys)
|
||||
float movementSuppressTimer_ = 0.0f;
|
||||
// Gravity suspension (after world entry, hold Z until ground detected)
|
||||
float gravitySuspendTimer_ = 0.0f;
|
||||
|
||||
// State
|
||||
bool enabled = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue