]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/parasti/mortar-bounce'
authorRudolf Polzer <divVerent@alientrap.org>
Sat, 8 May 2010 13:18:01 +0000 (15:18 +0200)
committerRudolf Polzer <divVerent@alientrap.org>
Sat, 8 May 2010 13:18:01 +0000 (15:18 +0200)
balance.cfg
balance25.cfg
balanceNexrun.cfg
balanceSamual.cfg
qcsrc/client/projectile.qc
qcsrc/server/csqcprojectile.qc
qcsrc/server/w_grenadelauncher.qc

index 37a36e8d9d0a2acd5618785b4f3e97b6f1a6d154..6bed5814480fa1748aee89ccb8ef875ab4813713 100644 (file)
@@ -309,6 +309,8 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 70
 set g_balance_grenadelauncher_secondary_damageforcescale 4
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
 // }}}
 // {{{ electro
 set g_balance_electro_lightning 0
index 11cc3a40ba08574826427a8b24733d841b0fba45..e3e7b7678de378bca72c1c8d68dc50e2497ac2f9 100644 (file)
@@ -309,6 +309,8 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 10
 set g_balance_grenadelauncher_secondary_damageforcescale 4
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
 // }}}
 // {{{ electro
 set g_balance_electro_lightning 0
index a23e9b462c74527b720fa9e23558a9d478d5ba3d..384f4571974c924827d690c71ccfd0ff656e3328 100644 (file)
@@ -309,6 +309,8 @@ set g_balance_grenadelauncher_secondary_animtime 0.5
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 0
 set g_balance_grenadelauncher_secondary_damageforcescale 0
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
 // }}}
 // {{{ electro
 set g_balance_electro_lightning 1
index 19f7896188a8c8acd764d487c05e748d8fbc5291..2357d8bb1cb361a0c3547dc2f3a6a1ff209769dc 100644 (file)
@@ -309,6 +309,8 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 70
 set g_balance_grenadelauncher_secondary_damageforcescale 4
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
 // }}}
 // {{{ electro
 set g_balance_electro_lightning 0
index 2730a322d22f52ee7a262ff128d52603ed1c44b3..b22a5b9dbd1242e952ca26ff79ac4dc2bdcde629 100644 (file)
@@ -158,9 +158,11 @@ void Ent_RemoveProjectile()
        }
 }
 
+.float bouncefactor;
+.float bouncestop;
 void Ent_Projectile()
 {
-       float f;
+       float f, s;
 
        // projectile properties:
        //   kind (interpolated, or clientside)
@@ -215,8 +217,18 @@ void Ent_Projectile()
                        self.velocity_z = ReadCoord();
                        self.gravity = ReadCoord();
 
+                       s = ReadByte();
+
+                       if (s & 1)
+                       {
+                               self.bouncefactor = ReadCoord();
+                               self.bouncestop = ReadCoord();
+                       }
+
                        self.move_origin = self.origin;
                        self.move_velocity = self.velocity;
+                       self.move_bounce_factor = self.bouncefactor;
+                       self.move_bounce_stopspeed = self.bouncestop;
                }
 
                if(time == self.spawntime || (self.count & 0x80) || (f & 0x10))
index e585b1e37900497737a4800e9f5e5192588a7b50..aecdcf7f2f186b7091123ee7253fcb02753edf9f 100644 (file)
@@ -3,6 +3,7 @@
 float CSQCProjectile_SendEntity(entity to, float sf)
 {
        float ft, fr;
+       float s;
 
        // note: flag 0x10 = no trail please
        sf = sf & 0x1F;
@@ -21,6 +22,13 @@ float CSQCProjectile_SendEntity(entity to, float sf)
                        sf |= 0x20;
        }
 
+       // HACK: subflags for sendflags = 0x80
+
+       s = 0;
+
+       if (self.movetype == MOVETYPE_BOUNCEMISSILE || self.movetype == MOVETYPE_BOUNCE)
+               s |= 1;
+
        WriteByte(MSG_ENTITY, ENT_CLIENT_PROJECTILE);
        WriteByte(MSG_ENTITY, sf);
 
@@ -36,6 +44,14 @@ float CSQCProjectile_SendEntity(entity to, float sf)
                        WriteCoord(MSG_ENTITY, self.velocity_y);
                        WriteCoord(MSG_ENTITY, self.velocity_z);
                        WriteCoord(MSG_ENTITY, self.gravity);
+
+                       WriteByte(MSG_ENTITY, s);
+
+                       if (s & 1)
+                       {
+                               WriteCoord(MSG_ENTITY, self.bouncefactor);
+                               WriteCoord(MSG_ENTITY, self.bouncestop);
+                       }
                }
 
                if(sf & 0x20)
index 80b7020130a945a2a76aa07ab707f75cfb926bc3..559ced33d8193be473e668cb6445cb70ecfd8866 100644 (file)
@@ -127,6 +127,8 @@ void W_Grenade_Attack2 (void)
        gren.bot_dodge = TRUE;
        gren.bot_dodgerating = cvar("g_balance_grenadelauncher_secondary_damage");
        gren.movetype = MOVETYPE_BOUNCE;
+       gren.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
+       gren.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
        setsize(gren, '0 0 -3', '0 0 -3');