Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateLighting()

bool Terraria.Map.WorldMap.UpdateLighting ( int x,
int y,
byte light )
inline

Definition at line 48 of file WorldMap.cs.

49 {
50 MapTile other = _tiles[x, y];
51 if (light == 0 && other.Light == 0)
52 {
53 return false;
54 }
55 MapTile mapTile = MapHelper.CreateMapTile(x, y, Math.Max(other.Light, light));
56 if (mapTile.Equals(ref other))
57 {
58 return false;
59 }
60 _tiles[x, y] = mapTile;
61 return true;
62 }
static byte Max(byte val1, byte val2)
Definition Math.cs:738
MapTile[,] _tiles
Definition WorldMap.cs:17

References Terraria.Map.WorldMap._tiles, Terraria.Map.MapHelper.CreateMapTile(), Terraria.Map.MapTile.Equals(), System.Math.Max(), and System.other.