Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarItemDrop.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-21 00:58:49 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-21 00:58:49 +1000
commit4b0bc220e4da1173f742a4973939b139bef562db (patch)
tree0ff66d5957575fa814fc10b8cd93e3dd378f45dc /source/game/StarItemDrop.cpp
parent607be749451aa40e3619e7ceab0927d1fcec8233 (diff)
Support for changing the game's timescale
Context-specific (like per-world) timescales can also be added later
Diffstat (limited to 'source/game/StarItemDrop.cpp')
-rw-r--r--source/game/StarItemDrop.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarItemDrop.cpp b/source/game/StarItemDrop.cpp
index 8bc0e56..15ca927 100644
--- a/source/game/StarItemDrop.cpp
+++ b/source/game/StarItemDrop.cpp
@@ -176,7 +176,7 @@ RectF ItemDrop::collisionArea() const {
return m_boundBox;
}
-void ItemDrop::update(uint64_t) {
+void ItemDrop::update(float dt, uint64_t) {
if (isMaster()) {
if (m_owningEntity.get() != NullEntityId) {
auto owningEntity = world()->entity(m_owningEntity.get());
@@ -228,9 +228,9 @@ void ItemDrop::update(uint64_t) {
m_movementController.applyParameters(parameters);
}
- m_movementController.tickMaster();
+ m_movementController.tickMaster(dt);
- m_intangibleTimer.tick(WorldTimestep);
+ m_intangibleTimer.tick(dt);
m_dropAge.update(world()->epochTime());
m_ageItemsTimer.update(world()->epochTime());
@@ -252,7 +252,7 @@ void ItemDrop::update(uint64_t) {
} else {
m_netGroup.tickNetInterpolation(WorldTimestep);
Root::singleton().itemDatabase()->loadItem(m_itemDescriptor.get(), m_item);
- m_movementController.tickSlave();
+ m_movementController.tickSlave(dt);
}
}