clean up votes when player is disconnected

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3529 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-15 22:15:39 +00:00
parent 5ae0e098bb
commit ac4f9117d8
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -994,6 +994,12 @@ void clearvote() { DELETEP(curvote); DELETEP(calledvote); }
COMMANDN(callvote, scallvote, ARG_3STR); //fixme,ah
COMMAND(vote, ARG_1INT);
void cleanplayervotes(playerent *p)
{
if(calledvote && calledvote->owner==p) calledvote->owner = NULL;
if(curvote && curvote->owner==p) curvote->owner = NULL;
}
void whois(int cn)
{
addmsg(SV_WHOIS, "ri", cn);