Skip to content

Instantly share code, notes, and snippets.

@Radnen
Created August 30, 2013 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Radnen/6386456 to your computer and use it in GitHub Desktop.
Save Radnen/6386456 to your computer and use it in GitHub Desktop.
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