summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-10-14 02:29:25 +0200
committerSergeanur <s.anureev@yandex.ua>2020-10-14 02:29:25 +0200
commita96146c87b4c5d4a630221218141e82f962a31cf (patch)
tree0dd740dbd45b14cf833b64fca7f1eb56068829d3
parentfix AskForObjectToBeRenderedInGlass (diff)
downloadre3-a96146c87b4c5d4a630221218141e82f962a31cf.tar
re3-a96146c87b4c5d4a630221218141e82f962a31cf.tar.gz
re3-a96146c87b4c5d4a630221218141e82f962a31cf.tar.bz2
re3-a96146c87b4c5d4a630221218141e82f962a31cf.tar.lz
re3-a96146c87b4c5d4a630221218141e82f962a31cf.tar.xz
re3-a96146c87b4c5d4a630221218141e82f962a31cf.tar.zst
re3-a96146c87b4c5d4a630221218141e82f962a31cf.zip
Diffstat (limited to '')
-rw-r--r--src/control/Pickups.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index eb4843c5..9215b57e 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -76,11 +76,11 @@ CPickup::GiveUsAPickUpObject(int32 handle)
{
CObject *object;
- if (handle <= 0) object = new CObject(m_eModelIndex, false);
- else {
+ if (handle >= 0) {
CPools::MakeSureSlotInObjectPoolIsEmpty(handle);
- object = new(handle) CObject(m_eModelIndex, false);
- }
+ object = new (handle) CObject(m_eModelIndex, false);
+ } else
+ object = new CObject(m_eModelIndex, false);
if (object == nil) return nil;
object->ObjectCreatedBy = MISSION_OBJECT;