Merge remote branch 'origin/master' into fruitiex/fruitbalance
authorFruitieX <rasse@rasse-lappy.localdomain>
Tue, 27 Jul 2010 11:35:03 +0000 (14:35 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 27 Jul 2010 11:35:03 +0000 (14:35 +0300)
effectinfo.txt
physicsNoQWBunny-nexbased.cfg
qcsrc/client/hook.qc
qcsrc/server/w_electro.qc

index a55f787..4116ae4 100644 (file)
@@ -4976,6 +4976,16 @@ velocityjitter 156 156 156
 // used in qcsrc/server/w_electro.qc:  pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1)
 // used in qcsrc/server/w_electro.qc:  pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1)
 effect electro_lightning
+countabsolute 1
+type decal
+tex 59 59
+size 16 16
+alpha 256 256 0
+originjitter 2 2 2
+lightradius 50
+lightradiusfade 200
+lightcolor 3.125 4.375 10
+effect electro_lightning
 count 300
 type spark
 color 0x501860 0x501860 // 0x202020 0x404040
@@ -5018,11 +5028,11 @@ count 300
 type spark
 color 0x280000 0x280000 // 0x202020 0x404040
 tex 65 65
-size 5 5
+size 3 3
 alpha 256 256 1024
 originjitter 1.5 1.5 1.5
 velocityjitter 6 6 6
-sizeincrease 20
+sizeincrease 15
 velocitymultiplier 2000
 effect gauntlet_lightning
 count 30
index 4a66ddf..d00ffe7 100644 (file)
@@ -11,10 +11,9 @@ sv_friction 8
 edgefriction 1
 sv_stepheight 34
 
-//sv_jumpvelocity 250
-// temp workaround for engine bug (we want 192bpm music to fit)
-sv_jumpvelocity 245
-// 240 would correspond to 200bpm music, could be nice too, but also fails in DP
+// actually, what we want is 266.6666 for 180bpm
+// but 260 takes same amount of frames and is nicer to mappers
+sv_jumpvelocity 260
 sv_wateraccelerate -1
 sv_waterfriction -1
 sv_airaccel_sideways_friction 0
index 513c792..2fe9a86 100644 (file)
@@ -3,6 +3,7 @@
 .vector velocity;
 .float HookSound;
 .float HookSilent;
+.float HookRange;
 
 void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float alpha, float drawflag)
 {
@@ -48,7 +49,7 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
 
 void Draw_GrapplingHook()
 {
-       vector a, b;
+       vector a, b, atrans;
        string tex, snd;
        vector rgb;
        float t;
@@ -86,7 +87,10 @@ void Draw_GrapplingHook()
                                break;
                        case ENT_CLIENT_LGBEAM:
                        case ENT_CLIENT_GAUNTLET:
-                               b = view_origin + view_forward * vlen(self.velocity - self.origin); // honor original length of beam!
+                               if(self.HookRange)
+                                       b = view_origin + view_forward * self.HookRange;
+                               else
+                                       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;
@@ -157,12 +161,14 @@ void Draw_GrapplingHook()
        WarpZone_TraceBox_ThroughZone(a, '0 0 0', '0 0 0', b, ((self.HookType == ENT_CLIENT_HOOK) ? MOVE_NOTHING : MOVE_NORMAL), world, world, Draw_GrapplingHook_trace_callback);
        Draw_GrapplingHook_trace_callback_tex = string_null;
 
+       atrans = WarpZone_TransformOrigin(WarpZone_trace_transform, a);
+
        switch(self.HookType)
        {
                default:
                case ENT_CLIENT_HOOK:
                        setorigin(self, trace_endpos); // hook endpoint!
-                       self.angles = vectoangles(trace_endpos - WarpZone_TransformOrigin(WarpZone_trace_transform, a));
+                       self.angles = vectoangles(trace_endpos - atrans);
                        break;
                case ENT_CLIENT_LGBEAM:
                case ENT_CLIENT_GAUNTLET:
@@ -176,7 +182,7 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_HOOK:
                        break;
                case ENT_CLIENT_LGBEAM:
-                       pointparticles(particleeffectnum("electro_lightning"), b, normalize(a - b), frametime);
+                       pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime);
                        break;
                case ENT_CLIENT_GAUNTLET:
                        pointparticles(particleeffectnum("gauntlet_lightning"), b, normalize(a - b), frametime);
@@ -204,6 +210,17 @@ void Ent_ReadHook(float bIsNew, float type)
        if(sf & 1)
        {
                self.owner = playerslots[ReadByte() - 1];
+               switch(self.HookType)
+               {
+                       default:
+                       case ENT_CLIENT_HOOK:
+                       case ENT_CLIENT_GAUNTLET:
+                               self.HookRange = 0;
+                               break;
+                       case ENT_CLIENT_LGBEAM:
+                               self.HookRange = ReadCoord();
+                               break;
+               }
        }
        if(sf & 2)
        {
index cccd463..a98c5a9 100644 (file)
@@ -195,6 +195,7 @@ float lgbeam_send(entity to, float sf)
        if(sf & 1)
        {
                WriteByte(MSG_ENTITY, num_for_edict(self.owner));
+               WriteCoord(MSG_ENTITY, cvar("g_balance_electro_primary_range"));
        }
        if(sf & 2)
        {