diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-08-18 21:48:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-08-18 21:48:09 +1000 |
commit | cd36a269fd1ccfd40ec09aca25285c6f9a875c43 (patch) | |
tree | 91636b3f3dae3ce7caaedca38d99a061365c884b /source/game/StarWorldClient.cpp | |
parent | b51e174bdc158187fc110dc4a947946d3dc329c1 (diff) |
Account for latency predicting item drop pickup
Diffstat (limited to 'source/game/StarWorldClient.cpp')
-rw-r--r-- | source/game/StarWorldClient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp index de324ad..17a1996 100644 --- a/source/game/StarWorldClient.cpp +++ b/source/game/StarWorldClient.cpp @@ -1126,7 +1126,7 @@ void WorldClient::update(float dt) { if (itemDrop->canTake() && !m_requestedDrops.contains(itemDrop->entityId()) && distSquared < square(DropDist)) { m_requestedDrops.add(itemDrop->entityId()); if (m_mainPlayer->itemsCanHold(itemDrop->item()) != 0) { - itemDrop->takeBy(m_mainPlayer->entityId()); + itemDrop->takeBy(m_mainPlayer->entityId(), (float)m_latency / 1000); m_outgoingPackets.append(make_shared<RequestDropPacket>(itemDrop->entityId())); } } |