v0.5.0b: added a safety check to stop fog of war from being updated out of bounds
This commit is contained in:
@@ -127,6 +127,7 @@ public class FogOfWar extends Image {
|
||||
public synchronized void updateFogArea(int x, int y, int w, int h){
|
||||
updated.union(x, y);
|
||||
updated.union(x + w, y + h);
|
||||
updated = updated.intersect( new Rect(0, 0, mapWidth, mapHeight) );
|
||||
}
|
||||
|
||||
public synchronized void moveToUpdating(){
|
||||
|
||||
Reference in New Issue
Block a user