コード例 #1
0
ファイル: widow2.c プロジェクト: yquake2/rogue
void
ThrowMoreStuff(edict_t *self, vec3_t point)
{
	int n;

	if (!self)
	{
		return;
	}

	if (coop && coop->value)
	{
		ThrowSmallStuff(self, point);
		return;
	}

	for (n = 0; n < 1; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_meat/tris.md2",
				300, GIB_ORGANIC, point, false);
	}

	for (n = 0; n < 2; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_metal/tris.md2",
				300, GIB_METALLIC, point, false);
	}

	for (n = 0; n < 3; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_metal/tris.md2",
				100, GIB_METALLIC, point, false);
	}
}
コード例 #2
0
ファイル: m_widow2.c プロジェクト: janisl/quake2-game
void WidowExplosionLeg (edict_t *self)
{
//	int		n;
	vec3_t	f,r,u, startpoint;
	vec3_t	offset1 = {-31.89, -47.86, 67.02};
	vec3_t	offset2 = {-44.9, -82.14, 54.72};

	//gi.dprintf ("Leg\n");

	AngleVectors (self->s.angles, f, r, u);
	G_ProjectSource2 (self->s.origin, offset1, f, r, u, startpoint);

	gi.WriteByte (svc_temp_entity);
	gi.WriteByte (TE_EXPLOSION1_BIG);
	gi.WritePosition (startpoint);
	gi.multicast (self->s.origin, MULTICAST_ALL);

	ThrowWidowGibSized (self, "models/monsters/blackwidow2/gib2/tris.md2", 200, GIB_METALLIC, startpoint, 
		gi.soundindex ("misc/fhit3.wav"), false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_meat/tris.md2", 300, GIB_ORGANIC, startpoint, false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_metal/tris.md2", 100, GIB_METALLIC, startpoint, false);

	G_ProjectSource2 (self->s.origin, offset2, f, r, u, startpoint);

	gi.WriteByte (svc_temp_entity);
	gi.WriteByte (TE_EXPLOSION1);
	gi.WritePosition (startpoint);
	gi.multicast (self->s.origin, MULTICAST_ALL);

	ThrowWidowGibSized (self, "models/monsters/blackwidow2/gib1/tris.md2", 300, GIB_METALLIC, startpoint,
		gi.soundindex ("misc/fhit3.wav"), false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_meat/tris.md2", 300, GIB_ORGANIC, startpoint, false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_metal/tris.md2", 100, GIB_METALLIC, startpoint, false);
}
コード例 #3
0
ファイル: m_widow2.c プロジェクト: janisl/quake2-game
void ThrowSmallStuff (edict_t *self, vec3_t point)
{
	int n;

	for (n= 0; n < 2; n++)
		ThrowWidowGibLoc (self, "models/objects/gibs/sm_meat/tris.md2", 300, GIB_ORGANIC, point, false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_metal/tris.md2", 300, GIB_METALLIC, point, false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_metal/tris.md2", 100, GIB_METALLIC, point, false);

}
コード例 #4
0
ファイル: m_widow2.c プロジェクト: janisl/quake2-game
void widow2_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{
	int n;
	int	clipped;

// check for gib
	if (self->health <= self->gib_health)
	{
		clipped = min (damage, 100);

		gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
		for (n= 0; n < 2; n++)
			ThrowWidowGibLoc (self, "models/objects/gibs/bone/tris.md2", clipped, GIB_ORGANIC, NULL, false);
		for (n= 0; n < 3; n++)
			ThrowWidowGibLoc (self, "models/objects/gibs/sm_meat/tris.md2", clipped, GIB_ORGANIC, NULL, false);
		for (n= 0; n < 3; n++)
		{
			ThrowWidowGibSized (self, "models/monsters/blackwidow2/gib1/tris.md2", clipped, GIB_METALLIC, NULL,
				0, false);
			ThrowWidowGibSized (self, "models/monsters/blackwidow2/gib2/tris.md2", clipped, GIB_METALLIC, NULL, 
				gi.soundindex ("misc/fhit3.wav"), false);
		}
		for (n= 0; n < 2; n++)
		{
			ThrowWidowGibSized (self, "models/monsters/blackwidow2/gib3/tris.md2", clipped, GIB_METALLIC, NULL, 
				0, false);
			ThrowWidowGibSized (self, "models/monsters/blackwidow/gib3/tris.md2", clipped, GIB_METALLIC, NULL, 
				0, false);
		}
		ThrowGib (self, "models/objects/gibs/chest/tris.md2", clipped, GIB_ORGANIC);
		ThrowHead (self, "models/objects/gibs/head2/tris.md2", clipped, GIB_ORGANIC);
		self->deadflag = DEAD_DEAD;
		return;
	}

	if (self->deadflag == DEAD_DEAD)
		return;

	gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NONE, 0);
	self->deadflag = DEAD_DEAD;
	self->takedamage = DAMAGE_NO;
	self->count = 0;
	KillChildren (self);
	self->monsterinfo.quad_framenum = 0;
	self->monsterinfo.double_framenum = 0;
	self->monsterinfo.invincible_framenum = 0;
	self->monsterinfo.currentmove = &widow2_move_death;
}
コード例 #5
0
ファイル: widow2.c プロジェクト: yquake2/rogue
void
ThrowArm1(edict_t *self)
{
	int n;
	vec3_t f, r, u, startpoint;
	vec3_t offset1 = {65.76, 17.52, 7.56};

	if (!self)
	{
		return;
	}

	AngleVectors(self->s.angles, f, r, u);
	G_ProjectSource2(self->s.origin, offset1, f, r, u, startpoint);

	gi.WriteByte(svc_temp_entity);
	gi.WriteByte(TE_EXPLOSION1_BIG);
	gi.WritePosition(startpoint);
	gi.multicast(self->s.origin, MULTICAST_ALL);

	for (n = 0; n < 2; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_metal/tris.md2",
				100, GIB_METALLIC, startpoint, false);
	}
}
コード例 #6
0
ファイル: m_widow2.c プロジェクト: janisl/quake2-game
void ThrowArm2 (edict_t *self)
{
//	int		n;
	vec3_t	f,r,u, startpoint;
	vec3_t	offset1 = {65.76, 17.52, 7.56};

	AngleVectors (self->s.angles, f, r, u);
	G_ProjectSource2 (self->s.origin, offset1, f, r, u, startpoint);

	ThrowWidowGibSized (self, "models/monsters/blackwidow2/gib4/tris.md2", 200, GIB_METALLIC, startpoint, 
		gi.soundindex ("misc/fhit3.wav"), false);
	ThrowWidowGibLoc (self, "models/objects/gibs/sm_meat/tris.md2", 300, GIB_ORGANIC, startpoint, false);
}
コード例 #7
0
ファイル: m_widow2.c プロジェクト: janisl/quake2-game
void WidowExplosion1 (edict_t *self)
{
	int		n;
	vec3_t	f,r,u, startpoint;
	vec3_t	offset = {23.74, -37.67, 76.96};

//	gi.dprintf ("1\n");
	AngleVectors (self->s.angles, f, r, u);
	G_ProjectSource2 (self->s.origin, offset, f, r, u, startpoint);

	gi.WriteByte (svc_temp_entity);
	gi.WriteByte (TE_EXPLOSION1);
	gi.WritePosition (startpoint);
	gi.multicast (self->s.origin, MULTICAST_ALL);
	
	for (n= 0; n < 1; n++)
		ThrowWidowGibLoc (self, "models/objects/gibs/sm_meat/tris.md2", 300, GIB_ORGANIC, startpoint, false);
	for (n= 0; n < 1; n++)
		ThrowWidowGibLoc (self, "models/objects/gibs/sm_metal/tris.md2", 100, GIB_METALLIC, startpoint, false);
	for (n= 0; n < 2; n++)
		ThrowWidowGibLoc (self, "models/objects/gibs/sm_metal/tris.md2", 300, GIB_METALLIC, startpoint, false);
}
コード例 #8
0
ファイル: widow2.c プロジェクト: yquake2/rogue
void
WidowExplosion7(edict_t *self)
{
	int n;
	vec3_t f, r, u, startpoint;
	vec3_t offset = {-20.11, -1.11, 40.76};

	if (!self)
	{
		return;
	}

	AngleVectors(self->s.angles, f, r, u);
	G_ProjectSource2(self->s.origin, offset, f, r, u, startpoint);

	gi.WriteByte(svc_temp_entity);
	gi.WriteByte(TE_EXPLOSION1);
	gi.WritePosition(startpoint);
	gi.multicast(self->s.origin, MULTICAST_ALL);

	for (n = 0; n < 1; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_meat/tris.md2",
				300, GIB_ORGANIC, startpoint, false);
	}

	for (n = 0; n < 1; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_metal/tris.md2",
				100, GIB_METALLIC, startpoint, false);
	}

	for (n = 0; n < 2; n++)
	{
		ThrowWidowGibLoc(self, "models/objects/gibs/sm_metal/tris.md2",
				300, GIB_METALLIC, startpoint, false);
	}
}