From: Marcus A. <maa...@ra...> - 2002-12-29 19:29:34
|
We should probably spit out a warning message if some unit gets stuck somehow with a calculated speed of 0.00. I don't understand how this happened, tho. Merry Christmas. Marcus calculateMovementSpeed: base speed 10, modified speed 0.83: calculateMovementDeltas: 353.130540 0.833333 0.734327 -0.393964 calculateMovementSpeed: base speed 10, modified speed 1.67: calculateMovementDeltas: 99.800000 1.666667 1.666667 0.000000 calculateMovementSpeed: base speed 10, modified speed 1.67: calculateMovementDeltas: 97.785058 1.666667 1.664048 -0.093390 calculateMovementSpeed: base speed 10, modified speed 0.00: Oops, something went wrong. Dumping brain contents: --------------------------------------------------------------------------- Traceback (most recent call last): File "civil.py", line 486, in ? main () File "civil.py", line 478, in main event_loop () File "event_loop.py", line 274, in event_loop newstate = scenario.current_state.handleEvent ( event ) File "state/calculate_action.py", line 67, in handleEvent scenario.engine.update () File "engine/engine.py", line 142, in update self.updateForStep ( step ) File "engine/engine.py", line 197, in updateForStep self.runExecutor ( unit, step ) File "engine/engine.py", line 270, in runExecutor actiondata = planexec.execute ( step ) File "engine/executor/move_exec.py", line 109, in execute return self.move (step) File "engine/executor/move_exec.py", line 122, in move self.movespeed ) File "engine/executor/move_util.py", line 97, in calculateMovementDeltas turns_needed = distance / float(speed) ZeroDivisionError: float division --------------------------------------------------------------------------- -- Marcus |