Skip to content

Commit

Permalink
Mdl fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
4eb0da committed May 11, 2024
1 parent e484119 commit d0fbad3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mdl/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ function generateRibbonEmitterChunk (ribbonEmitter: RibbonEmitter): string {
generateIntPropIfNotEmpty('Gravity', ribbonEmitter.Gravity, 0) +
generateIntProp('Rows', ribbonEmitter.Rows) +
generateIntProp('Columns', ribbonEmitter.Columns) +
generateIntPropIfNotEmpty('MaterialID', ribbonEmitter.MaterialID) +
generateIntPropIfNotEmpty('MaterialID', ribbonEmitter.MaterialID, undefined) +
generateBlockEnd();
}

Expand Down
14 changes: 7 additions & 7 deletions mdl/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ function parseEventObject (state: State, model: Model): void {
strictParseSymbol(state, '}');

model.EventObjects.push(res);
model.Nodes.push(res);
model.Nodes[res.ObjectId] = res;
}

function parseCollisionShape (state: State, model: Model): void {
Expand Down Expand Up @@ -938,7 +938,7 @@ function parseCollisionShape (state: State, model: Model): void {
strictParseSymbol(state, '}');

model.CollisionShapes.push(res);
model.Nodes.push(res);
model.Nodes[res.ObjectId] = res;
}

function parseGlobalSequences (state: State, model: Model): void {
Expand Down Expand Up @@ -1173,7 +1173,7 @@ function parseParticleEmitter2 (state: State, model: Model): void {
strictParseSymbol(state, '}');

model.ParticleEmitters2.push(res);
model.Nodes.push(res);
model.Nodes[res.ObjectId] = res;
}

function parseCamera (state: State, model: Model): void {
Expand Down Expand Up @@ -1310,7 +1310,7 @@ function parseLight (state: State, model: Model): void {
strictParseSymbol(state, '}');

model.Lights.push(res);
model.Nodes.push(res);
model.Nodes[res.ObjectId] = res;
}

function parseTextureAnims (state: State, model: Model): void {
Expand Down Expand Up @@ -1372,7 +1372,7 @@ function parseRibbonEmitter (state: State, model: Model): void {
EmissionRate: null,
Rows: null,
Columns: null,
MaterialID: null,
MaterialID: 0,
Gravity: null,
Visibility: null
};
Expand Down Expand Up @@ -1431,7 +1431,7 @@ function parseRibbonEmitter (state: State, model: Model): void {
strictParseSymbol(state, '}');

model.RibbonEmitters.push(res);
model.Nodes.push(res);
model.Nodes[res.ObjectId] = res;
}

function parseFaceFX (state: State, model: Model): void {
Expand Down Expand Up @@ -1574,7 +1574,7 @@ function parseParticleEmitterPopcorn (state: State, model: Model): void {

model.ParticleEmitterPopcorns = model.ParticleEmitterPopcorns || [];
model.ParticleEmitterPopcorns.push(res);
model.Nodes.push(res);
model.Nodes[res.ObjectId] = res;
}

const parsers = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "war3-model",
"version": "3.1.0",
"version": "3.1.1",
"description": "Warcraft 3 model parser, generator, convertor and previewer",
"keywords": [
"warcraft3",
Expand Down

0 comments on commit d0fbad3

Please sign in to comment.