Fixed a bunch of MSVS warnings

* Possibly also fixed some bugs with pathfinding and TNT, though
unlikely