Fixed random spawn function, not yet integrated with GameMode.