Fixed a bug and changed config var to globalconfig

The code counting the number of living players was using the wrong
terminating condition when iterating through the controller list