Do not leave the current area when re-checking the coverage area.

This commit is contained in:
Sascha L. Teichmann 2017-02-26 13:21:39 +01:00
parent 003ce5035a
commit 4b92a6c722
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ func UncoveredAreas(r *Renderer, newAreas, oldAreas []Area) []Area {
// Extension in x possible?
if extendDirs&1 == 1 {
nx := area.X2 + 1
if nx >= int16(r.width) {
if nx > oldArea.X2 {
extendDirs &= ^1
continue
}
@ -79,7 +79,7 @@ func UncoveredAreas(r *Renderer, newAreas, oldAreas []Area) []Area {
} else if extendDirs&2 == 2 {
// Symmetric case in z direction
nz := area.Z2 + 1
if nz >= int16(r.height) {
if nz > oldArea.Z2 {
extendDirs &= ^2
continue
}