mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add mount system and crash mouse-release handler
Render mount M2 model under player with seated animation, apply creature skin textures, server-driven speed via SMSG_FORCE_RUN_SPEED_CHANGE, and /dismount command. X11 XUngrabPointer on crash/hang to always release mouse.
This commit is contained in:
parent
4a932dd8cd
commit
643611ee79
13 changed files with 363 additions and 3 deletions
|
|
@ -191,7 +191,7 @@ void CameraController::update(float deltaTime) {
|
|||
} else if (ctrlDown) {
|
||||
speed = WOW_WALK_SPEED;
|
||||
} else {
|
||||
speed = WOW_RUN_SPEED;
|
||||
speed = (runSpeedOverride_ > 0.0f) ? runSpeedOverride_ : WOW_RUN_SPEED;
|
||||
}
|
||||
} else {
|
||||
// Exploration mode (original behavior)
|
||||
|
|
@ -225,10 +225,12 @@ void CameraController::update(float deltaTime) {
|
|||
glm::vec3 right(-std::sin(moveYawRad), std::cos(moveYawRad), 0.0f);
|
||||
|
||||
// Toggle sit/crouch with X key (edge-triggered) — only when UI doesn't want keyboard
|
||||
// Blocked while mounted
|
||||
bool xDown = !uiWantsKeyboard && input.isKeyPressed(SDL_SCANCODE_X);
|
||||
if (xDown && !xKeyWasDown) {
|
||||
if (xDown && !xKeyWasDown && !mounted_) {
|
||||
sitting = !sitting;
|
||||
}
|
||||
if (mounted_) sitting = false;
|
||||
xKeyWasDown = xDown;
|
||||
|
||||
// Update eye height based on crouch state (smooth transition)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue