diff options
author | Mattes D <github@xoft.cz> | 2015-01-18 11:21:36 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-18 11:21:36 +0100 |
commit | e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3 (patch) | |
tree | 75983459166f6ebebebcc5e4bfb9c551f4e3aedb /src/Entities/Minecart.cpp | |
parent | Merge pull request #1707 from UltraCoderRU/master (diff) | |
parent | Fixed type-conversion warnings. (diff) | |
download | cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.tar cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.tar.gz cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.tar.bz2 cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.tar.lz cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.tar.xz cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.tar.zst cuberite-e38f41d32fa970c9a1493f9ca0ff16ad3faf33d3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Minecart.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp index fac4f0714..776f957f4 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 { @@ -177,7 +177,7 @@ void cMinecart::HandlePhysics(float a_Dt, cChunk & a_Chunk) 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() * (static_cast<double>(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 { @@ -205,7 +205,7 @@ void cMinecart::HandlePhysics(float a_Dt, cChunk & a_Chunk) -void cMinecart::HandleRailPhysics(NIBBLETYPE a_RailMeta, float a_Dt) +void cMinecart::HandleRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt) { /* NOTE: Please bear in mind that taking away from negatives make them even more negative, @@ -565,7 +565,7 @@ void cMinecart::HandlePoweredRailPhysics(NIBBLETYPE a_RailMeta) -void cMinecart::HandleDetectorRailPhysics(NIBBLETYPE a_RailMeta, float a_Dt) +void cMinecart::HandleDetectorRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt) { m_World->SetBlockMeta(m_DetectorRailPosition, a_RailMeta | 0x08); @@ -576,7 +576,7 @@ void cMinecart::HandleDetectorRailPhysics(NIBBLETYPE a_RailMeta, float a_Dt) -void cMinecart::HandleActivatorRailPhysics(NIBBLETYPE a_RailMeta, float a_Dt) +void cMinecart::HandleActivatorRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt) { HandleRailPhysics(a_RailMeta & 0x07, a_Dt); } @@ -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); |