コード例 #1
0
ファイル: widow.c プロジェクト: DrItanium/rogue
void WidowRespondPowerup (edict_t *self, edict_t *other)
{
	if (other->s.effects & EF_QUAD)
	{
		if (skill->value == 1)
			WidowDouble (self, other->client->quad_framenum);
		else if (skill->value == 2)
			WidowGoinQuad (self, other->client->quad_framenum);
		else if (skill->value == 3)
		{
			WidowGoinQuad (self, other->client->quad_framenum);
			WidowPowerArmor (self);
		}
	}
	else if (other->s.effects & EF_DOUBLE)
	{
		if (skill->value == 2)
			WidowDouble (self, other->client->double_framenum);
		else if (skill->value == 3)
		{
			WidowDouble (self, other->client->double_framenum);
			WidowPowerArmor (self);
		}
	}
	else
		widow_damage_multiplier = 1;

	if (other->s.effects & EF_PENT)
	{
		if (skill->value == 1)
			WidowPowerArmor (self);
		else if (skill->value == 2)
			WidowPent (self, other->client->invincible_framenum);
		else if (skill->value == 3)
		{
			WidowPent (self, other->client->invincible_framenum);
			WidowPowerArmor (self);
		}
	}
}
コード例 #2
0
ファイル: widow.c プロジェクト: acebox/yquake2_acemod
void
WidowRespondPowerup(edict_t *self, edict_t *other)
{
	if (!self || !other)
	{
		return;
	}
#ifdef WIDOW_SPECIALS
	if (other->s.effects & EF_QUAD)
	{
		if (skill->value == 1)
		{
			WidowDouble(self, other->client->quad_framenum);
		}
		else if (skill->value == 2)
		{
			WidowGoinQuad(self, other->client->quad_framenum);
		}
		else if (skill->value == 3)
		{
			WidowGoinQuad(self, other->client->quad_framenum);
			WidowPowerArmor(self);
		}
	}
	else if (other->s.effects & EF_DOUBLE)
	{
		if (skill->value == 2)
		{
			WidowDouble(self, other->client->double_framenum);
		}
		else if (skill->value == 3)
		{
			WidowDouble(self, other->client->double_framenum);
			WidowPowerArmor(self);
		}
	}
	else
#endif
	{
		widow_damage_multiplier = 1;
	}

	if (other->s.effects & EF_PENT)
	{
#ifdef WIDOW_SPECIALS
		if (skill->value == 1)
		{
			WidowPowerArmor(self);
		}
		else if (skill->value == 2)
		{
			WidowPent(self, other->client->invincible_framenum);
		}
		else if (skill->value == 3)
		{
			WidowPent(self, other->client->invincible_framenum);
#endif
			WidowPowerArmor(self);
#ifdef WIDOW_SPECIALS
		}
#endif
	}
}