mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add intent-driven strafe animation selection and movement state hooks
This commit is contained in:
parent
871172d63e
commit
dfc29cad10
5 changed files with 105 additions and 18 deletions
|
|
@ -42,6 +42,10 @@ public:
|
|||
bool isJumping() const { return !grounded && verticalVelocity > 0.0f; }
|
||||
bool isFalling() const { return !grounded && verticalVelocity <= 0.0f; }
|
||||
bool isSprinting() const;
|
||||
bool isMovingForward() const { return moveForwardActive; }
|
||||
bool isMovingBackward() const { return moveBackwardActive; }
|
||||
bool isStrafingLeft() const { return strafeLeftActive; }
|
||||
bool isStrafingRight() const { return strafeRightActive; }
|
||||
bool isRightMouseHeld() const { return rightMouseDown; }
|
||||
bool isSitting() const { return sitting; }
|
||||
bool isSwimming() const { return swimming; }
|
||||
|
|
@ -136,6 +140,10 @@ private:
|
|||
bool wasTurningRight = false;
|
||||
bool wasJumping = false;
|
||||
bool wasFalling = false;
|
||||
bool moveForwardActive = false;
|
||||
bool moveBackwardActive = false;
|
||||
bool strafeLeftActive = false;
|
||||
bool strafeRightActive = false;
|
||||
|
||||
// Movement callback
|
||||
MovementCallback movementCallback;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
void setInstanceVisible(uint32_t instanceId, bool visible);
|
||||
void removeInstance(uint32_t instanceId);
|
||||
bool getAnimationState(uint32_t instanceId, uint32_t& animationId, float& animationTimeMs, float& animationDurationMs) const;
|
||||
bool hasAnimation(uint32_t instanceId, uint32_t animationId) const;
|
||||
|
||||
/** Attach a weapon model to a character instance at the given attachment point. */
|
||||
bool attachWeapon(uint32_t charInstanceId, uint32_t attachmentId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue