Exemplo n.º 1
0
Arquivo: g_vote.c Projeto: ETrun/ETrun
// Anti-Lag
int G_AntiLag_v(gentity_t *ent, unsigned int dwVoteIndex, char *arg, char *arg2, qboolean fRefereeCmd) {
	// Vote request (vote is being initiated)
	if (arg) {
		return G_voteProcessOnOff(ent, arg2, fRefereeCmd,
		                          !!(g_antilag.integer),
		                          vote_allow_antilag.integer,
		                          dwVoteIndex);

		// Vote action (vote has passed)
	}
	// Anti-Lag (g_antilag)
	G_voteSetOnOff("Anti-Lag", "g_antilag");

	return G_OK;
}
Exemplo n.º 2
0
// *** Team Damage ***
int G_FriendlyFire_v( gentity_t *ent, unsigned int dwVoteIndex, char *arg, char *arg2, qboolean fRefereeCmd ) {
	// Vote request (vote is being initiated)
	if ( arg ) {
		return( G_voteProcessOnOff( ent, arg, arg2, fRefereeCmd,
									!!( g_friendlyFire.integer ),
									vote_allow_friendlyfire.integer,
									dwVoteIndex ) );

		// Vote action (vote has passed)
	} else {
		// Team damage (friendlyFire)
		G_voteSetOnOff( "Friendly Fire", "g_friendlyFire" );
	}

	return( G_OK );
}
Exemplo n.º 3
0
// *** Mute Spectators ***
int G_Mutespecs_v( gentity_t *ent, unsigned int dwVoteIndex, char *arg, char *arg2, qboolean fRefereeCmd ) {
	// Vote request (vote is being initiated)
	if ( arg ) {
		return( G_voteProcessOnOff( ent, arg, arg2, fRefereeCmd,
									!!( match_mutespecs.integer ),
									vote_allow_mutespecs.integer,
									dwVoteIndex ) );

		// Vote action (vote has passed)
	} else {
		// Mute/unmute spectators
		G_voteSetOnOff( "Spectator Muting", "match_mutespecs" );
	}

	return( G_OK );
}
Exemplo n.º 4
0
// Balanced Teams
int G_BalancedTeams_v( gentity_t *ent, unsigned int dwVoteIndex, char *arg, char *arg2, qboolean fRefereeCmd ) {
	// Vote request (vote is being initiated)
	if ( arg ) {
		return( G_voteProcessOnOff( ent, arg, arg2, fRefereeCmd,
									!!( g_balancedteams.integer ),
									vote_allow_balancedteams.integer,
									dwVoteIndex ) );
		// Vote action (vote has passed)
	} else {
		// Balanced Teams (g_balancedteams)
		G_voteSetOnOff( "Balanced Teams", "g_balancedteams" );
		trap_Cvar_Set( "g_teamForceBalance", level.voteInfo.vote_value );
		trap_Cvar_Set( "g_lms_teamForceBalance", level.voteInfo.vote_value );
	}

	return( G_OK );
}