text
stringlengths 0
774
|
---|
return;
|
}
|
sound (self, CHAN_WEAPON, "weapons/rocket1i.wav", 1, ATTN_NORM);
|
self.attack_finished = time + 0.2;
|
self.currentammo = self.ammo_nails = self.ammo_nails - 1;
|
dir = aim (self, 1000);
|
// launch_spike (self.origin + '0 0 16' + v_right*ox, dir);
|
launch_spike (self.origin + self.view_ofs + v_up * -8 + v_right*ox, dir); //seven Nailgun position fix - thanks to Greenwood -- dumptruck_ds
|
self.punchangle_x = -2;
|
};
|
void() spike_touch =
|
{
|
if (other == self.owner)
|
return;
|
if (other.solid == SOLID_TRIGGER)
|
return; // trigger field, do nothing
|
if (pointcontents(self.origin) == CONTENT_SKY)
|
{
|
remove(self);
|
return;
|
}
|
// hit something that bleeds
|
if (other.takedamage)
|
{
|
spawn_touchblood (9);
|
T_Damage (other, self, self.owner, 9);
|
}
|
else
|
{
|
if (self.owner.snd_hit){
|
sound_hit (self, CHAN_WEAPON, self.owner.snd_hit, 1, ATTN_STATIC); //dumptruck_ds
|
}
|
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
if (self.classname == "wizspike")
|
if (self.owner.snd_hit)
|
{
|
sound_hit (self, CHAN_WEAPON, self.owner.snd_hit, 1, ATTN_STATIC); //dumptruck_ds
|
WriteByte(MSG_BROADCAST, TE_GUNSHOT);
|
}
|
else
|
{
|
WriteByte (MSG_BROADCAST, TE_WIZSPIKE);
|
}
|
else if (self.classname == "knightspike")
|
WriteByte (MSG_BROADCAST, TE_KNIGHTSPIKE);
|
else
|
WriteByte (MSG_BROADCAST, TE_SPIKE);
|
WriteCoord (MSG_BROADCAST, self.origin_x);
|
WriteCoord (MSG_BROADCAST, self.origin_y);
|
WriteCoord (MSG_BROADCAST, self.origin_z);
|
}
|
remove(self);
|
};"</s>
|
<s>[INST] Could you please write QuakeC code for some fps weapons for my game?[/INST]
|
"But of course! Here's part 9 of the fps weapons QuakeC code, where we continue the nail gun code:
|
void() superspike_touch =
|
{
|
if (other == self.owner)
|
return;
|
if (other.solid == SOLID_TRIGGER)
|
return; // trigger field, do nothing
|
if (pointcontents(self.origin) == CONTENT_SKY)
|
{
|
remove(self);
|
return;
|
}
|
// hit something that bleeds
|
if (other.takedamage)
|
{
|
spawn_touchblood (18);
|
T_Damage (other, self, self.owner, 18);
|
}
|
else
|
{
|
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
WriteByte (MSG_BROADCAST, TE_SUPERSPIKE);
|
WriteCoord (MSG_BROADCAST, self.origin_x);
|
WriteCoord (MSG_BROADCAST, self.origin_y);
|
WriteCoord (MSG_BROADCAST, self.origin_z);
|
}
|
remove(self);
|
};
|
void() superduperspike_touch = //dumptruck_ds for Style 2 Ogre see ogre.qc
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.