Skip to content

Commit

Permalink
fix bug where map colors don't update when mod tiles are placed
Browse files Browse the repository at this point in the history
  • Loading branch information
blushiemagic committed Jul 31, 2015
1 parent b15469d commit ad71713
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Terraria.ModLoader/TileLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -619,12 +619,13 @@ internal static void PostDraw(int i, int j, int type, SpriteBatch spriteBatch)
}
}

//add internal int x and internal int y fields to Terraria.Map.MapTile
// change constructor, constructor uses, Equals, and EqualsWithoutLight to accomodate for this
//add internal int x, internal int y, and internal ushort modType fields to Terraria.Map.MapTile
// change constructor, constructor uses, Equals, EqualsWithoutLight, and Clear to accomodate for this
//at beginning of Terraria.Map.WorldMap.SetTile add tile.x = x; tile.y = y;
// tile.modType = Main.tile[x, y].type >= Terraria.ID.TileID.Count ? Main.tile[x, y].type : (ushort)0;
//at end of Terraria.Map.MapHelper.CreateMapTile replace return with
// MapTile mapTile = MapTile.Create((ushort)num16, (byte)num2, (byte)num);
// mapTile.x = i; mapTile.y = j; return mapTile;
// MapTile mapTile = MapTile.Create((ushort)num16, (byte)num2, (byte)num); mapTile.x = i; mapTile.y = j;
// mapTile.modType = Main.tile[i, j].type >= Terraria.ID.TileID.Count ? Main.tile[i, j].type : (ushort)0; return mapTile;
//at end of constructor for Terraria.Map.WorldMap add
// for(int x = 0; x < maxWidth; x++) { for(int y = 0; y < maxHeight; y++)
// { this._tiles[x, y].x = x; this._tiles[x, y].y = y; }}
Expand Down

0 comments on commit ad71713

Please sign in to comment.