coryshaw1 / saliens-hack

Hack for Sailens, the game of Steam Summer Sale 2018 - AutoSelect Planet, Invincibility, and InstaKill
MIT License
106 stars 31 forks source link

Run in background #3

Closed lesderid closed 6 years ago

lesderid commented 6 years ago

A new battle won't load in the background. This could possibly be fixed with: window.requestAnimationFrame = c => { setTimeout(c, 1000 / 60); };

lesderid commented 6 years ago

I'm not sure if this is possible with a user script?

Edit: It is possible, with unsafeWindow.

lesderid commented 6 years ago

Fixed in https://github.com/lesderid/saliens-hack/commit/f54c1dc303fc0cbee64f6df1501285f3fd192eb0, but it seems to always sometimes cause a GameLoadError when the window is not in focus when the battle ends and the score is sent (or on another request, I'm not sure).

Edit: The GameLoadErrors actually don't seem to be more frequent than without the patch, so it's probably just due to high server load.