text
stringlengths
0
774
if (deathmatch)
return;
// 1998-07-29 Cheats coop fix by Maddes end
serverflags = serverflags * 2 + 1;
};
void() QuadCheat =
{
// 1998-07-29 Cheats coop fix by Maddes start
// if (deathmatch || coop)
if (deathmatch)
// 1998-07-29 Cheats coop fix by Maddes end
return;
self.super_time = 1;
self.super_damage_finished = time + 30;
self.items = self.items | IT_QUAD;
dprint ("quad cheat\n");
};
/*
============
ImpulseCommands
============
*/
void() ImpulseCommands =
{
if (self.impulse >= 1 && self.impulse <= 8)
W_ChangeWeapon ();
if (self.impulse == 9)
CheatCommand ();
if (self.impulse == 10)
CycleWeaponCommand ();
if (self.impulse == 11)
ServerflagsCommand ();
if (self.impulse == 12)
CycleWeaponReverseCommand ();
if (self.impulse == 255)
QuadCheat ();
// dumptruck_ds version inspired by Copper
if (self.impulse == 100)
sprint(self, version);
// if (self.impulse == 101) // debugging armor shards -- dumptruck_ds
// dprint ("Armortype is");
// dprint (ftos(self.armortype));
// dprint ("\n");
self.impulse = 0;
};
/*
============
W_WeaponFrame
Called every frame so impulse events can be handled as well as possible
============
*/
void() W_WeaponFrame =
{
if (time < self.attack_finished)
return;
if (self.impulse) // 1998-08-14 Constantly checking all impulses fix by Perged
ImpulseCommands ();
// check for attack
if (self.button0)
{
SuperDamageSound ();
W_Attack ();
}
};
/*
========
SuperDamageSound
Plays sound if needed
========
*/
void() SuperDamageSound =
{
if (self.super_damage_finished > time)
{
if (self.super_sound < time)
{
self.super_sound = time + 1;
sound (self, CHAN_BODY, "items/damage3.wav", 1, ATTN_NORM);
}
}
return;
};"</s>
<s>[INST]
What is the purpose of the movetarget_f function in the given QuakeC code?
[/INST]