Beispiel #1
0
/*
===========
SelectCTFSpawnPoint

============
*/
gentity_t *SelectCTFSpawnPoint ( team_t team, int teamstate, vec3_t origin, vec3_t angles, qboolean isbot ) {
	gentity_t	*spot;

	spot = SelectRandomTeamSpawnPoint ( teamstate, team );

	if (!spot) {
		return SelectSpawnPoint( vec3_origin, origin, angles, isbot );
	}

	VectorCopy (spot->s.origin, origin);
	origin[2] += 9;
	VectorCopy (spot->s.angles, angles);

	return spot;
}
Beispiel #2
0
/*
===========
SelectSiegeSpawnPoint

============
*/
gentity_t *SelectSiegeSpawnPoint ( int siegeClass, team_t team, int teamstate, vec3_t origin, vec3_t angles ) {
	gentity_t	*spot;

	spot = SelectRandomTeamSpawnPoint ( teamstate, team, siegeClass );

	if (!spot) {
		return SelectSpawnPoint( vec3_origin, origin, angles, team );
	}

	VectorCopy (spot->s.origin, origin);
	origin[2] += 9;
	VectorCopy (spot->s.angles, angles);

	return spot;
}
Beispiel #3
0
/*
===========
SelectCTFSpawnPoint

============
*/
gentity_t *SelectCTFSpawnPoint ( team_t team, int teamstate, bvec3_t origin, avec3_t angles ) {
	gentity_t	*spot;

	spot = SelectRandomTeamSpawnPoint ( teamstate, team );

	if (!spot) {
		return SelectSpawnPoint( bvec3_origin, origin, angles );
	}

	VectorCopy (spot->s.origin, origin);
	origin[2] += BFIXED(9,0);
	VectorCopy (spot->s.angles, angles);

	return spot;
}
Beispiel #4
0
/*
 * Select a spawn point for a player
 * @author: Nico
 */
static gentity_t *SelectPlayerSpawnPoint(team_t team, vec3_t origin, vec3_t angles, int spawnObjective) {
	gentity_t *spot;

	spot = SelectRandomTeamSpawnPoint(team, spawnObjective);

	if (!spot) {
		return SelectSpawnPoint(vec3_origin, origin, angles);
	}

	VectorCopy(spot->s.origin, origin);
	origin[2] += 9;
	VectorCopy(spot->s.angles, angles);

	return spot;
}
Beispiel #5
0
/*
===========
SelectCTFSpawnPoint

============
*/
gentity_t *SelectCTFSpawnPoint ( team_t team, int teamstate, vec3_t origin, vec3_t angles ) {
	gentity_t	*spot;

	spot = SelectRandomTeamSpawnPoint ( teamstate, team );

	if (!spot) {
		G_Printf( S_COLOR_RED "Couldn't find a team spawn point!\n" );
		return SelectSpawnPoint( vec3_origin, origin, angles );
	}

	VectorCopy (spot->s.origin, origin);
	origin[2] += 9;
	VectorCopy (spot->s.angles, angles);

	return spot;
}
/*
===========
SelectCTFSpawnPoint

============
*/
gentity_t *SelectCTFSpawnPoint ( team_t team, int teamstate, vec3_t origin, vec3_t angles, qboolean isbot ) {
	gentity_t	*spot;

	spot = SelectRandomTeamSpawnPoint ( teamstate, team );

	// TODO: don't look for info_player_deathmatch, exit with a meaningful msg instead
	if (!spot) {
		return SelectSpawnPoint( vec3_origin, origin, angles, isbot );
	}

	VectorCopy (spot->s.origin, origin);
	origin[2] += 9;
	VectorCopy (spot->s.angles, angles);

	return spot;
}
Beispiel #7
0
/*
 * SelectCTFSpawnPoint
 *
 */
Gentity *
SelectCTFSpawnPoint(Team team, int teamstate, Vec3 origin, Vec3 angles,
		    qbool isbot)
{
	Gentity *spot;

	spot = SelectRandomTeamSpawnPoint (teamstate, team);

	if(!spot)
		return SelectSpawnPoint(vec3_origin, origin, angles, isbot);

	copyv3 (spot->s.origin, origin);
	origin[2] += 9;
	copyv3 (spot->s.angles, angles);

	return spot;
}