- _setmodel(self, tur.model);
- setsize(self, tur.mins, tur.maxs);
-
- self.m_id = tur.m_id;
- self.classname = "turret_main";
- self.active = ACTIVE_ACTIVE;
- self.effects = EF_NODRAW;
- self.netname = tur.turret_name;
- self.ticrate = bound(sys_frametime, self.ticrate, 60);
- self.max_health = self.health;
- self.target_validate_flags = self.target_select_flags;
- self.ammo = self.ammo_max;
- self.ammo_recharge *= self.ticrate;
- self.solid = SOLID_BBOX;
- self.takedamage = DAMAGE_AIM;
- self.movetype = MOVETYPE_NOCLIP;
- self.view_ofs = '0 0 0';
- self.turret_firecheckfunc = turret_firecheck;
- self.event_damage = turret_damage;
- self.use = turret_use;
- self.bot_attack = true;
- self.nextthink = time + 1;
- self.nextthink += turret_count * sys_frametime;
-
- self.tur_head = new(turret_head);
- _setmodel(self.tur_head, tur.head_model);
- setsize(self.tur_head, '0 0 0', '0 0 0');
- setorigin(self.tur_head, '0 0 0');
- setattachment(self.tur_head, self, "tag_head");
-
- self.tur_head.netname = self.tur_head.classname;
- self.tur_head.team = self.team;
- self.tur_head.owner = self;
- self.tur_head.takedamage = DAMAGE_NO;
- self.tur_head.solid = SOLID_NOT;
- self.tur_head.movetype = self.movetype;
-
- if(!self.tur_defend)
- if(self.target != "")
+ _setmodel(this, tur.model);
+ setsize(this, tur.mins, tur.maxs);
+
+ this.m_id = tur.m_id;
+ this.classname = "turret_main";
+ this.active = ACTIVE_ACTIVE;
+ this.effects = EF_NODRAW;
+ this.netname = tur.turret_name;
+ this.ticrate = bound(sys_frametime, this.ticrate, 60);
+ this.max_health = this.health;
+ this.target_validate_flags = this.target_select_flags;
+ this.ammo = this.ammo_max;
+ this.ammo_recharge *= this.ticrate;
+ this.solid = SOLID_BBOX;
+ this.takedamage = DAMAGE_AIM;
+ set_movetype(this, MOVETYPE_NOCLIP);
+ this.view_ofs = '0 0 0';
+ this.turret_firecheckfunc = turret_firecheck;
+ this.event_damage = turret_damage;
+ this.use = turret_use;
+ this.bot_attack = true;
+ this.nextthink = time + 1;
+ this.nextthink += turret_count * sys_frametime;
+
+ this.tur_head = new(turret_head);
+ _setmodel(this.tur_head, tur.head_model);
+ setsize(this.tur_head, '0 0 0', '0 0 0');
+ setorigin(this.tur_head, '0 0 0');
+ setattachment(this.tur_head, this, "tag_head");
+
+ this.tur_head.netname = this.tur_head.classname;
+ this.tur_head.team = this.team;
+ this.tur_head.owner = this;
+ this.tur_head.takedamage = DAMAGE_NO;
+ this.tur_head.solid = SOLID_NOT;
+ this.tur_head.move_movetype = this.move_movetype;
+
+ if(!this.tur_defend)
+ if(this.target != "")