home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e59dd4b
)
Server: Fix bug of ai module's dijkstra_map() hanging on too large maps.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 7 Jul 2014 15:06:36 +0000
(17:06 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 7 Jul 2014 15:06:36 +0000
(17:06 +0200)
src/server/ai.c
patch
|
blob
|
history
diff --git
a/src/server/ai.c
b/src/server/ai.c
index ff883dd7fef2bab1306fb5e7f3730b941a9e7e4a..bc78e06c64dc31f60574ac505561ab06f46a408f 100644
(file)
--- a/
src/server/ai.c
+++ b/
src/server/ai.c
@@
-88,7
+88,8
@@
static void get_neighbor_scores(uint16_t * score_map, uint16_t pos_i,
static void dijkstra_map(uint16_t * score_map, uint16_t max_score)
{
uint32_t map_size = world.map.length * world.map.length;
- uint16_t pos, i_scans, neighbors[N_DIRS], min_neighbor;
+ uint32_t pos;
+ uint16_t i_scans, neighbors[N_DIRS], min_neighbor;
uint8_t scores_still_changing = 1;
uint8_t i_dirs;
for (i_scans = 0; scores_still_changing; i_scans++)