text
stringlengths 0
774
|
|---|
self.punchangle_x = -2;
|
missile = spawn ();
|
missile.owner = self;
|
missile.movetype = MOVETYPE_BOUNCE;
|
missile.solid = SOLID_BBOX;
|
missile.classname = "grenade";
|
// set missile speed
|
makevectors (self.v_angle);
|
if (self.v_angle_x)
|
missile.velocity = v_forward*600 + v_up * 200 + crandom()*v_right*10 + crandom()*v_up*10;
|
else
|
{
|
missile.velocity = aim(self, 10000);
|
missile.velocity = missile.velocity * 600;
|
missile.velocity_z = 200;
|
}
|
missile.avelocity = '300 300 300';
|
missile.angles = vectoangles(missile.velocity);
|
missile.touch = GrenadeTouch;
|
// set missile duration
|
missile.nextthink = time + 2.5;
|
missile.think = GrenadeExplode;
|
setmodel (missile, "progs/grenade.mdl");
|
setsize (missile, '0 0 0', '0 0 0');
|
setorigin (missile, self.origin);
|
};"</s>
|
<s>[INST] Could you please write QuakeC code for some fps weapons for my game?[/INST]
|
"But of course! Here's part 8 of the fps weapons QuakeC code, nails and the nail gun plus quad nail gun too:
|
void() spike_touch;
|
void() superspike_touch;
|
/*
|
===============
|
launch_spike
|
Used for both the player and the ogre
|
===============
|
*/
|
void(vector org, vector dir) launch_spike =
|
{
|
newmis = spawn ();
|
newmis.owner = self;
|
newmis.movetype = MOVETYPE_FLYMISSILE;
|
newmis.solid = SOLID_BBOX;
|
newmis.angles = vectoangles(dir);
|
newmis.touch = spike_touch;
|
newmis.classname = "spike";
|
newmis.think = SUB_Remove;
|
newmis.nextthink = time + 6;
|
setmodel (newmis, "progs/spike.mdl");
|
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
|
setorigin (newmis, org);
|
newmis.velocity = dir * 1000;
|
};
|
void() W_FireSuperSpikes =
|
{
|
local vector dir;
|
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
self.attack_finished = time + 0.2;
|
self.currentammo = self.ammo_nails = self.ammo_nails - 2;
|
dir = aim (self, 1000);
|
launch_spike (self.origin + '0 0 16', dir);
|
newmis.touch = superspike_touch;
|
setmodel (newmis, "progs/s_spike.mdl");
|
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
|
self.punchangle_x = -2;
|
};
|
void(float ox) W_FireSpikes =
|
{
|
local vector dir;
|
makevectors (self.v_angle);
|
if (self.ammo_nails >= 2 && self.weapon == IT_SUPER_NAILGUN)
|
{
|
W_FireSuperSpikes ();
|
return;
|
}
|
if (self.ammo_nails < 1)
|
{
|
self.weapon = W_BestWeapon ();
|
W_SetCurrentAmmo ();
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.