Removal and Replacement of the CryTimer (gEnv->pTimer) (#5409)
Replaced and removed the CryTimer (gEnv->pTimer). The new TimeSystem is a merger of the current time functionality found in the engine.
* Rename TimeSystemComponent.h/.cpp to TimeSystem.h/.cpp
* Adding New TimeSystem
* remove old timer cvars
* small improvements to the time system.
- updated parts to use the time conversion functions.
- in AdvanceTickDeltaTimes applying t_simulationTickScale is now uses doubles instead of floats.
* Replace gEnv->pTimer / ITimer usages with TimeSystem
* Updating usages of AZ::TimeMs{ 0 } and AZ::TimeUs{ 0 } to AZ::Time::ZeroTimeMs and AZ::Time::ZeroTimeUs
* red code the CryTimer
* using TimeUs instead of TimeMs is some cases + updating usages of old cvars to new
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -99,8 +99,8 @@ namespace Multiplayer
|
||||
double m_moveAccumulator = 0.0;
|
||||
double m_clientBankedTime = 0.0;
|
||||
|
||||
AZ::TimeMs m_lastInputReceivedTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_lastCorrectionSentTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_lastInputReceivedTimeMs = AZ::Time::ZeroTimeMs;
|
||||
AZ::TimeMs m_lastCorrectionSentTimeMs = AZ::Time::ZeroTimeMs;
|
||||
|
||||
ClientInputId m_clientInputId = ClientInputId{ 0 }; // Clients incrementing inputId
|
||||
ClientInputId m_lastClientInputId = ClientInputId{ 0 }; // Last inputId processed by the server
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Multiplayer
|
||||
}
|
||||
private:
|
||||
HostFrameId m_previousHostFrameId = InvalidHostFrameId;
|
||||
AZ::TimeMs m_previousHostTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_previousHostTimeMs = AZ::Time::ZeroTimeMs;
|
||||
AzNetworking::ConnectionId m_previousRewindConnectionId = AzNetworking::InvalidConnectionId;
|
||||
float m_previousBlendFactor = DefaultBlendFactor;
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Multiplayer
|
||||
uint64_t m_serverConnectionCount = 0;
|
||||
|
||||
uint64_t m_recordMetricIndex = 0;
|
||||
AZ::TimeMs m_totalHistoryTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_totalHistoryTimeMs = AZ::Time::ZeroTimeMs;
|
||||
|
||||
static const uint32_t RingbufferSamples = 32;
|
||||
using MetricRingbuffer = AZStd::array<uint64_t, RingbufferSamples>;
|
||||
|
||||
+3
-3
@@ -201,9 +201,9 @@ namespace Multiplayer
|
||||
AZStd::unique_ptr<IReplicationWindow> m_replicationWindow;
|
||||
AZStd::unique_ptr<IEntityDomain> m_remoteEntityDomain;
|
||||
|
||||
AZ::TimeMs m_entityActivationTimeSliceMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_entityPendingRemovalMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_frameTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_entityActivationTimeSliceMs = AZ::Time::ZeroTimeMs;
|
||||
AZ::TimeMs m_entityPendingRemovalMs = AZ::Time::ZeroTimeMs;
|
||||
AZ::TimeMs m_frameTimeMs = AZ::Time::ZeroTimeMs;
|
||||
HostId m_remoteHostId = InvalidHostId;
|
||||
uint32_t m_maxRemoteEntitiesPendingCreationCount = AZStd::numeric_limits<uint32_t>::max();
|
||||
uint32_t m_maxPayloadSize = 0;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Multiplayer
|
||||
MultiplayerComponentInputVector m_componentInputs;
|
||||
ClientInputId m_inputId = ClientInputId{ 0 };
|
||||
HostFrameId m_hostFrameId = InvalidHostFrameId;
|
||||
AZ::TimeMs m_hostTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_hostTimeMs = AZ::Time::ZeroTimeMs;
|
||||
float m_hostBlendFactor = 0.f;
|
||||
ConstNetworkEntityHandle m_owner;
|
||||
bool m_wasAttached = false;
|
||||
|
||||
Reference in New Issue
Block a user