Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A fix for Sphere games that crash when using GetPersonList.
var _GPL = GetPersonList;
GetPersonList = function() {
if (GetPersonList.updated) {
GetPersonList.list = _GPL();
GetPersonList.updated = false;
}
return GetPersonList.list;
}
GetPersonList.updated = true;
var _DestroyPerson = DestroyPerson;
DestroyPerson = function(name)
{
GetPersonList.updated = true;
_DestroyPerson(name);
}
var _CreatePerson = CreatePerson;
CreatePerson = function(name, ss, die) {
GetPersonList.updated = true;
_CreatePerson(name, ss, die);
}
var _ChangeMap = ChangeMap;
ChangeMap = function(name) {
GetPersonList.updated = true;
_ChangeMap(name);
}
var _MapEngine = MapEngine;
MapEngine = function(name, fps) {
GetPersonList.updated = true;
_MapEngine(name, fps);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.