cleaning up cubescript hooks

- provide a function to easily assemble and execute the command
- context-selective execution of hooks
- restrict potentially exploitable or harmful hooks to singleplayer-modes
This commit is contained in:
ac-stef
2014-11-12 17:06:35 +01:00
parent 41fd31deed
commit 8604c198e9
10 changed files with 48 additions and 109 deletions
+1 -1
View File
@@ -547,7 +547,7 @@ void newmap(int *i)
if(empty_world(*i, false))
{
addmsg(SV_NEWMAP, "ri", max(*i, 0));
if(identexists("onNewMap")) execute("onNewMap");
exechook(HOOK_SP_MP, "onNewMap", "");
}
defformatstring(startmillis)("%d", millis_());
alias("gametimestart", startmillis);