]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
Merge branch 'master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index 889e75d2679dc65cb7bfd18726479fd38fd8f97f..8b2ffca19cdb6e9997edddd5f6c566d93a7b104a 100644 (file)
@@ -75,11 +75,8 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_HOOK:
                        vs = hook_shotorigin[s];
                        break;
-               case ENT_CLIENT_LGBEAM:
-                       vs = electro_shotorigin[s];
-                       break;
-               case ENT_CLIENT_GAUNTLET:
-                       vs = gauntlet_shotorigin[s];
+               case ENT_CLIENT_ARC_BEAM:
+                       vs = lightning_shotorigin[s];
                        break;
        }
 
@@ -92,8 +89,7 @@ void Draw_GrapplingHook()
                                a = view_origin + view_forward * vs_x + view_right * -vs_y + view_up * vs_z;
                                b = self.origin;
                                break;
-                       case ENT_CLIENT_LGBEAM:
-                       case ENT_CLIENT_GAUNTLET:
+                       case ENT_CLIENT_ARC_BEAM:
                                if(self.HookRange)
                                        b = view_origin + view_forward * self.HookRange;
                                else
@@ -113,8 +109,7 @@ void Draw_GrapplingHook()
                                a = self.velocity;
                                b = self.origin;
                                break;
-                       case ENT_CLIENT_LGBEAM:
-                       case ENT_CLIENT_GAUNTLET:
+                       case ENT_CLIENT_ARC_BEAM:
                                a = self.origin;
                                b = self.velocity;
                                break;
@@ -138,18 +133,12 @@ void Draw_GrapplingHook()
                                default: tex = "particles/hook_white"; rgb = getcsqcplayercolor(self.sv_entnum); break;
                        }
                        break;
-               case ENT_CLIENT_LGBEAM:
+               case ENT_CLIENT_ARC_BEAM: // todo
                        intensity = bound(0.2, 1 + Noise_Pink(self, frametime) * 1 + Noise_Burst(self, frametime, 0.03) * 0.3, 2);
                        offset = Noise_Brown(self, frametime) * 10;
                        tex = "particles/lgbeam";
                        rgb = '1 1 1';
                        break;
-               case ENT_CLIENT_GAUNTLET:
-                       intensity = 1;
-                       offset = Noise_White(self, frametime);
-                       tex = "particles/gauntletbeam";
-                       rgb = '1 1 1';
-                       break;
        }
 
        Draw_GrapplingHook_trace_callback_tex = tex;
@@ -176,8 +165,7 @@ void Draw_GrapplingHook()
                                self.drawmask = 0;
                        }
                        break;
-               case ENT_CLIENT_LGBEAM:
-               case ENT_CLIENT_GAUNTLET:
+               case ENT_CLIENT_ARC_BEAM:
                        setorigin(self, a); // beam origin!
                        break;
        }
@@ -187,11 +175,8 @@ void Draw_GrapplingHook()
                default:
                case ENT_CLIENT_HOOK:
                        break;
-               case ENT_CLIENT_LGBEAM:
-                       pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity);
-                       break;
-               case ENT_CLIENT_GAUNTLET:
-                       pointparticles(particleeffectnum("gauntlet_lightning"), b, normalize(a - b), frametime * intensity);
+               case ENT_CLIENT_ARC_BEAM:
+                       pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
                        break;
        }
 }
@@ -222,10 +207,9 @@ void Ent_ReadHook(float bIsNew, float type)
                {
                        default:
                        case ENT_CLIENT_HOOK:
-                       case ENT_CLIENT_GAUNTLET:
                                self.HookRange = 0;
                                break;
-                       case ENT_CLIENT_LGBEAM:
+                       case ENT_CLIENT_ARC_BEAM:
                                self.HookRange = ReadCoord();
                                break;
                }
@@ -259,12 +243,9 @@ void Ent_ReadHook(float bIsNew, float type)
                                setmodel(self, "models/hook.md3");
                                self.drawmask = MASK_NORMAL;
                                break;
-                       case ENT_CLIENT_LGBEAM:
+                       case ENT_CLIENT_ARC_BEAM:
                                sound (self, CH_SHOTS_SINGLE, "weapons/lgbeam_fly.wav", VOL_BASE, ATTEN_NORM);
                                break;
-                       case ENT_CLIENT_GAUNTLET:
-                               sound (self, CH_SHOTS_SINGLE, "weapons/gauntletbeam_fly.wav", VOL_BASE, ATTEN_NORM);
-                               break;
                }
        }
 
@@ -274,7 +255,6 @@ void Ent_ReadHook(float bIsNew, float type)
 void Hook_Precache()
 {
        precache_sound("weapons/lgbeam_fly.wav");
-       precache_sound("weapons/gauntletbeam_fly.wav");
        precache_model("models/hook.md3");
 }