Skip to content

Commit 714fa7f

Browse files
authored
Merge pull request #1231 from markski1/main
CAPI: Fix legacy slots not being released for GZ and Pickups
2 parents f234290 + d93036a commit 714fa7f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎Server/Components/CAPI/Impl/GangZones/APIs.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ OMP_CAPI(GangZone_Create, objectPtr(float minx, float miny, float maxx, float ma
4646
OMP_CAPI(GangZone_Destroy, bool(objectPtr gangzone))
4747
{
4848
POOL_ENTITY_RET(gangzones, IGangZone, gangzone, gz, false);
49+
int legacyID = gangzones->toLegacyID(gz->getID());
4950
gangzones->release(gz->getID());
50-
gangzones->releaseLegacyID(gangzones->toLegacyID(gz->getID()));
51+
gangzones->releaseLegacyID(legacyID);
5152
return true;
5253
}
5354

‎Server/Components/CAPI/Impl/Pickups/APIs.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ OMP_CAPI(Pickup_AddStatic, bool(int model, int type, float x, float y, float z,
6262
OMP_CAPI(Pickup_Destroy, bool(objectPtr pickup))
6363
{
6464
POOL_ENTITY_RET(pickups, IPickup, pickup, p, false);
65+
int legacyID = pickups->toLegacyID(p->getID());
6566
pickups->release(p->getID());
66-
pickups->releaseLegacyID(pickups->toLegacyID(p->getID()));
67+
pickups->releaseLegacyID(legacyID);
6768
return true;
6869
}
6970

0 commit comments

Comments
 (0)