gave the gamestate thing a try, had to revert... here's some unaffectes code