summaryrefslogtreecommitdiffstats
path: root/src/Entities/FireworkEntity.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-18 11:21:36 +0100
committerMattes D <github@xoft.cz>2015-01-18 11:21:36 +0100
commite38f41d32fa970c9a1493f9ca0ff16ad3faf33d3 (patch)
tree75983459166f6ebebebcc5e4bfb9c551f4e3aedb /src/Entities/FireworkEntity.cpp
parentMerge pull request #1707 from UltraCoderRU/master (diff)
parentFixed type-conversion warnings. (diff)
downloadcuberite-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 'src/Entities/FireworkEntity.cpp')
-rw-r--r--src/Entities/FireworkEntity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/FireworkEntity.cpp b/src/Entities/FireworkEntity.cpp
index 68d02640a..32eaf669a 100644
--- a/src/Entities/FireworkEntity.cpp
+++ b/src/Entities/FireworkEntity.cpp
@@ -19,7 +19,7 @@ cFireworkEntity::cFireworkEntity(cEntity * a_Creator, double a_X, double a_Y, do
-void cFireworkEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
+void cFireworkEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
int RelX = POSX_TOINT - a_Chunk.GetPosX() * cChunkDef::Width;
int RelZ = POSZ_TOINT - a_Chunk.GetPosZ() * cChunkDef::Width;
@@ -28,7 +28,7 @@ void cFireworkEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
if ((PosY < 0) || (PosY >= cChunkDef::Height))
{
AddSpeedY(1);
- AddPosition(GetSpeed() * (a_Dt / 1000));
+ AddPosition(GetSpeed() * (static_cast<double>(a_Dt.count()) / 1000));
return;
}
@@ -53,14 +53,14 @@ void cFireworkEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
}
AddSpeedY(1);
- AddPosition(GetSpeed() * (a_Dt / 1000));
+ AddPosition(GetSpeed() * (static_cast<double>(a_Dt.count()) / 1000));
}
-void cFireworkEntity::Tick(float a_Dt, cChunk & a_Chunk)
+void cFireworkEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);