Fix sending incorrect date values on world change
Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge.
This commit is contained in:
@@ -92,8 +92,10 @@ void cMobSpawnerEntity::UpdateActiveState(void)
|
||||
|
||||
bool cMobSpawnerEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
// Update the active flag every 5 seconds
|
||||
if ((m_World->GetWorldAge() % 100) == 0)
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
// Update the active flag every 5 seconds:
|
||||
if ((m_World->GetWorldTickAge() % 5s) == 0s)
|
||||
{
|
||||
UpdateActiveState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user