Пример #1
0
LOCAL void TP_Msg_GetPentQuad(qbool quad)
{
	extern cvar_t tp_name_quad, tp_name_pent;
	MSGPART get = "get";
	MSGPART powerup = "";

	TP_FindPoint();
 
	if (quad)
	{
		if (INPOINT(eyes) && INPOINT(quaded))
			return; // Don't know for sure if it's enemy or not, and can't assume like we do in tp_enemypwr because this isn't tp_ENEMYpwr
		else if (HAVE_QUAD() || INPOINT(quaded)) {
			TP_Msg_EnemyPowerup_f(); // let tp_msgenemypwr handle it. Also works for the case that we have quad and are dead
			return;
		}
		else
			powerup = tp_name_quad.string;
	}
	else // get pent
	{
		if (INPOINT(eyes) && INPOINT(pented))
			return; // Don't know for sure if it's enemy or not, and can't assume like we do in tp_enemypwr because this isn't tp_ENEMYpwr
		else if (HAVE_PENT() || INPOINT(pented)) { // if anyone has pent, as long as they dont have ring
			TP_Msg_EnemyPowerup_f(); // send to tp_enemypwr
			return;
		}			
		else
			powerup = tp_name_pent.string;
	}
 
	TP_Send_TeamSay("%s %s", get, powerup);
}
Пример #2
0
GLOBAL void TP_Msg_Safe_f (void)
{
	extern cvar_t tp_name_rlg, tp_name_separator;
	MSGPART armor = "";
	MSGPART separator = "";
	MSGPART weapon = "";

	if (DEAD())
		return;

	TP_FindPoint(); // needed to make sure the area is, in fact, safe
	if (INPOINT(enemy) && !(INPOINT(quaded) || INPOINT(pented))) {
		return; //if you see an enemy without powerup, the place is still not 100% safe. But maybe you can handle him, so don't report anything yet.
	}
	if (INPOINT(enemy) && (INPOINT(quaded) || INPOINT(pented))) {
		TP_Msg_EnemyPowerup_f(); // if you see an enemy with a powerup, place is definitely not secure. report enemy powerup.
		return;
	}
	
	if ((HAVE_RA() || HAVE_YA() || HAVE_GA()) && (HAVE_RL() || HAVE_LG()))
		separator = tp_name_separator.string;
	if (HAVE_RA() || HAVE_YA() || HAVE_GA())
		armor = "$colored_armor";
	if (HAVE_RL() && HAVE_LG())
		weapon = tp_name_rlg.string;
	else if (HAVE_RL() || HAVE_LG())
		weapon = "$bestweapon";
	TP_Send_TeamSay("%s %s%s%s", "{&c0b0safe&cfff} {&c0b0[&cfff}{%l}{&c0b0]&cfff}", armor, separator, weapon);
}
Пример #3
0
LOCAL void TP_Msg_GetPentQuad(qbool quad)
{
	MSGPART get_powerup = "";

	TP_FindPoint();
 
	if (quad)
	{
		if (DEAD() && HAVE_QUAD())
		{ // player messed up, he's dead with quad, so there's no quad to get!
			TP_Msg_Lost_f();
			return;
		}
		else if (INPOINT(eyes) && INPOINT(quaded))
		{
			return; // Don't know for sure if it's enemy or not, and can't assume like we do in tp_enemypwr because this isn't tp_ENEMYpwr
		}
		else if (INPOINT(quaded))
		{
			TP_Msg_EnemyPowerup_f(); // let tp_msgenemypwr handle it...
			return;
		}
		else
		{
			get_powerup = "get " tp_ib_name_quad;
		}
	}
	else // get pent
	{
		if (INPOINT(eyes) && INPOINT(pented))
		{
			return; // Don't know for sure if it's enemy or not, and can't assume like we do in tp_enemypwr because this isn't tp_ENEMYpwr
		}
		else if (HAVE_PENT() || INPOINT(pented)) // if anyone has pent, as long as they dont have ring
		{
			TP_Msg_EnemyPowerup_f(); // send to tp_enemypwr
			return;
		}			
		else
		{
			get_powerup = "get " tp_ib_name_pent;
		}
	}
 
	//$Y$Y get powerup(1)
	TP_Send_TeamSay("%s", get_powerup);
}
Пример #4
0
GLOBAL void TP_Msg_QuadDead_f (void)
{
	extern cvar_t tp_name_quad;
    MSGPART quad = tp_name_quad.string;
	MSGPART dead = "dead/over";

	TP_FindPoint();
	if (HAVE_QUAD() && DEAD()) {
		TP_Msg_Lost_f(); // we use this function because it checks for dropped RL's, etc
		return;
	}
	else if (INPOINT(quaded)) { // This check is to make sure the button is not pressed accidentally.
		TP_Msg_EnemyPowerup_f(); // tp_enemypwr can handle this & all cases regarding players/powerups
		return;
	}

	TP_Send_TeamSay("%s %s", quad, dead);
}
Пример #5
0
GLOBAL void TP_Msg_QuadDead_f (void)
{
    MSGPART quad_dead = "";

	TP_FindPoint();
 
	if (DEAD() && HAVE_QUAD()) // when you have quad and you die, before you spawn you're still glowing (in some mods/settings), meaning you have quad. this check is necessary!
	{
		TP_Msg_Lost_f();
		return;
	}
	else if (HAVE_QUAD() || INPOINT(quaded)) // If ANYONE has quad
	{ // This check is to make sure the button is not pressed accidentally. (how can you report quad dead if you see quad?)
		TP_Msg_EnemyPowerup_f(); // tp_enemypwr can handle this & all cases regarding players/powerups
		return;
	}
	else quad_dead = tp_ib_name_quad " dead/over";

	TP_Send_TeamSay("%s",quad_dead);
}
Пример #6
0
GLOBAL void TP_Msg_Point_f (void)
{
	extern cvar_t tp_name_quad, tp_name_pent, tp_name_ring, tp_name_lg, tp_name_rl, tp_name_gl, tp_name_sng, tp_name_backpack,
		tp_name_ra, tp_name_ya, tp_name_ga, tp_name_cells, tp_name_rockets, tp_name_nails, tp_name_shells, tp_name_mh,
		tp_name_flag, tp_name_disp,	tp_name_sentry, tp_name_rune1, tp_name_rune2, tp_name_rune3, tp_name_rune4, tp_name_teammate, tp_name_enemy;
	MSGPART point = "";	
	MSGPART at_location = "at $[{%y}$] {%E}";
	MSGPART enemy = "";
	MSGPART powerup = "";
 
    if (flashed) // for teamfortres.
			return;

    TP_FindPoint();

	if (POINT_EMPTY())
		return;
	else if (INPOINT(eyes) || INPOINT(quaded) || INPOINT (pented)) {
		TP_Msg_EnemyPowerup_f(); // we use tp_enemypwr because it checks for all cases of player + powerup =)
		return;
	}

	// if you see something other than a player with powerup
	if (INPOINT(enemy))	{
		point = "{%E}";
		enemy = tp_name_enemy.string;
		at_location = " at $[{%y}$]"; // here we change at_location (remove {%E} at the end) because our point says how many enemies we have.
	}
	else if (INPOINT(teammate))	{
		if (tp_name_teammate.string[0]) // This will print the nick of your teammate if tp_name_teammate "" (not set). Else, it will print the value for tp_name_teammate
			point = tp_name_teammate.string;
		else
			point = va ("{&c0b0%s&cfff}", Macro_PointName());
	}
	else if (INPOINTPOWERUP() || INPOINTWEAPON() || INPOINTARMOR() || INPOINTAMMO() || INPOINT(pack) || INPOINT(mh) || INPOINT(flag) || INPOINT (disp) || INPOINT(sentry) || INPOINT(runes)) {
		if		(INPOINT(quad))		point = tp_name_quad.string;
		else if (INPOINT(pent))		point = tp_name_pent.string;
		else if (INPOINT(ring))		point = tp_name_ring.string;
		
		else if (INPOINT(rl))		point = tp_name_rl.string;
		else if (INPOINT(lg))		point = tp_name_lg.string;
		else if (INPOINT(gl))		point = tp_name_gl.string;
		else if (INPOINT(sng))		point = tp_name_sng.string;
		else if (INPOINT(pack))		point = tp_name_backpack.string;
		
		else if (INPOINT(ra))		point = tp_name_ra.string;
		else if (INPOINT(ya))		point = tp_name_ya.string;
		else if (INPOINT(ga))		point = tp_name_ga.string;
		
		else if (INPOINT(rockets)) 	point = tp_name_rockets.string;
		else if (INPOINT(cells)) 	point = tp_name_cells.string;
		else if (INPOINT(nails)) 	point = tp_name_nails.string;
		else if (INPOINT(shells)) 	point = tp_name_shells.string;
		
		else if (INPOINT(mh))		point = tp_name_mh.string;
		
		//TF. Note we can't tell whether they are enemy or team flag/disp/sent
		else if (INPOINT(flag))		point = tp_name_flag.string;
		else if (INPOINT(disp))		point = tp_name_disp.string;
		else if (INPOINT(sentry))	point = tp_name_sentry.string;
		
		//ctf, other
		else if (INPOINT(rune1))	point = tp_name_rune1.string;
		else if (INPOINT(rune2))	point = tp_name_rune2.string;
		else if (INPOINT(rune3))	point = tp_name_rune3.string;
		else if (INPOINT(rune4))	point = tp_name_rune4.string;
	}
	else point = "{$point}"; // this should never happen

	TP_Send_TeamSay("%s%s %s%s", powerup, point, enemy, at_location);
}
Пример #7
0
GLOBAL void TP_Msg_Point_f (void)
{
	MSGPART point = "";
	MSGPART at_location = "";
	MSGPART powerup = "";
 
    if (flashed) return;
    TP_FindPoint();

	if (POINT_EMPTY())
		return;
	else if (INPOINT(eyes) || INPOINT(quaded) || INPOINT (pented)) // anyone with powerup
	{
		TP_Msg_EnemyPowerup_f(); // we use tp_enemypwr because it checks for all cases of player + powerup =)
		return;
	}
	else
	{
		at_location = "at $[{%y}$] %E"; // this has to be established at the beginning because it's the same for all cases except when you see enemy.
	
		if (INPOINT(enemy))
		{
			point = "%E " tp_ib_name_enemy;
			at_location = "at $[{%y}$]"; // here we change at_location because our point says how many enemies we have.
		}
		else if (INPOINT(teammate))
		{
			if (tp_name_teammate.string[0])
				point = tp_ib_name_teammate;
			else
				point = va ("{&c0b0%s&cfff}", Macro_PointName());
		}
		else if (INPOINTPOWERUP() || INPOINTWEAPON() || INPOINTARMOR() || INPOINTAMMO() || INPOINT(pack) || INPOINT(mh) || INPOINT(flag) || INPOINT (disp) || INPOINT(sentry) || INPOINT(runes)) // How can I do if INPONIT(anything) or if INPOINT() not empty?
		//  flag, disp, sent, rune
		{
			if (INPOINT(quad))			point = tp_ib_name_quad;
			else if (INPOINT(pent))		point = tp_ib_name_pent;
			else if (INPOINT(ring))		point = tp_ib_name_ring;
			
			else if (INPOINT(rl))		point = tp_ib_name_rl;
			else if (INPOINT(lg))		point = tp_ib_name_lg;
			else if (INPOINT(gl))		point = tp_ib_name_gl;
			else if (INPOINT(sng))		point = tp_ib_name_sng;
			else if (INPOINT(pack))		point = tp_ib_name_backpack;
			
			else if (INPOINT(ra))		point = tp_ib_name_ra;
			else if (INPOINT(ya))		point = tp_ib_name_ya;
			else if (INPOINT(ga))		point = tp_ib_name_ga;
			
			else if (INPOINT(rockets)) 	point = "{$point}";
			else if (INPOINT(cells)) 	point = "{$point}";
			else if (INPOINT(nails)) 	point = "{$point}";
			
			else if (INPOINT(mh))		point = tp_ib_name_mh;
			
			//TF
			else if (INPOINT(flag))		point = tp_ib_name_flag; // note we cannot tell if it's enemy or team flag (needs fix!)
			else if (INPOINT(disp))		point = "{$point}";	// note we cannot tell if it's enemy or team disp
			else if (INPOINT(sentry))	point = "{$point}"; // note we cannot tell if it's enemy or team sent
			
			//ctf, other
			else if (INPOINT(rune1))	point = "$tp_name_rune1";
			else if (INPOINT(rune2))	point = "$tp_name_rune2";
			else if (INPOINT(rune3))	point = "$tp_name_rune3";
			else if (INPOINT(rune4))	point = "$tp_name_rune4";
		}
		else point = "{$point}"; // this should never happen
	}
	
	/* I think it is confusing to include this in the message, it will look like this for example: "Up2: Q pack at [loc]". Not sure if letting teammates know we have quad is important!
		if (HAVE_POWERUP())
			powerup = "$colored_short_powerups ";
		else
			powerup = "";
	*/

	//led(1) item(2) at loc(3)
	TP_Send_TeamSay("%s%s %s", powerup, point, at_location);
}