Page 1 of 1

Firefox, Quake and attaching code while Quake runs

Posted: Tue May 17, 2011 9:28 pm
by daemonicky
It has nothing to do with Quake, but I was wondering why Firefox needs restart after plugin is installed? Is it a safety reason? Is there a big obstacle in making no need for restart?

I dont want to leave it just in not having anything to do with Quake, so what if you could get some Quake C code attached to Quake while it runs. IFUIC it is possible to add entities on the fly in Quake. So I wonder, is it possible to add functions on the fly?
Imagine being able to load some functions. And even unload them. Quake would probably shout :). But what if you paused Quake, said rocket to stop flying, exchanged behaviour of that grunt and keept on testing.

IFUIC Firefox plugins are some zipped javascript+xul . XUL is how extension looks, it is a tree data structure (XML variation), its nodes have also parameters to specify to which Firefox's windows, contextmenus, statusbars, menubars (...) are they bound. Javascript is what srcipt does, XUL has him bound to its nodes.

Is it correct, that Quake C is attached to Quake by some function pointers (or maybe indirectly by some lookup_function("prethink", compiled_quake_c)) ?

What do You think about it?

Posted: Tue May 17, 2011 10:35 pm
by mh
The size of an edict_t structure is defined by the current progs.dat so if anything in a proposed newly loaded QuakeC exceeds the old size, the engine will crash.

QC is not that flexible.

Posted: Wed May 18, 2011 12:14 am
by Spike
mh, saved games. :P

Posted: Wed May 18, 2011 9:05 am
by mh
Spike wrote:mh, saved games. :P
It was late and I wasn't thinking. At least that's what I'll tell the judge. :lol:

NQ savegames don't restore viewangles properly but one could hack together a modified format specifically for this.