mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat(gameplay): add walking sound for players and adjust underwater bubble interval
- Move walk/run sound interval constants from anonymous namespace to ClientPlayer header - Add moving_time field to PlayerInfo to track continuous movement - Implement play_walk_sound callback triggered by WALK and RUN gaits - Increase underwater bubble timer from 1.0s to 1.5s
This commit is contained in:
@@ -17,6 +17,8 @@ namespace Cubed {
|
||||
class ClientWorld;
|
||||
class ClientPlayer {
|
||||
public:
|
||||
static constexpr float WALK_SOUND_INTERVAL = 0.45f;
|
||||
static constexpr float RUN_SOUND_INTERVAL = 0.3f;
|
||||
using ChunkPosSet = absl::flat_hash_set<ChunkPos, ChunkPos::Hash>;
|
||||
ClientPlayer(ClientWorld& world);
|
||||
~ClientPlayer();
|
||||
|
||||
@@ -28,6 +28,7 @@ struct PlayerInfo {
|
||||
Gait gait;
|
||||
float angle = 0.0f;
|
||||
float walk_time = 0.0f;
|
||||
float moving_time = 0.0f;
|
||||
};
|
||||
|
||||
struct PlayerRenderData {
|
||||
|
||||
Reference in New Issue
Block a user