Skip to content

Commit

Permalink
fix entity names for "Detect Entities" button
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Mar 28, 2024
1 parent 70c69a7 commit f230f31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QtHelpers/ItemModelVirtualTable.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "QtHelpers/ItemModelVirtualTable.h"
#include "Configuration.h"
#include "Data/Entity.h"
#include "Data/State.h"
#include "Data/VirtualTableLookup.h"
#include "Spelunky2.h"
Expand Down Expand Up @@ -99,11 +100,10 @@ void S2Plugin::ItemModelVirtualTable::detectEntities()
for (auto x = 0; x < maximum; ++x)
{
auto entityPtr = layerEntities + (x * sizeof(size_t));
auto entity = Script::Memory::ReadQword(entityPtr);
auto entityVTableOffset = Script::Memory::ReadQword(entity);
Entity entity = Script::Memory::ReadQword(entityPtr);
auto entityVTableOffset = Script::Memory::ReadQword(entity.ptr());

// auto entityUid = Script::Memory::ReadDword(entity + 56);
auto entityName = Configuration::get()->getEntityName(entity);
auto entityName = entity.entityTypeName();
Spelunky2::get()->get_VirtualTableLookup().setSymbolNameForOffsetAddress(entityVTableOffset, entityName);
}
};
Expand Down

0 comments on commit f230f31

Please sign in to comment.