diff options
| author | inspectredc <inspectredc@gmail.com> | 2024-04-23 12:20:53 +0100 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2024-04-23 10:31:22 -0600 |
| commit | fc5e60f05edf16ae5e8b6e5e51c410ea236b259e (patch) | |
| tree | e128bbdceeae8a4663f11fd147b94232280ce9d3 /src | |
| parent | 8aea1f89812ff7a4fba47f840d7a68be2c71bd3f (diff) | |
only check ptr not null
Diffstat (limited to 'src')
| -rw-r--r-- | src/factories/sm64/GeoLayoutFactory.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/factories/sm64/GeoLayoutFactory.cpp b/src/factories/sm64/GeoLayoutFactory.cpp index 16a2f57..4970c22 100644 --- a/src/factories/sm64/GeoLayoutFactory.cpp +++ b/src/factories/sm64/GeoLayoutFactory.cpp @@ -8,14 +8,11 @@ uint64_t RegisterAutoGen(uint32_t ptr, std::string type) { - const auto segment = Companion::Instance->GetCurrSegmentNumber(); - if (segment.has_value()) { - if (SEGMENT_NUMBER(ptr) == segment.value()) { - YAML::Node node; - node["type"] = type; - node["offset"] = ptr; - Companion::Instance->AddAsset(node); - } + if (ptr != 0) { + YAML::Node node; + node["type"] = type; + node["offset"] = ptr; + Companion::Instance->AddAsset(node); } return ptr; |
