Skip to content

Commit

Permalink
Fix hat rendering order
Browse files Browse the repository at this point in the history
  • Loading branch information
vthibault committed Nov 3, 2014
1 parent 9dc2ef1 commit 40e9ed6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Renderer/Entity/EntityRender.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,21 @@ define( function( require )
// Draw Head
renderElement( this, this.files.head, 'head', _position, false);

// Draw Hats
// Hat Bottom
if (this.accessory > 0) {
renderElement( this, this.files.accessory, 'head', _position, false);
}

if (this.accessory2 > 0 && this.accessory2 !== this.accessory) {
renderElement( this, this.files.accessory2, 'head', _position, false);
}

// Hat Middle
if (this.accessory3 > 0 && this.accessory3 !== this.accessory2 && this.accessory3 !== this.accessory) {
renderElement( this, this.files.accessory3, 'head', _position, false);
}

// Hat Top
if (this.accessory2 > 0 && this.accessory2 !== this.accessory) {
renderElement( this, this.files.accessory2, 'head', _position, false);
}

// Draw Others elements
if (this.weapon > 0) {
renderElement( this, this.files.weapon, 'weapon', _position, true );
Expand Down

0 comments on commit 40e9ed6

Please sign in to comment.