]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_hook.qc
Use PHYS_INPUT_BUTTON_*
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_hook.qc
index e6c583baac580514c54f91bb745d93c7e20c077f..c0509a3f69b0d5d8386f7d32a218882980618286 100644 (file)
@@ -251,7 +251,7 @@ void GrapplingHookThink()
                                                        self.aiment.nextthink = time + autocvar_g_balance_grapplehook_nade_time; // set time after letting go?
                                                aim_ent.pusher = self.realowner;
                                                aim_ent.pushltime = time + autocvar_g_maxpushtime;
-                                               aim_ent.istypefrag = aim_ent.BUTTON_CHAT;
+                                               aim_ent.istypefrag = PHYS_INPUT_BUTTON_CHAT(aim_ent);
                                        }
                                }
 
@@ -317,25 +317,25 @@ void GrapplingHookTouch ()
        //self.realowner.disableclientprediction = true;
 }
 
-void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{SELFPARAM();
-       if(self.health <= 0)
+void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
+       if(this.health <= 0)
                return;
 
-       if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
+       if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
                return; // g_balance_projectiledamage says to halt
 
-       self.health = self.health - damage;
+       this.health = this.health - damage;
 
-       if (self.health <= 0)
+       if (this.health <= 0)
        {
-               if(attacker != self.realowner)
+               if(attacker != this.realowner)
                {
-                       self.realowner.pusher = attacker;
-                       self.realowner.pushltime = time + autocvar_g_maxpushtime;
-                       self.realowner.istypefrag = self.realowner.BUTTON_CHAT;
+                       this.realowner.pusher = attacker;
+                       this.realowner.pushltime = time + autocvar_g_maxpushtime;
+                       this.realowner.istypefrag = PHYS_INPUT_BUTTON_CHAT(this.realowner);
                }
-               RemoveGrapplingHook(self.realowner);
+               RemoveGrapplingHook(this.realowner);
        }
 }