- setmodel(self, MDL_ONS_GEN_DEAD);
- else if(hp < self.max_health * 0.10)
- setmodel(self, MDL_ONS_GEN9);
- else if(hp < self.max_health * 0.20)
- setmodel(self, MDL_ONS_GEN8);
- else if(hp < self.max_health * 0.30)
- setmodel(self, MDL_ONS_GEN7);
- else if(hp < self.max_health * 0.40)
- setmodel(self, MDL_ONS_GEN6);
- else if(hp < self.max_health * 0.50)
- setmodel(self, MDL_ONS_GEN5);
- else if(hp < self.max_health * 0.60)
- setmodel(self, MDL_ONS_GEN4);
- else if(hp < self.max_health * 0.70)
- setmodel(self, MDL_ONS_GEN3);
- else if(hp < self.max_health * 0.80)
- setmodel(self, MDL_ONS_GEN2);
- else if(hp < self.max_health * 0.90)
- setmodel(self, MDL_ONS_GEN1);
- else if(hp <= self.max_health || hp >= self.max_health)
- setmodel(self, MDL_ONS_GEN);
-
- setsize(self, GENERATOR_MIN, GENERATOR_MAX);
+ setmodel(this, MDL_ONS_GEN_DEAD);
+ else if(hp < this.max_health * 0.10)
+ setmodel(this, MDL_ONS_GEN9);
+ else if(hp < this.max_health * 0.20)
+ setmodel(this, MDL_ONS_GEN8);
+ else if(hp < this.max_health * 0.30)
+ setmodel(this, MDL_ONS_GEN7);
+ else if(hp < this.max_health * 0.40)
+ setmodel(this, MDL_ONS_GEN6);
+ else if(hp < this.max_health * 0.50)
+ setmodel(this, MDL_ONS_GEN5);
+ else if(hp < this.max_health * 0.60)
+ setmodel(this, MDL_ONS_GEN4);
+ else if(hp < this.max_health * 0.70)
+ setmodel(this, MDL_ONS_GEN3);
+ else if(hp < this.max_health * 0.80)
+ setmodel(this, MDL_ONS_GEN2);
+ else if(hp < this.max_health * 0.90)
+ setmodel(this, MDL_ONS_GEN1);
+ else if(hp <= this.max_health || hp >= this.max_health)
+ setmodel(this, MDL_ONS_GEN);
+
+ setsize(this, GENERATOR_MIN, GENERATOR_MAX);