Пример #1
0
void mech_plos_event(EVENT * e)
{
    MECH *mech = (MECH *) e->data, *target;
    MAP *map;
    int mapvis;
    int maplight;
    float range;
    int i;

    if (!Started(mech))
	return;
    if (!(map = getMap(mech->mapindex)))
	return;
    MECHEVENT(mech, EVENT_PLOS, mech_plos_event, PLOS_TICK, 0);
    if (!MechPNumSeen(mech) && !(MechSpecials(mech) & AA_TECH))
	return;
    mapvis = map->mapvis;
    maplight = map->maplight;
    MechPNumSeen(mech) = 0;
    for (i = 0; i < map->first_free; i++)
	if (map->mechsOnMap[i] > 0 && map->mechsOnMap[i] != mech->mynum)
	    if (!(map->LOSinfo[mech->mapnumber][i] & MECHLOSFLAG_SEEN)) {
		target = FindObjectsData(map->mechsOnMap[i]);
		if (!target)
		    continue;
		range = FlMechRange(map, mech, target);
		MechPNumSeen(mech)++;
		Sensor_DoWeSeeNow(mech, &map->LOSinfo[mech->mapnumber][i],
		    range, -1, -1, target, mapvis, maplight,
		    map->cloudbase, 1, 0);

	    }
}
Пример #2
0
void sendECMNotification(MECH * objMech, int wMsgType)
{
	switch (wMsgType) {
	case ECM_NOTIFY_DISTURBED:

#ifdef LOUD_ECM
		mech_notify(objMech, MECHALL,
					"Half your screens are suddenly filled with static!");

#ifdef VERY_LOUD_ECM
		if(MechSpecials(objMech) & BEAGLE_PROBE_TECH &&
		   !(MechCritStatus(objMech) & BEAGLE_DESTROYED))
			mech_notify(objMech, MECHALL,
						"Your Beagle Active Probe is inoperative!");
		if(MechSpecials2(objMech) & BLOODHOUND_PROBE_TECH &&
		   !(MechCritStatus(objMech) & BLOODHOUND_DESTROYED))
			mech_notify(objMech, MECHALL,
						"Your Bloodhound Active Probe is inoperative!");
		if(MechSpecials(objMech) & LIGHT_BAP_TECH &&
		   !(MechCritStatus2(objMech) & LIGHT_BAP_DESTROYED))
		   	mech_notify(objMech, MECHALL,
						"Your Light Beagle Active Probe is inoperative!");
		if(IsC3(objMech))
			mech_notify(objMech, MECHALL, "Your C3 network is inoperative!");
		if(IsC3i(objMech))
			mech_notify(objMech, MECHALL, "Your C3i network is inoperative!");

#endif /*  */
#endif /*  */
		break;
	case ECM_NOTIFY_UNDISTURBED:

#ifdef LOUD_ECM
		mech_notify(objMech, MECHALL,
					"All your systems are back to normal again!");

#ifdef VERY_LOUD_ECM
		if(MechSpecials(objMech) & BEAGLE_PROBE_TECH &&
		   !(MechCritStatus(objMech) & BEAGLE_DESTROYED))
			mech_notify(objMech, MECHALL,
						"Your Beagle Active Probe is operational again!");
		if(MechSpecials2(objMech) & BLOODHOUND_PROBE_TECH &&
		   !(MechCritStatus(objMech) & BLOODHOUND_DESTROYED))
			mech_notify(objMech, MECHALL,
						"Your Bloodhound Active Probe is operational again!");
		if(MechSpecials(objMech) & LIGHT_BAP_TECH &&
		   !(MechCritStatus2(objMech) & LIGHT_BAP_DESTROYED))
		   	mech_notify(objMech, MECHALL,
						"Your Light Beagle Active Probe is operational again!");
		if(IsC3(objMech))
			mech_notify(objMech, MECHALL,
						"Your C3 network is operational again!");
		if(IsC3i(objMech))
			mech_notify(objMech, MECHALL,
						"Your C3i network is operational again!");

#endif /*  */
#endif /*  */
		break;
	case ECM_NOTIFY_COUNTERED:
		if(HasWorkingECMSuite(objMech))
			mech_notify(objMech, MECHALL,
						"Your ECM suite's ready light turns red, countered by enemy ECCM!");
		break;
	case ECM_NOTIFY_UNCOUNTERED:
		if(HasWorkingECMSuite(objMech))
			mech_notify(objMech, MECHALL,
						"Your ECM suite's ready light turns green, enemy ECCM is out of range.");
		break;
	}
}