Example #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);
}
Example #2
0
GLOBAL void TP_Msg_Lost_f (void)
{
    MSGPART quad = "";
	MSGPART over = "";
	MSGPART dropped_or_lost = "";
	MSGPART location_enemy = " {&cf00[&cfff}{%d}{&cf00]&cfff} {%E}";
	extern cvar_t tp_name_quad;

	if (DEAD()) {
		if (HAVE_QUAD()) {
			quad = tp_name_quad.string;			
			over = " over ";
			location_enemy = "{&cf00[&cfff}{%d}{&cf00]&cfff} {%E}";
		}
		else
			dropped_or_lost = "{&cf00lost&cfff}";

		if (HOLD_RL() || HOLD_LG()) {
			dropped_or_lost = "{&cf00DROPPED} $weapon";
			location_enemy = " {&cf00[&cfff}{%d}{&cf00]&cfff} {%E}";
		}
	}
	else
		dropped_or_lost = "{&cf00lost&cfff}";

	TP_Send_TeamSay("%s%s%s%s", quad, over, dropped_or_lost, location_enemy);
}
Example #3
0
GLOBAL void TP_Msg_Lost_f (void)
{ // Even though tp_msgreport is the same thing as this when dead, it's still useful to have tp_msglost for reporting last lost location after respawning
    MSGPART msg1 = "";
	MSGPART msg2 = "";
	if (DEAD())
	{
		if (HAVE_QUAD())
		{
		msg1 = tp_ib_name_quad " over ";
		}
 
		if (HOLD_RL() || HOLD_LG() || HOLD_GL()) // gl could be useful too
		{
			msg2 = "{&cf00lost&cfff} "  COLORED(f0f,$weapon) " $[{%d}$] %E";
		}
		else
		{
			msg2 = "{&cf00lost&cfff} $[{%d}$] %E";
		}
	}
	else // if currently alive, then report last death location
		msg1 = "{&cf00lost&cfff} $[{%d}$] %E";
		
    TP_Send_TeamSay("%s%s", msg1, msg2);
}
Example #4
0
GLOBAL void TP_Msg_Took_f (void)
{
	extern cvar_t tp_name_lg, tp_name_rl, tp_name_gl, tp_name_sng, tp_name_backpack, tp_name_cells, tp_name_rockets, tp_name_mh,
		tp_name_ra, tp_name_ya, tp_name_ga, tp_name_flag, tp_name_rune1, tp_name_rune2, tp_name_rune3, tp_name_rune4;
	MSGPART took = "";
	MSGPART at_location = " $[{%Y}$]"; // %Y is took location, remembers for 15 secs
	MSGPART powerup = "";
	MSGPART took_msg = "";
 
	if (TOOK_EMPTY())
		return;
	
	if (TOOK(quad) || TOOK(pent) || TOOK(ring)) {
		TP_GetNeed();
		
		if (DEAD())	{
			TP_Msg_QuadDead_f();
			return;
		}
		
		// Note that we check if you are holding powerup. This is because TOOK remembers for 15 seconds.
		// So a case could arise where you took quad then died less than 15 seconds later, and you'd be reporting "team need %u" (because $colored_powerups would be empty)
		else if ((NEED(health) || NEED(armor) || NEED_WEAPON() || NEED(rockets) || NEED(cells)) && HAVE_POWERUP())
			took = "{&c0b0team&cfff} $colored_powerups need %u";
		else if (HAVE_QUAD() || HAVE_RING()) // notice we can't send this check to tp_msgenemypwr, because if enemy with powerup is in your view, tp_enemypwr reports enemypwr first, but in this function you want to report TEAM powerup.
			took = "{&c0b0team&cfff} $colored_powerups";
		else { // In this case, you took quad or ring and died before 15 secs later. So just report what you need, nothing about powerups.
			took = "need %u"; //notice we don't say quad over, because it could be that you held ring. No way to distinguish
		}
	}
	else {
		if		(TOOK(rl))			took = tp_name_rl.string;
		else if (TOOK(lg))			took = tp_name_lg.string;
		else if (TOOK(gl))			took = tp_name_gl.string;
		else if (TOOK(sng))			took = tp_name_sng.string;
		else if (TOOK(pack))    	took = tp_name_backpack.string;
		else if (TOOK(cells))		took = tp_name_cells.string;
		else if (TOOK(rockets))		took = tp_name_rockets.string;
		else if (TOOK(mh))			took = tp_name_mh.string;
		else if (TOOK(ra))			took = tp_name_ra.string;
		else if (TOOK(ya))			took = tp_name_ya.string;
		else if (TOOK(ga))			took = tp_name_ga.string;
		else if (TOOK(flag))		took = tp_name_flag.string;
		else if (TOOK(rune1))		took = tp_name_rune1.string;
		else if (TOOK(rune2))		took = tp_name_rune2.string;
		else if (TOOK(rune3))		took = tp_name_rune3.string;
		else if (TOOK(rune4))		took = tp_name_rune4.string;
		else 						took = "{$took}"; // This should never happen
		
		took_msg = "took ";
		
		if (HAVE_POWERUP())
			powerup = "$colored_powerups ";
		else
			powerup = "";	
	}
	TP_Send_TeamSay("%s%s%s%s", powerup, took_msg, took, at_location);
}
Example #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);
}
Example #6
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);
}
Example #7
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);
}