Let's make sure data tile values cannot wrap around to 0
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
6f0a423e21
commit
369f89d304
@ -251,8 +251,8 @@ public class Map {
|
||||
if (prevTile==0) {
|
||||
eventTileCount++;
|
||||
}
|
||||
if (value>8192) {
|
||||
value=8192;
|
||||
if (value>8191) {
|
||||
value=8191;
|
||||
}
|
||||
data[y*Map.MAP_WIDTH+x]=(char)(value+8192);
|
||||
System.out.println("Tile "+(y*MAP_WIDTH+x)+" is now "+data[y*MAP_WIDTH+x]+".");
|
||||
|
Loading…
x
Reference in New Issue
Block a user