no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1320 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-10-01 17:13:19 +00:00
parent 7b31baaec1
commit 3c76d8c48c
4 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -723,7 +723,7 @@ void callvotesuc()
void callvoteerr(int e)
{
if(e < 0 || e >= VOTEE_NUM) return;
char *verr[VOTEE_NUM] = { "voting is currently disabled", "there is already a vote pending", "you have already voted", "vote limit reached for the current game", "you can't vote that often", "this vote is only available in multiplayer" };
char *verr[VOTEE_NUM] = { "voting is currently disabled", "there is already a vote pending", "you have already voted", "you can't vote that often", "this vote is only available in multiplayer" };
conoutf("\f3could not vote: %s", verr[e]);
DELETEP(calledvote);
}
+1 -1
View File
@@ -29,7 +29,7 @@ enum
enum { SA_KICK = 0, SA_BAN, SA_REMBANS, SA_MASTERMODE, SA_AUTOTEAM, SA_FORCETEAM, SA_GIVEMASTER, SA_MAP, SA_NUM};
enum { VOTE_NEUTRAL = 0, VOTE_YES, VOTE_NO, VOTE_NUM };
enum { VOTEE_DISABLED = 0, VOTEE_CUR, VOTEE_MUL, VOTEE_MAX, VOTEE_TLIMIT, VOTEE_DED, VOTEE_NUM };
enum { VOTEE_DISABLED = 0, VOTEE_CUR, VOTEE_MUL, VOTEE_MAX, VOTEE_DED, VOTEE_NUM };
enum { MM_OPEN, MM_PRIVATE, MM_NUM };
#define DMF 16.0f
-1
View File
@@ -363,7 +363,6 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
draw_textf("\f3vote %s", left, top+560, curvote->result == VOTE_YES ? "PASSED" : "FAILED");
break;
}
}
}
if(player1->state==CS_ALIVE)
+3 -3
View File
@@ -185,9 +185,7 @@ struct client // server side version of "dynent" type
int clientnum;
ENetPeer *peer;
string hostname;
//string mapvote; // fixme,ah
string name, team;
//int modevote; // fixme,ah
int vote;
int role;
bool isauthed; // for passworded servers
@@ -444,6 +442,7 @@ bool isdedicated;
ENetHost *serverhost = NULL;
void process(ENetPacket *packet, int sender, int chan);
void checkvotes(bool forceend=false);
void sendf(int cn, int chan, const char *format, ...)
{
@@ -689,6 +688,7 @@ void disconnect_client(int n, int reason = -1)
if(reason>=0) enet_peer_disconnect(c.peer, reason);
zapclient(n);
sendf(-1, 1, "rii", SV_CDIS, n);
checkvotes();
}
void resetitems() { sents.setsize(0); notgotitems = true; }
@@ -1208,7 +1208,7 @@ struct voteinfo
static voteinfo *curvote = NULL;
void checkvotes(bool forceend = false)
void checkvotes(bool forceend)
{
if(!curvote) return;
int stats[VOTE_NUM] = {0};