Skip to content

Commit

Permalink
terrain_project_importer.as: Fixed importing terrain without races.
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp committed Dec 9, 2024
1 parent 1800cf5 commit 042dde6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions resources/scripts/terrain_project_importer.as
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ void initializeRacesData()
result = game.getScriptVariable('races', races, terrnScriptNid);
if (result < 0)
{
stage = STAGE_ERROR;
error = " game.getScriptVariable() returned "+result;
// there are no races (race system not even loaded by the terrain script).
return;
}

Expand Down Expand Up @@ -513,6 +512,13 @@ void getProject()
//#region STAGE_WRITERACES
void writeNextRace()
{
if (races.raceList.length() == 0)
{
// write terrain anyway because of updated Name=
stage=STAGE_WRITETERRN2;
return;
}

for (uint i=0; i < races.raceList.length(); i++)
{
if (int(i) <= topWrittenRace)
Expand Down

0 comments on commit 042dde6

Please sign in to comment.