1 void spawnfunc_turret_machinegun();
2 void turret_machinegun_std_init();
3 void turret_machinegun_attack();
5 //.float bulletcounter;
6 void turret_machinegun_attack()
8 sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
9 fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, autocvar_g_balance_uzi_bulletconstant);
10 endFireBallisticBullet();
12 //w_deathtypestring = "had an alergic reaction due to 10 kilos of led";
13 te_smallflash(self.tur_shotorg);
16 setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
20 void turret_machinegun_std_init()
22 if (self.netname == "") self.netname = "Machinegun Turret";
24 self.ammo_flags = TFL_AMMO_BULLETS | TFL_AMMO_RECHARGE | TFL_AMMO_RECIVE;
25 self.turrcaps_flags = TFL_TURRCAPS_PLAYERKILL;
26 self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
28 if not (autocvar_g_antilag_bullets)
29 self.turrcaps_flags |= TFL_TURRCAPS_HITSCAN;
31 if (turret_stdproc_init("machinegun_std",0,"models/turrets/base.md3","models/turrets/machinegun.md3") == 0)
37 self.damage_flags |= TFL_DMG_HEADSHAKE;
39 if (!turret_tag_fire_update())
40 dprint("Warning: Turret ",self.classname, " faild to initialize md3 tags\n");
43 self.turret_firefunc = turret_machinegun_attack;
48 /*QUAKED turret_machinegun (0 .5 .8) ?
49 * machinegun turret. does what you'd expect
51 void spawnfunc_turret_machinegun()
53 precache_model ("models/turrets/machinegun.md3");
54 precache_model ("models/turrets/base.md3");
55 precache_sound ("weapons/uzi_fire.wav");
57 self.think = turret_machinegun_std_init;
58 self.nextthink = time + 0.5;