Fix error in LOAD_MODEL_FROM_GEO_EXT (level gen)
This commit is contained in:
parent
d92c9dcfd4
commit
4a89900a8b
|
@ -1369,6 +1369,7 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) {
|
|||
|
||||
static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode<LevelScript>* aNode, u64& aTokenIndex, bool* found) {
|
||||
String _Arg = aNode->mTokens[aTokenIndex++];
|
||||
*found = true;
|
||||
|
||||
// Integers
|
||||
bool integerFound = false;
|
||||
|
@ -1766,7 +1767,7 @@ static void ParseLevelScriptSymbol(GfxData* aGfxData, DataNode<LevelScript>* aNo
|
|||
// LOAD_MODEL_FROM_GEO
|
||||
if (_Symbol == "LOAD_MODEL_FROM_GEO") {
|
||||
u64 topTokenIndex = aTokenIndex;
|
||||
bool foundGeo = true;
|
||||
bool foundGeo = false;
|
||||
LevelScript model = ParseLevelScriptSymbolArg(aGfxData, aNode, aTokenIndex);
|
||||
LevelScript geo = ParseLevelScriptSymbolArgInternal(aGfxData, aNode, aTokenIndex, &foundGeo);
|
||||
if (foundGeo) {
|
||||
|
@ -1776,7 +1777,7 @@ static void ParseLevelScriptSymbol(GfxData* aGfxData, DataNode<LevelScript>* aNo
|
|||
aHead += (sizeof(_Ls) / sizeof(_Ls[0]));
|
||||
} else {
|
||||
u32 geoIndex = DynOS_Lua_RememberVariable(aGfxData, aHead + 1, aNode->mTokens[topTokenIndex + 1]);
|
||||
LevelScript _Ls[] = { LOAD_MODEL_FROM_GEO_EXT(model, geo) };
|
||||
LevelScript _Ls[] = { LOAD_MODEL_FROM_GEO_EXT(model, geoIndex) };
|
||||
memcpy(aHead, _Ls, sizeof(_Ls));
|
||||
aHead += (sizeof(_Ls) / sizeof(_Ls[0]));
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ const LevelScript level_main_scripts_entry[] = {
|
|||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_METAL_CAP, marios_metal_cap_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_WING_CAP, marios_wing_cap_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), // repeated
|
||||
//LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), // repeated
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY_CUTSCENE, bowser_key_cutscene_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY, bowser_key_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME_SHADOW, red_flame_shadow_geo),
|
||||
|
|
Loading…
Reference in New Issue