]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
Remove redundant uses of `var`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index 8b2ffca19cdb6e9997edddd5f6c566d93a7b104a..a537cbae6e87ad7e080feafb7f2b56ec22a82d80 100644 (file)
@@ -86,7 +86,7 @@ void Draw_GrapplingHook()
                {
                        default:
                        case ENT_CLIENT_HOOK:
-                               a = view_origin + view_forward * vs_x + view_right * -vs_y + view_up * vs_z;
+                               a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
                                b = self.origin;
                                break;
                        case ENT_CLIENT_ARC_BEAM:
@@ -96,7 +96,7 @@ void Draw_GrapplingHook()
                                        b = view_origin + view_forward * vlen(self.velocity - self.origin); // honor original length of beam!
                                WarpZone_TraceLine(view_origin, b, MOVE_NORMAL, world);
                                b = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-                               a = view_origin + view_forward * vs_x + view_right * -vs_y + view_up * vs_z;
+                               a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
                                break;
                }
        }
@@ -190,8 +190,7 @@ void Ent_ReadHook(float bIsNew, float type)
 {
        self.HookType = type;
 
-       float sf;
-       sf = ReadByte();
+       int sf = ReadByte();
 
        self.HookSilent = (sf & 0x80);
        self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
@@ -200,7 +199,7 @@ void Ent_ReadHook(float bIsNew, float type)
 
        if(sf & 1)
        {
-               float myowner = ReadByte();
+               int myowner = ReadByte();
                self.owner = playerslots[myowner - 1];
                self.sv_entnum = myowner;
                switch(self.HookType)