diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-17 17:33:31 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-17 17:33:31 +1100 |
commit | 9dc1eb7312a1bf5d8a606ac4e47395e5334e60f6 (patch) | |
tree | ea6a60e442062027288304b55dc5a0c4d669435c /source/game/StarWorldClient.hpp | |
parent | 4e0d7598e10a83ea416c6cf244b13181dd875cb9 (diff) |
InterpolationTracker operates on time in seconds instead of steps now
Diffstat (limited to 'source/game/StarWorldClient.hpp')
-rw-r--r-- | source/game/StarWorldClient.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/game/StarWorldClient.hpp b/source/game/StarWorldClient.hpp index 56a24e5..3fe66eb 100644 --- a/source/game/StarWorldClient.hpp +++ b/source/game/StarWorldClient.hpp @@ -14,6 +14,7 @@ #include "StarWorld.hpp" #include "StarGameTimers.hpp" #include "StarLuaRoot.hpp" +#include "StarTickRateMonitor.hpp" namespace Star { @@ -88,7 +89,7 @@ public: List<PhysicsForceRegion> forceRegions() const override; Json getProperty(String const& propertyName, Json const& def = Json()) const override; void setProperty(String const& propertyName, Json const& property) override; - void timer(int stepsDelay, WorldAction worldAction) override; + void timer(float delay, WorldAction worldAction) override; double epochTime() const override; uint32_t day() const override; float dayLength() const override; @@ -218,7 +219,7 @@ private: void notifyEntityCreate(EntityPtr const& entity); // Queues pending (step based) updates to server, - void queueUpdatePackets(); + void queueUpdatePackets(bool sendEntityUpdates); void handleDamageNotifications(); void sparkDamagedBlocks(); @@ -262,7 +263,7 @@ private: WorldGeometry m_geometry; uint64_t m_currentStep; - double m_currentServerStep; + double m_currentTime; bool m_fullBright; bool m_asyncLighting; CellularLightingCalculator m_lightingCalculator; @@ -312,6 +313,7 @@ private: HashMap<EntityId, uint64_t> m_masterEntitiesNetVersion; InterpolationTracker m_interpolationTracker; + GameTimer m_entityUpdateTimer; List<PacketPtr> m_outgoingPackets; Maybe<int64_t> m_pingTime; @@ -333,7 +335,7 @@ private: AmbientManager m_musicTrack; AmbientManager m_altMusicTrack; - List<pair<int, WorldAction>> m_timers; + List<pair<float, WorldAction>> m_timers; Map<DamageNumberKey, DamageNumber> m_damageNumbers; float m_damageNotificationBatchDuration; |