diff options
author | Tycho <work.tycho+git@gmail.com> | 2015-01-11 22:12:26 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2015-01-11 22:12:26 +0100 |
commit | 2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce (patch) | |
tree | 86e5b6b66d4791bd64485313db23d7f281f59ab5 /src/Entities/Minecart.cpp | |
parent | Created new type cTickTime and rewrote cWorld::TickThread to use it (diff) | |
download | cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.tar cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.tar.gz cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.tar.bz2 cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.tar.lz cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.tar.xz cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.tar.zst cuberite-2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Minecart.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp index fac4f0714..552d70de7 100644 --- a/src/Entities/Minecart.cpp +++ b/src/Entities/Minecart.cpp @@ -111,7 +111,7 @@ void cMinecart::SpawnOn(cClientHandle & a_ClientHandle) -void cMinecart::HandlePhysics(float a_Dt, cChunk & a_Chunk) +void cMinecart::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { if (IsDestroyed()) // Mainly to stop detector rails triggering again after minecart is dead { @@ -165,19 +165,19 @@ void cMinecart::HandlePhysics(float a_Dt, cChunk & a_Chunk) switch (InsideType) { - case E_BLOCK_RAIL: HandleRailPhysics(InsideMeta, a_Dt); break; + case E_BLOCK_RAIL: HandleRailPhysics(InsideMeta, a_Dt.count()); break; case E_BLOCK_ACTIVATOR_RAIL: break; case E_BLOCK_POWERED_RAIL: HandlePoweredRailPhysics(InsideMeta); break; case E_BLOCK_DETECTOR_RAIL: { - HandleDetectorRailPhysics(InsideMeta, a_Dt); + HandleDetectorRailPhysics(InsideMeta, a_Dt.count()); WasDetectorRail = true; break; } default: VERIFY(!"Unhandled rail type despite checking if block was rail!"); break; } - AddPosition(GetSpeed() * (a_Dt / 1000)); // Commit changes; as we use our own engine when on rails, this needs to be done, whereas it is normally in Entity.cpp + AddPosition(GetSpeed() * (a_Dt.count() / 1000)); // Commit changes; as we use our own engine when on rails, this needs to be done, whereas it is normally in Entity.cpp } else { @@ -1213,7 +1213,7 @@ void cMinecartWithFurnace::OnRightClicked(cPlayer & a_Player) -void cMinecartWithFurnace::Tick(float a_Dt, cChunk & a_Chunk) +void cMinecartWithFurnace::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { super::Tick(a_Dt, a_Chunk); |