]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_hook.qc
be more detailed in complaints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_hook.qc
index 30c3ca54beef26820378f959dfb232b4658af096..370f2fb9878041cea1bac0cd540d82d2c450a231 100644 (file)
@@ -116,12 +116,12 @@ void GrapplingHookThink()
 {
        float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch, s;
        vector dir, org, end, v0, dv, v, myorg, vs;
-       if(self.realowner.health <= 0 || self.realowner.hook != self)   // how did that happen?
-       {                                                                                                               // well, better fix it anyway
-               remove(self);
+       if(self.realowner.hook != self) // how did that happen?
+       {
+               error("Owner lost the hook!\n");
                return;
        }
-       if(LostMovetypeFollow(self))
+       if(LostMovetypeFollow(self) || intermission_running)
        {
                RemoveGrapplingHook(self.realowner);
                return;
@@ -279,8 +279,6 @@ void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, floa
                        
        self.health = self.health - damage;
                
-       print(strcat("hook health ", ftos(self.health), " after ", ftos(damage), " damage... (at time: ", ftos(time), ")\n"));
-               
        if (self.health <= 0)
        {
                if(attacker != self.realowner)
@@ -294,8 +292,8 @@ void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, floa
 
 void FireGrapplingHook (void)
 {
-       local entity missile;
-       local vector org;
+       entity missile;
+       vector org;
        float s;
        vector vs;
 
@@ -330,6 +328,7 @@ void FireGrapplingHook (void)
        self.hook = missile;
        missile.reset = GrapplingHookReset;
        missile.classname = "grapplinghook";
+       missile.flags = FL_PROJECTILE;
 
        missile.movetype = MOVETYPE_FLY;
        PROJECTILE_MAKETRIGGER(missile);
@@ -383,7 +382,7 @@ void FireGrapplingHook (void)
 
 void GrapplingHookFrame()
 {
-       if(g_grappling_hook && timeoutStatus != 2 && self.weapon != WEP_HOOK)
+       if(g_grappling_hook && timeout_status != TIMEOUT_ACTIVE && self.weapon != WEP_HOOK)
        {
                // offhand hook controls
                if(self.BUTTON_HOOK)