This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/1007981/how-to-get-function-parameter-names-values-dynamically | |
var STRIP_COMMENTS = /(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,\)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,\)]*))/mg; | |
var ARGUMENT_NAMES = /([^\s,]+)/g; | |
function getParamNames(func) { | |
var fnStr = func.toString().replace(STRIP_COMMENTS, ''); | |
var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); | |
if (result === null) | |
return []; | |
return result; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This contains some of orteil's code, THIS IS NOT MINE! The 60FPS patch is mine however. | |
var CC60_Counter = 0 | |
Game.Logic=function() | |
{ | |
CC60_Counter += 30 / Game.fps | |
if (CC60_Counter >= 1) CC60_Counter = 0 |