Exemple #1
0
GLOBAL void TP_Msg_Report_f (void)
{
	extern cvar_t tp_name_lg, tp_name_rl, tp_name_gl, tp_name_sng, tp_name_ssg;
	MSGPART powerup = "";
	MSGPART armor_health = "$colored_armor/%h";
	MSGPART location = "$[{%l}$]";
	MSGPART weapon = "";
	MSGPART rl = ""; // note we need by "rl" "lg" and "weapon" for the case that player has both
	MSGPART lg = "";
	MSGPART cells = "";
	MSGPART extra_cells = ""; //"extra" MSGPART needed to we can put these after %l
	MSGPART rockets = "";
	MSGPART extra_rockets = "";
	MSGPART ammo = "";
 
	if (DEAD()) {
		TP_Msg_Lost_f();
		return;
	}
	
	if (HAVE_POWERUP())
		powerup = "$colored_powerups ";
 
	if	(HAVE_RL() && HAVE_LG()) {
		rl = tp_name_rl.string;
		rockets = ":$rockets ";
		lg = tp_name_lg.string;
		cells = ":$cells ";
	}
	else if (HAVE_RL()) {
		rl = tp_name_rl.string;
		rockets = ":$rockets ";
	}
	else if (HAVE_LG()) {
		lg = tp_name_lg.string;
		cells = ":$cells ";
	}
	else if (HAVE_GL()) {
		weapon = tp_name_gl.string;
		ammo = ":$rockets ";
	}
	else if (HAVE_SNG()) {
		weapon = tp_name_sng.string;
		ammo = ":$nails ";
	}
	else if (HAVE_SSG()) {
		weapon = tp_name_ssg.string;
		ammo = ":$shells ";
	}
	
	// extra rockets and cells
	if (!HAVE_RL() && HAVE_ROCKETS())
		extra_rockets = " {&cf13r&cfff}:$rockets"; // see below comment
	if (!HAVE_LG() && HAVE_CELLS())
		extra_cells = " {&c2aac&cfff}:$cells"; //the "r" and "c" are hard-coded to have the same colors as tp_name_rl and tp_name_lg. Not sure if this is a good idea
											  //since the user can change those colors and then it won't match up
 	 
	TP_Send_TeamSay("%s%s %s%s%s%s%s%s%s%s%s", powerup, armor_health, weapon, ammo, rl, rockets, lg, cells, location, extra_rockets, extra_cells);
}
Exemple #2
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);
}
Exemple #3
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);
}
Exemple #4
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);
}
Exemple #5
0
GLOBAL void TP_Msg_Report_f (void)
{
	MSGPART powerup = "";
	MSGPART armor_health = "";
	MSGPART location = "";
	MSGPART weap_ammo = "";
	MSGPART extra_ammo = "";
 
	if (DEAD()) // no matter what, if dead report lost (how could you be coming if you're dead?)
		{
		TP_Msg_Lost_f();
		return;
		}
	
	if (HAVE_POWERUP())
		powerup = "$colored_short_powerups ";
	else
		powerup = "";
 
    if		(HAVE_RL() && HAVE_LG())	weap_ammo = " " tp_ib_name_rlg ":$rockets/$cells";
    else if (HAVE_RL())					weap_ammo = " " tp_ib_name_rl ":$rockets";
    else if (HAVE_LG())					weap_ammo = " " tp_ib_name_lg ":$cells";
	else if (HAVE_GL())					weap_ammo = " " tp_ib_name_gl ":$rockets";
	else if (HAVE_SNG())				weap_ammo = " " tp_ib_name_sng ":$nails";
	else if (HAVE_SSG())				weap_ammo = " " tp_ib_name_ssg;
    else								weap_ammo = "";

	if (!HAVE_LG() && HAVE_CELLS()) {
		extra_ammo = " c:$cells";
	}
 
	armor_health = "$colored_armor/%h";
	location = "$[{%l}$]";
	 
	TP_Send_TeamSay("%s%s %s%s%s", powerup, armor_health, location, weap_ammo, extra_ammo);
}
Exemple #6
0
GLOBAL void TP_Msg_EnemyPowerup_f (void) // might as well add flag to this monster. need $point and $took to see red/blue flag!
{
	/*	This is the "go-to" function!". It contains all possible scenarios for any player, teammate or enemy, with any combination of powerup.
	!!! Please note this function is grouped into four parts: player with eyes (assumed enemy), enemy with powerup, you with powerup, teammate with powerup. !!! */
	extern cvar_t tp_name_quad, tp_name_pent, tp_name_quaded, tp_name_pented, tp_name_eyes, tp_name_enemy;
	MSGPART quad = "";
	MSGPART quaded = "";
	MSGPART pent = "";
	MSGPART pented = "";
	MSGPART eyes = "";
	MSGPART team = "";
	MSGPART enemy = "";
	MSGPART location = "at $[{%y}$]";
	MSGPART space = "";
	
	if (flashed) return;
    TP_FindPoint();
	
	/* Note we don't have && INPOINT(enemy) in the below if.
	This is because $point DOES NOT TELL YOU TEAMMATE/ENEMY if they have ring (because there is no way to know).
	Therefore, we don't assume enemy when we see eyes anymore because this confuses people into thinking it's ALWAYS enemy, so we just say "eyes at location" */		
	if (INPOINT(eyes)) {
		eyes = tp_name_eyes.string;

		if (INPOINT(quaded) && INPOINT(pented))	{ // Since we can't say "enemy (or) team eyes", instead we say "quaded pented eyes"
			quaded = tp_name_quaded.string;
			pented = tp_name_pented.string;
		}
		else if (INPOINT(quaded))
			quad = tp_name_quad.string;
		else if (INPOINT(pented))
			pent = tp_name_pent.string;
	}
	else if (INPOINT(enemy)) {
		enemy = tp_name_enemy.string; // %q is last seen powerup of enemy. defaults to quad, which is nice (but it won't be colored)
		space = " ";

		if (INPOINT(quaded) && INPOINT(pented))	{
			quad = tp_name_quad.string;
			pent = tp_name_pent.string;
		}
		else if (INPOINT(quaded))
			quad = tp_name_quad.string;
		else if (INPOINT(pented))
			pent = tp_name_pent.string;
		else {// Default to "enemy powerup", because that's the purpose of this function
			quad = "%q"; //we're hi-jacking "quad" here
			location = ""; //Report only "enemy quad", not "enemy quad %l" which is confusing
		}
	}
	else if (HAVE_POWERUP()) {
		if (DEAD()) { // if you are dead with powerup, then you dont technically have it.
			TP_Msg_Lost_f(); // this function will take care of it
			return;
		}
		
		TP_GetNeed();	
		if (NEED(health) || NEED(armor) || NEED_WEAPON() || NEED(rockets) || NEED(cells)) { // Note this doesn't include shells/nails. Not as broad as tp_msgneed.
			TP_Msg_Need_f();
			return;
		}
		else
			team = "{&c0b0team&cfff} $colored_powerups";
	}
	else if (INPOINT(teammate)) {
		team = "{&c0b0team&cfff} ";

		if (INPOINT(quaded) && INPOINT(pented))	{
			quad = tp_name_quad.string;
			pent = tp_name_pent.string;
		}
		else if (INPOINT(quaded))
			quad = tp_name_quad.string;
		else if (INPOINT(pented))
			pent = tp_name_pent.string;
		else { // Default to "enemy powerup", because that's the purpose of this function
			team = tp_name_enemy.string; // We're hi-jacking "team" to mean enemy here. %q is last seen powerup of enemy. defaults to quad, which is nice (but it won't be colored)
			quad = "%q"; // we're hi-jacking "quad" here
			location = ""; //Report only "enemy quad", not "enemy quad %l" which is confusing
		}
	}
	else { // Default to "enemy powerup", because that's the purpose of this function
		enemy = tp_name_enemy.string; // %q is last seen powerup of enemy. defaults to quad, which is nice (but it won't be colored)
		location = "%q"; //we're hi-jacking "location" here
	}

	TP_Send_TeamSay("%s%s%s%s%s%s%s%s %s", team, enemy, space, quad, pent, quaded, pented, eyes, location);
}
Exemple #7
0
GLOBAL void TP_Msg_EnemyPowerup_f (void) // might as well add flag to this monster. need $point and $took to see red/blue flag!
{
	/*
	This is the "go-to" function!". It contains all possible scenarios for any player, teammate or enemy, with any combination of powerup.
	!!! Please note this function is grouped into four parts: player with eyes (assumed enemy), enemy with powerup, you with powerup, teammate with powerup. !!!
	*/
	MSGPART message = "";
	
	if (flashed) return;
    TP_FindPoint();
	
		/*
		Note we don't have && INPOINT(enemy) in the below if.
		This is because $point DOES NOT TELL YOU TEAMMATE/ENEMY if they have ring (because there is no way to know).
		Therefore, we don't assume enemy when we see eyes anymore because this confuses people into thinking it's ALWAYS enemy, so we just say "eyes at location"
		*/
		
	if (INPOINT(eyes))
	{
		if (INPOINT(quaded) && INPOINT(pented))
		{
			message = tp_ib_name_quaded " " tp_ib_name_pented " " tp_ib_name_eyes " at $[{%y}$]";
		}
		else if (INPOINT(quaded))
		{
			message = tp_ib_name_quaded " " tp_ib_name_eyes " at $[{%y}$]";
		}
		else if (INPOINT(pented))
		{
			message = tp_ib_name_pented " " tp_ib_name_eyes " at $[{%y}$]";
		}
		else
		{
			message = tp_ib_name_eyes " at $[{%y}$]";
		}
	}
	else if (INPOINT(enemy))
	{
		if (INPOINT(quaded) && INPOINT(pented))
		{
			message = tp_ib_name_quaded " " tp_ib_name_pented " " tp_ib_name_enemy " at $[{%y}$]";
		}
		else if (INPOINT(quaded))
		{
			message = tp_ib_name_quaded " " tp_ib_name_enemy " at $[{%y}$]";
		}
		else if (INPOINT(pented))
		{
			message = tp_ib_name_pented " " tp_ib_name_enemy " at $[{%y}$]";
		}
		else
		{
			message = tp_ib_name_enemy " %q"; // %q is last seen powerup of enemy. defaults to quad, which is nice (but it won't be colored)
		}
	}
	else if (HAVE_POWERUP())
	{
		TP_GetNeed();
		if (DEAD()) // if you are dead with powerup, then you dont technically have it.
		{
			TP_Msg_Lost_f(); // this function will take care of it
			return;
		}		
		else if (NEED(health) || NEED(armor) || NEED_WEAPON() || NEED(rockets) || NEED(cells)) // all things we care for
		{
			message = tp_ib_name_team " $colored_powerups need %u $[{%l}$]";
		}
		else
		{
			message = tp_ib_name_team " $colored_powerups";
		}
	}
	else if (INPOINT(teammate))
	{
		if (INPOINT(quaded) && INPOINT(pented))
		{
			message = tp_ib_name_team " " tp_ib_name_quad " " tp_ib_name_pent;
		}
		else if (INPOINT(quaded))
		{
			message = tp_ib_name_team " " tp_ib_name_quad;
		}
		else if (INPOINT(pented))
		{
			message = tp_ib_name_team " " tp_ib_name_pent;	
		}
		else
		{
			message = tp_ib_name_enemy " %q"; // %q is last seen powerup of enemy. defaults to quad, which is nice (but it won't be colored)
		}
	}
	else
	{
		message = tp_ib_name_enemy " %q"; // %q is last seen powerup of enemy. defaults to quad, which is nice (but it won't be colored)
	}

	TP_Send_TeamSay("%s", message);
}