]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/tturrets/system/system_damage.qc
Avoid memory leak in the resolution slider when toggling the fullscreen
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / tturrets / system / system_damage.qc
index 48f76219bd40a6417432422749ab5800f57a1c0f..4145a6ea34d98addf774368c5d31406ede54d1cb 100644 (file)
@@ -18,7 +18,7 @@ void turret_stdproc_die()
     self.solid              = SOLID_NOT;
     self.tur_head.solid     = self.solid;
 
-    self.event_damage           = SUB_Null;
+    self.event_damage           = func_null;
     self.takedamage             = DAMAGE_NO;
 
     self.health             = 0;
@@ -52,7 +52,7 @@ void turret_stdproc_respawn()
     // this function doubles as "teamchange" function.
     self.tur_head.team         = self.team;
 
-    self.effects             &~= EF_NODRAW;
+    self.effects             &= ~EF_NODRAW;
     self.deadflag           = DEAD_NO;
     self.effects            = EF_LOWPRECISION;
     self.solid              = SOLID_BBOX;
@@ -95,7 +95,7 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     if (self.team == attacker.team)
     {
         // This does not happen anymore. Re-enable if you fix that.
-        if(clienttype(attacker) == CLIENTTYPE_REAL)
+        if(IS_REAL_CLIENT(attacker))
             sprint(attacker, "\{1}Turret tells you: I'm on your team!\n");
 
         if(autocvar_g_friendlyfire)
@@ -120,8 +120,8 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     
     if (self.health <= 0)
     {
-        self.event_damage           = SUB_Null;
-        self.tur_head.event_damage  = SUB_Null;
+        self.event_damage           = func_null;
+        self.tur_head.event_damage  = func_null;
         self.takedamage             = DAMAGE_NO;
         self.nextthink = time;
         self.think = turret_stdproc_die;