mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Implement activity SFX and decouple camera orbit from movement facing
This commit is contained in:
parent
dfc29cad10
commit
8bc50818a9
9 changed files with 592 additions and 12 deletions
|
|
@ -37,6 +37,7 @@ public:
|
|||
float getMovementSpeed() const { return movementSpeed; }
|
||||
bool isMoving() const;
|
||||
float getYaw() const { return yaw; }
|
||||
float getFacingYaw() const { return facingYaw; }
|
||||
bool isThirdPerson() const { return thirdPerson; }
|
||||
bool isGrounded() const { return grounded; }
|
||||
bool isJumping() const { return !grounded && verticalVelocity > 0.0f; }
|
||||
|
|
@ -74,6 +75,7 @@ private:
|
|||
// Stored rotation (avoids lossy forward-vector round-trip)
|
||||
float yaw = 180.0f;
|
||||
float pitch = -30.0f;
|
||||
float facingYaw = 180.0f; // Character-facing yaw (can differ from camera yaw)
|
||||
|
||||
// Movement settings
|
||||
float movementSpeed = 50.0f;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public:
|
|||
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;
|
||||
bool getInstanceModelName(uint32_t instanceId, std::string& modelName) const;
|
||||
|
||||
/** Attach a weapon model to a character instance at the given attachment point. */
|
||||
bool attachWeapon(uint32_t charInstanceId, uint32_t attachmentId,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
namespace wowee {
|
||||
namespace core { class Window; }
|
||||
namespace game { class World; class ZoneManager; }
|
||||
namespace audio { class MusicManager; class FootstepManager; enum class FootstepSurface : uint8_t; }
|
||||
namespace audio { class MusicManager; class FootstepManager; class ActivitySoundManager; enum class FootstepSurface : uint8_t; }
|
||||
namespace pipeline { class AssetManager; }
|
||||
|
||||
namespace rendering {
|
||||
|
|
@ -151,6 +151,7 @@ private:
|
|||
std::unique_ptr<Minimap> minimap;
|
||||
std::unique_ptr<audio::MusicManager> musicManager;
|
||||
std::unique_ptr<audio::FootstepManager> footstepManager;
|
||||
std::unique_ptr<audio::ActivitySoundManager> activitySoundManager;
|
||||
std::unique_ptr<game::ZoneManager> zoneManager;
|
||||
|
||||
pipeline::AssetManager* cachedAssetManager = nullptr;
|
||||
|
|
@ -182,6 +183,11 @@ private:
|
|||
uint32_t footstepLastAnimationId = 0;
|
||||
float footstepLastNormTime = 0.0f;
|
||||
bool footstepNormInitialized = false;
|
||||
bool sfxStateInitialized = false;
|
||||
bool sfxPrevGrounded = true;
|
||||
bool sfxPrevJumping = false;
|
||||
bool sfxPrevFalling = false;
|
||||
bool sfxPrevSwimming = false;
|
||||
|
||||
bool terrainEnabled = true;
|
||||
bool terrainLoaded = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue