flags / Reactor-3

Post-apocalyptic action roguelike with a focus on inventory management and gun-based combat.
MIT License
71 stars 11 forks source link

List index out of range #130

Open gimpycoder opened 10 years ago

gimpycoder commented 10 years ago

I generated a sparse world and headed south. I found an area on the map where there were no blocking tiles and so I went that direction thinking that I might go into another area (brand new to this game). Upon doing so, the game crashed out with the following trace:

Traceback (most recent call last): File "reactor-3.py", line 373, in loop() File "reactor-3.py", line 290, in loop main() File "reactor-3.py", line 217, in main if logic.tick_all_objects(ignore_tickrate=True): File "/Reactor-3-master/logic.py", line 79, in tick_all_objects life.tick_all_life() File "/Reactor-3-master/life.py", line 1911, in tick_all_life perform_action(life) File "/Reactor-3-master/life.py", line 1304, in perform_action if tuple(_action['to']) == tuple(life['pos']) or walk(life, to=_action['to']): File "/Reactor-3-master/life.py", line 1115, in walk _zone = can_walk_to(life, to) File "/Reactor-3-master/life.py", line 1011, in can_walk_to _z2 = zones.get_zone_at_coords(pos) File "/Reactor-3-master/zones.py", line 168, in get_zone_at_coords _map_pos = WORLD_INFO['map'][pos[0]][pos[1]][pos[2]] IndexError: list index out of range [14:52:43 04/28/14-DEBUG] ChunkHandler thread shutting down.

gimpycoder commented 10 years ago

I reloaded the game and went to the same area. To reproduce requires a diagonal movement (I used numpad 3) in south east direction. This is what causes the overflow.