onDisconnect alias now returns the clientnumber (-1 for local players)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7142 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
aerkefiende
2013-01-27 20:42:33 +00:00
parent 466461fc20
commit 49ea40557a
2 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -208,7 +208,11 @@ void disconnect(int onlyclean, int async)
#endif
if(!onlyclean) localconnect();
if(identexists("onDisconnect")) execute("onDisconnect");
if(identexists("onDisconnect"))
{
defformatstring(ondisconnect)("onDisconnect %d", -1);
execute(ondisconnect);
}
}
void trydisconnect()