• Advertisement
Sign in to follow this  

Worst Hotfixes

This topic is 985 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Had a bug in our game cause a script to go into an infinite loop - this is past ship, so we had to fix it in a patch, which also meant we couldn't break any save games or the like. Due to the way the script system worked, the VM would refuse to load the fixed script function until the existing function finished running (and it wouldn't finish running because it was in an infinite loop).

The solution was to have the VM, on save game load, check to see if that specific function was running and hash the byte code. If the hash matched a pre-defined value (calculated from the buggy version of the function), it would manually adjust the loop variable in the script stack to pop it out of the loop.

This let the function exit, and the next time the function was called the fixed version was loaded and didn't cause any more issues.

And of course we fixed the bug in the game that caused the loop in the first place tongue.png

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement