Skip to content

Commit

Permalink
aoe radius fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tivvit committed Oct 12, 2023
1 parent 41c5195 commit 16e189e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions server/dungeonsandtrolls/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ func TilesInRange(game *Game, startingPosition *api.Coordinates, rng int32) []*a
return aoe
}
p := proto.Clone(startingPosition).(*api.Coordinates)
for x := startingPosition.PositionX - rng; x < startingPosition.PositionX+rng; x++ {
for x := startingPosition.PositionX - rng; x <= startingPosition.PositionX+rng; x++ {
if x < 0 || x >= lc.Height {
continue
}
p.PositionX = x
for y := startingPosition.PositionY - rng; y < startingPosition.PositionY+rng; y++ {
for y := startingPosition.PositionY - rng; y <= startingPosition.PositionY+rng; y++ {
if y < 0 || y >= lc.Width {
continue
}
Expand Down
8 changes: 4 additions & 4 deletions server/dungeonsandtrolls/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ func IsMapDeprecated(mm *LevelCache, t int32, l int32) bool {
log.Info().Msgf("%d level is deprecated due to age", l)
return true
}
if (t - mm.LastInteractedTick) > 60 {
log.Info().Msgf("%d level is deprecated due to inactivity", l)
return true
}
//if (t - mm.LastInteractedTick) > 60 {
// log.Info().Msgf("%d level is deprecated due to inactivity", l)
// return true
//}
}
return false
}
Expand Down

0 comments on commit 16e189e

Please sign in to comment.