Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Fix IsEntity sometimes returning true for previously deleted entities
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammie committed Sep 24, 2023
1 parent 1b00903 commit 7b6439d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libs/core/src/internal_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,10 @@ DATA *COMPILER::BC_CallIntFunction(uint32_t func_code, DATA *&pVResult, uint32_t
}
pV->Get(ent);
core.EraseEntity(ent);

// Make sure to clear entity id
ent = invalid_entity;
pV->Set(ent);
break;
//
case FUNC_DEL_EVENT_HANDLER:
Expand Down

0 comments on commit 7b6439d

Please sign in to comment.