fix is_right
authorRudolf Polzer <divverent@alientrap.org>
Mon, 19 Jul 2010 10:52:08 +0000 (12:52 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 19 Jul 2010 10:52:08 +0000 (12:52 +0200)
qcsrc/client/hook.qc
qcsrc/server/g_hook.qc
qcsrc/server/w_electro.qc

index 511ee86..f67da87 100644 (file)
@@ -67,7 +67,7 @@ void Draw_GrapplingHook()
                vs = hook_shotorigin[s];
 
                if(self.sv_entnum == player_localentnum - 1)
-                       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;
                else
                        a = self.HookStart;
                b = self.HookEnd;
@@ -115,7 +115,7 @@ void Draw_GrapplingHook()
                vs = electro_shotorigin[s];
 
                if(self.sv_entnum == player_localentnum - 1)
-                       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;
                else
                        a = self.LGBeamStart;
                b = self.LGBeamEnd;
index 0302051..8b7c660 100644 (file)
@@ -140,7 +140,7 @@ void GrapplingHookThink()
        vs = hook_shotorigin[s];
 
        makevectors(self.owner.v_angle);
-       org = self.owner.origin + self.owner.view_ofs + v_forward * vs_x + v_right * vs_y + v_up * vs_z;
+       org = self.owner.origin + self.owner.view_ofs + v_forward * vs_x + v_right * -vs_y + v_up * vs_z;
        myorg = WarpZone_RefSys_TransformOrigin(self.owner, self, org);
 
        if(self.hook_length < 0)
@@ -316,7 +316,7 @@ void FireGrapplingHook (void)
 
        // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
        sound (self, CHAN_WEAPON2, "weapons/hook_fire.wav", VOL_BASE, ATTN_NORM);
-       org = self.origin + self.view_ofs + v_forward * vs_x + v_right * vs_y + v_up * vs_z;
+       org = self.origin + self.view_ofs + v_forward * vs_x + v_right * -vs_y + v_up * vs_z;
        pointparticles(particleeffectnum("grapple_muzzleflash"), org, '0 0 0', 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
@@ -461,18 +461,18 @@ void GrappleHookInit()
 {
        if(g_grappling_hook)
        {
-               hook_shotorigin[0] = '8 -8 -12';
-               hook_shotorigin[1] = '8 -8 -12';
-               hook_shotorigin[2] = '8 -8 -12';
-               hook_shotorigin[3] = '8 -8 -12';
+               hook_shotorigin[0] = '8 8 -12';
+               hook_shotorigin[1] = '8 8 -12';
+               hook_shotorigin[2] = '8 8 -12';
+               hook_shotorigin[3] = '8 8 -12';
        }
        else
        {
                weapon_action(WEP_HOOK, WR_PRECACHE);
-               hook_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), TRUE, FALSE, 1);
-               hook_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), TRUE, FALSE, 2);
-               hook_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), TRUE, FALSE, 3);
-               hook_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), TRUE, FALSE, 4);
+               hook_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 1);
+               hook_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 2);
+               hook_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 3);
+               hook_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 4);
        }
 }
 
index 45a9b91..c2e57d2 100644 (file)
@@ -261,10 +261,10 @@ void W_Electro_Attack3 (void)
 void ElectroInit()
 {
        weapon_action(WEP_ELECTRO, WR_PRECACHE);
-       electro_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), TRUE, FALSE, 1);
-       electro_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), TRUE, FALSE, 2);
-       electro_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), TRUE, FALSE, 3);
-       electro_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), TRUE, FALSE, 4);
+       electro_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), FALSE, FALSE, 1);
+       electro_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), FALSE, FALSE, 2);
+       electro_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), FALSE, FALSE, 3);
+       electro_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ELECTRO), FALSE, FALSE, 4);
 }
 
 void spawnfunc_weapon_electro (void)