map[event](map, world)
var f = obj.func;f();
Are you sure using 'this' works properly? I haven't tested it yet, but I just skimmed through the code and discovered that you're calling event functions like this:Code: (javascript) [Select]map[event](map, world)...which passes the global object as 'this'. You should be using the .call method...
var fn = obj.fn;fn(1, 2, 3);
fn(1, 2, 3); // `this` is the global object (see footnote 1)obj.fn = fn;obj.fn(1, 2, 3); // `this` is obj
obj["func"]();
var tmp = obj["func"];tmp();
var tmp = obj["func"];tmp.call(obj);
({enter: function(map, world) { world.cows_eat_kitties = "Meoowww--MOOOOoooooo! ...*munch*"; },kitty: { talk: function(self, world) { Abort(world.cows_eat_kitties); // undefined?! wtf }})