From 40676a6dea20028182bc89920df2c29b7309f3e0 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 4 Jan 2016 03:12:19 +1000 Subject: [PATCH] Remove self (we have the technology) --- qcsrc/common/monsters/sv_monsters.qc | 44 ++++++++++++++-------------- qcsrc/lib/net.qh | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index f4fc64148..10725c0d6 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -479,10 +479,10 @@ void Monster_Touch() if(other == world) { return; } if(other.monster_attack) - if(self.enemy != other) + if(this.enemy != other) if(!IS_MONSTER(other)) - if(Monster_ValidTarget(self, other)) - self.enemy = other; + if(Monster_ValidTarget(this, other)) + this.enemy = other; } void Monster_Miniboss_Check(entity this) @@ -517,7 +517,7 @@ bool Monster_Respawn_Check(entity this) return true; } -void Monster_Respawn() { SELFPARAM(); Monster_Spawn(self, self.monsterid); } +void Monster_Respawn() { SELFPARAM(); Monster_Spawn(this, this.monsterid); } void Monster_Dead_Fade(entity this) { @@ -551,7 +551,7 @@ void Monster_Dead_Fade(entity this) void Monster_Use() {SELFPARAM(); - if(Monster_ValidTarget(self, activator)) { self.enemy = activator; } + if(Monster_ValidTarget(this, activator)) { this.enemy = activator; } } vector Monster_Move_Target(entity this, entity targ) @@ -919,21 +919,21 @@ void Monster_Remove(entity this) void Monster_Dead_Think() {SELFPARAM(); - self.nextthink = time + self.ticrate; + this.nextthink = time + this.ticrate; - if(self.monster_lifetime != 0) - if(time >= self.monster_lifetime) + if(this.monster_lifetime != 0) + if(time >= this.monster_lifetime) { - Monster_Dead_Fade(self); + Monster_Dead_Fade(this); return; } } void Monster_Appear() {SELFPARAM(); - self.enemy = activator; - self.spawnflags &= ~MONSTERFLAG_APPEAR; // otherwise, we get an endless loop - Monster_Spawn(self, self.monsterid); + this.enemy = activator; + this.spawnflags &= ~MONSTERFLAG_APPEAR; // otherwise, we get an endless loop + Monster_Spawn(this, this.monsterid); } bool Monster_Appear_Check(entity this, int monster_id) @@ -1216,23 +1216,23 @@ void Monster_Anim(entity this) void Monster_Think() {SELFPARAM(); - self.think = Monster_Think; - self.nextthink = self.ticrate; + this.think = Monster_Think; + this.nextthink = this.ticrate; - if(self.monster_lifetime) - if(time >= self.monster_lifetime) + if(this.monster_lifetime) + if(time >= this.monster_lifetime) { - Damage(self, self, self, self.health + self.max_health, DEATH_KILL.m_id, self.origin, self.origin); + Damage(this, this, this, this.health + this.max_health, DEATH_KILL.m_id, this.origin, this.origin); return; } - Monster mon = get_monsterinfo(self.monsterid); - if(mon.mr_think(mon, self)) - Monster_Move(self, self.speed2, self.speed, self.stopspeed); + Monster mon = get_monsterinfo(this.monsterid); + if(mon.mr_think(mon, this)) + Monster_Move(this, this.speed2, this.speed, this.stopspeed); - Monster_Anim(self); + Monster_Anim(this); - CSQCMODEL_AUTOUPDATE(self); + CSQCMODEL_AUTOUPDATE(this); } bool Monster_Spawn_Setup(entity this) diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 81f126b74..b0320eadb 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -107,7 +107,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } { if (e.classname == "") e.classname = "net_linked"; - if (e.model == "" || self.modelindex == 0) + if (e.model == "" || e.modelindex == 0) { vector mi = e.mins; vector ma = e.maxs; -- 2.39.2