- setmodel(self, mon.m_model);
- self.flags = FL_MONSTER;
- self.classname = "monster";
- self.takedamage = DAMAGE_AIM;
- self.bot_attack = true;
- self.iscreature = true;
- self.teleportable = true;
- self.damagedbycontents = true;
- self.monsterid = mon_id;
- self.event_damage = Monster_Damage;
- self.touch = Monster_Touch;
- self.use = Monster_Use;
- self.solid = SOLID_BBOX;
- self.movetype = MOVETYPE_WALK;
- self.spawnshieldtime = time + autocvar_g_monsters_spawnshieldtime;
- self.enemy = world;
- self.velocity = '0 0 0';
- self.moveto = self.origin;
- self.pos1 = self.origin;
- self.pos2 = self.angles;
- self.reset = Monster_Reset;
- self.netname = mon.netname;
- self.monster_attackfunc = mon.monster_attackfunc;
- self.monster_name = mon.monster_name;
- self.candrop = true;
- self.view_ofs = '0 0 0.7' * (self.maxs_z * 0.5);
- self.oldtarget2 = self.target2;
- self.pass_distance = 0;
- self.deadflag = DEAD_NO;
- self.noalign = ((mon.spawnflags & MONSTER_TYPE_FLY) || (mon.spawnflags & MONSTER_TYPE_SWIM));
- self.spawn_time = time;
- self.spider_slowness = 0;
- self.gravity = 1;
- self.monster_moveto = '0 0 0';
- self.monster_face = '0 0 0';
- self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;
-
- if(!self.scale) { self.scale = 1; }
- if(autocvar_g_monsters_edit) { self.grab = 1; }
- if(autocvar_g_fullbrightplayers) { self.effects |= EF_FULLBRIGHT; }
- if(autocvar_g_nodepthtestplayers) { self.effects |= EF_NODEPTHTEST; }
- if(mon.spawnflags & MONSTER_TYPE_SWIM) { self.flags |= FL_SWIM; }
+ setmodel(this, mon.m_model);
+ this.flags = FL_MONSTER;
+ this.classname = "monster";
+ this.takedamage = DAMAGE_AIM;
+ this.bot_attack = true;
+ this.iscreature = true;
+ this.teleportable = true;
+ this.damagedbycontents = true;
+ this.monsterid = mon_id;
+ this.event_damage = Monster_Damage;
+ settouch(this, Monster_Touch);
+ this.use = Monster_Use;
+ this.solid = SOLID_BBOX;
+ set_movetype(this, MOVETYPE_WALK);
+ this.spawnshieldtime = time + autocvar_g_monsters_spawnshieldtime;
+ this.enemy = NULL;
+ this.velocity = '0 0 0';
+ this.moveto = this.origin;
+ this.pos1 = this.origin;
+ this.pos2 = this.angles;
+ this.reset = Monster_Reset;
+ this.netname = mon.netname;
+ this.monster_attackfunc = mon.monster_attackfunc;
+ this.monster_name = mon.monster_name;
+ this.candrop = true;
+ this.view_ofs = '0 0 0.7' * (this.maxs_z * 0.5);
+ this.oldtarget2 = this.target2;
+ this.pass_distance = 0;
+ this.deadflag = DEAD_NO;
+ this.noalign = ((mon.spawnflags & MONSTER_TYPE_FLY) || (mon.spawnflags & MONSTER_TYPE_SWIM));
+ this.spawn_time = time;
+ this.gravity = 1;
+ this.monster_moveto = '0 0 0';
+ this.monster_face = '0 0 0';
+ this.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;
+
+ if(!this.scale) { this.scale = 1; }
+ if(autocvar_g_monsters_edit) { this.grab = 1; }
+ if(autocvar_g_fullbrightplayers) { this.effects |= EF_FULLBRIGHT; }
+ if(autocvar_g_nodepthtestplayers) { this.effects |= EF_NODEPTHTEST; }
+ if(mon.spawnflags & MONSTER_TYPE_SWIM) { this.flags |= FL_SWIM; }
+
+ if(autocvar_g_playerclip_collisions)
+ this.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP;