summaryrefslogtreecommitdiffstats
path: root/src/Entities/FireworkEntity.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2015-01-11 22:12:26 +0100
committerTycho <work.tycho+git@gmail.com>2015-01-11 22:12:26 +0100
commit2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce (patch)
tree86e5b6b66d4791bd64485313db23d7f281f59ab5 /src/Entities/FireworkEntity.cpp
parentCreated new type cTickTime and rewrote cWorld::TickThread to use it (diff)
downloadcuberite-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/FireworkEntity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/FireworkEntity.cpp b/src/Entities/FireworkEntity.cpp
index 68d02640a..9dc7850a7 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() * (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() * (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);