scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

Location.getrandomexit has a logic bug on exitactions #409

Closed scrom closed 8 years ago

scrom commented 8 years ago

Another bug from the work on issue #400 There's a check on whether an exit has an exitaction. If it does, the exit is not usable. This code includes a check if !useexitacttion ¦¦ exitaction =="" This (I believe) is wrong, if exitaction =="" then it should be usable. The == should be replaced with a !=

Chances are this bug is a reason for a seeming drop in performance recently. There's a good chance this or a similar bug is somewhat related to creatures taking to long to get anywhere

scrom commented 8 years ago

fixed!