ReflectionsProjections / mm21

The old one died, and I have no idea why...
0 stars 1 forks source link

visualizer crashes 20 team game #21

Closed silverdev closed 8 years ago

silverdev commented 8 years ago

src/gamerunner.py -s -th 1000 -t 20 [2][ 9:53PM] /home/sam/projects/mm21-zip/mm21-master Creating server with 20 players, and src/gamerunner/map.json as the map Running server on port 1337 Writing log to src/gamerunner/log.json Starting Game connecting ... sockets connected ... Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib64/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "src/gamerunner.py", line 243, in run turn = self.visualizer.run() File "/home/sam/projects/mm21-zip/mm21-master/src/vis/visualizer.py", line 138, in run self.change_turn(self.ticks / self.ticks_per_turn) File "/home/sam/projects/mm21-zip/mm21-master/src/vis/visualizer.py", line 184, in change_turn self.draw_json[node['id']].change_owner(node['owner']) File "/home/sam/projects/mm21-zip/mm21-master/src/vis/node.py", line 41, in change_owner self.sprite.set_at([x, y], const.TEAM_COLORS[_owner_id]) IndexError: list index out of range

ace-n commented 8 years ago

We only have 7 values for TEAM_COLORS - the same crash occurs with 8 teams. I can add more values (and proper exception handling) in a bit.

ace-n commented 8 years ago

Added an exception that checks for this; thanks @silverdev for reporting it.