1 void spawnfunc_turret_machinegun();
2 void turret_machinegun_std_init();
3 void turret_machinegun_attack();
5 //.float bulletcounter;
6 void turret_machinegun_attack()
11 sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
12 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, cvar("g_balance_uzi_bulletconstant"));
13 endFireBallisticBullet();
15 //w_deathtypestring = "had an alergic reaction due to 10 kilos of led";
16 te_smallflash(self.tur_shotorg);
18 // muzzle flash for 3rd person view
20 setmodel(flash, "models/uziflash.md3"); // precision set below
21 setattachment(flash, self.tur_head, "tag_fire");
22 flash.think = W_Uzi_Flash_Go;
23 flash.nextthink = time + 0.02;
25 flash.angles_z = flash.v_angle_z + random() * 180;
27 flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
31 void turret_machinegun_std_init()
33 if (self.netname == "") self.netname = "Machinegun Turret";
35 self.ammo_flags = TFL_AMMO_BULLETS | TFL_AMMO_RECHARGE | TFL_AMMO_RECIVE;
36 self.turrcaps_flags = TFL_TURRCAPS_PLAYERKILL;
37 self.aim_flags = TFL_AIM_LEAD;
39 if(cvar("g_antilag_bullets"))
40 self.turrcaps_flags |= TFL_TURRCAPS_HITSCAN;
42 self.aim_flags |= TFL_AIM_SHOTTIMECOMPENSATE;
44 if (turret_stdproc_init("machinegun_std",0,"models/turrets/base.md3","models/turrets/machinegun.md3") == 0)
50 self.damage_flags |= TFL_DMG_HEADSHAKE;
52 if (!turret_tag_setup())
53 dprint("Warning: Turret ",self.classname, " faild to initialize md3 tags\n");
56 self.turret_firefunc = turret_machinegun_attack;
61 /*QUAKED turret_machinegun (0 .5 .8) ?
62 * machinegun turret. does what you'd expect
64 void spawnfunc_turret_machinegun()
66 precache_model ("models/turrets/machinegun.md3");
67 precache_model ("models/turrets/base.md3");
68 precache_sound ("weapons/uzi_fire.wav");
70 self.think = turret_machinegun_std_init;
71 self.nextthink = time + 0.5;