예제 #1
0
GLOBAL void TP_Msg_KillMe_f (void)
{
	extern cvar_t tp_name_rl, tp_name_lg;
	MSGPART point = "";
	MSGPART kill_me = "{&cb1akill me [&cfff}{%l}{&cf2a]&cfff}";
	MSGPART weapon = "";
	MSGPART weapon_ammo = "";
	MSGPART extra_rockets = "";
	MSGPART extra_cells = "";

	if (DEAD())
		return;

	TP_FindPoint();
	if (INPOINT(teammate))
		point = va ("{&c0b0%s&cfff} ", Macro_PointName()); // Saying teammate kill me isn't much help. Only report if you can say e.g. Up2 Kill Me!

	if (HOLD_RL()) {
		weapon = tp_name_rl.string;
		weapon_ammo = ":$rockets ";
	}
	else if (HOLD_LG()) {
		weapon = tp_name_lg.string;
		weapon_ammo = ":$cells ";
	}

	if (!HOLD_RL() && HAVE_ROCKETS())
		extra_rockets = "{&cf13r&cfff}:$rockets "; // see below comment
	if (!HOLD_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", point, kill_me, weapon, weapon_ammo, extra_rockets, extra_cells);
}
예제 #2
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);
}
예제 #3
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);
}