Example #1
0
File: vote.c Project: deurk/ktx
void VoteYes()
{
	int votes;

	if( !get_votes( OV_ELECT ) )
		return;

	if( self->v.elect_type != etNone ) {
		G_sprint(self, 2, "You cannot vote for yourself\n");
		return;
	}

	if( self->v.elect ) {
		G_sprint(self, 2, "--- your vote is still good ---\n");
		return;
	}

// register the vote
	self->v.elect = 1;

	G_bprint(2, "%s gives %s vote\n", self->netname, g_his( self ));

// calculate how many more votes are needed
	if ( (votes = get_votes_req( OV_ELECT, true )) )
		G_bprint(2, "\x90%d\x91 more vote%s needed\n", votes, count_s( votes ));

	vote_check_elect ();
}
Example #2
0
void vote_check_all ()
{
	vote_check_map ();
	vote_check_break ();
	vote_check_elect ();
	vote_check_pickup ();
	vote_check_rpickup ();
	vote_check_nospecs ();
	vote_check_coop ();
	vote_check_antilag ();
}
Example #3
0
void VoteNo()
{
	int votes;

// withdraw one's vote
	if( !get_votes( OV_ELECT ) || self->v.elect_type != etNone || !self->v.elect )
		return;

// unregister the vote
	self->v.elect = 0;

	G_bprint(2, "%s withdraws %s vote\n", self->s.v.netname, g_his( self ));

// calculate how many more votes are needed
	if ( (votes = get_votes_req( OV_ELECT, true )) )
		G_bprint(2, "\x90%d\x91 more vote%s needed\n", votes, count_s( votes ));

	vote_check_elect ();
}