Skip to content

Commit

Permalink
Fix IsUsesEntityDeleteRwObject
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Oct 3, 2024
1 parent ce6b190 commit 4f5aae1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Client/game_sa/CEntitySA.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class CEntitySAInterface : public CPlaceableSAInterface
((CStencilShadow_dtorByOwner)0x711730)(this);
};

bool IsUsesEntityDeleteRwObject() { return *(*reinterpret_cast<std::uint32_t**>(this) + 0x20) == 0x00534030; };
bool IsUsesEntityDeleteRwObject() const { return *reinterpret_cast<void**>(*reinterpret_cast<std::uint32_t const*>(this) + 0x20) == (void*)0x00534030; };
};
static_assert(sizeof(CEntitySAInterface) == 0x38, "Invalid size for CEntitySAInterface");

Expand Down
2 changes: 1 addition & 1 deletion Client/game_sa/CModelInfoSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ void CModelInfoSA::StaticFlushPendingRestreamIPL()
i / 2 % NUM_StreamSectorRows, i / 2 / NUM_StreamSectorCols));
// Assert in debug
#if MTA_DEBUG
assert(!pEntity->IsUsesEntityDeleteRwObject());
assert(pEntity->IsUsesEntityDeleteRwObject());
#endif
pSectorEntry = (DWORD*)pSectorEntry[1];
continue;
Expand Down

0 comments on commit 4f5aae1

Please sign in to comment.