From 94e32a577348b119c65f79d9cd101f13a1d400cb Mon Sep 17 00:00:00 2001 From: Jett <55758076+Jettford@users.noreply.github.com> Date: Sat, 11 Dec 2021 14:24:25 +0000 Subject: [PATCH] replace the other double cast --- dGame/Entity.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 0579035e..dbb44f2f 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -1658,9 +1658,10 @@ bool Entity::CanPickupCoins(uint64_t count) { // bool because we are returning w void Entity::RegisterCoinDrop(uint64_t count) { if (!IsPlayer()) return; - auto droppedcoins = static_cast(this)->GetDroppedCoins(); + auto * player = static_cast(this); + auto droppedcoins = player->GetDroppedCoins(); droppedcoins += count; - static_cast(this)->SetDroppedCoins(droppedcoins); + player->SetDroppedCoins(droppedcoins); } void Entity::AddChild(Entity* child) {