]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Start working on a new system which calculates weapon values for external
authorSamual Lenks <samual@xonotic.org>
Wed, 14 Aug 2013 17:52:06 +0000 (13:52 -0400)
committerSamual Lenks <samual@xonotic.org>
Wed, 14 Aug 2013 17:52:06 +0000 (13:52 -0400)
usage

qcsrc/common/weapons/w_mortar.qc
qcsrc/server/weapons/tracing.qc

index ef6a36be219f7e1a7ba6f22ff2f69d74044d8d5b..fa9aae39032d609212213043215c50c84c654098 100644 (file)
@@ -336,6 +336,22 @@ float w_glauncher(float req)
                        
                        return TRUE;
                }
+               /*case WR_CALCINFO:
+               {
+                       wepinfo_pri_refire = max3(sys_frametime, WEP_CVAR_PRI(mortar, refire), WEP_CVAR_PRI(mortar, animtime));
+                       wepinfo_pri_dps = (WEP_CVAR_PRI(mortar, damage) * (1 / wepinfo_pri_refire));
+                       wepinfo_pri_speed = (1 / max(1, (10000 / max(1, WEP_CVAR_PRI(mortar, speed)))));
+
+                       // for the range calculation, closer to 1 is better
+                       wepinfo_pri_range_max = 2000 * wepinfo_pri_speed;
+                       wepinfo_pri_range = wepinfo_pri_speed * WEP_CVAR_PRI(mortar, 
+                       
+                       wepinfo_sec_refire = max3(sys_frametime, WEP_CVAR_SEC(mortar, refire), WEP_CVAR_SEC(mortar, animtime));
+                       wepinfo_sec_dps = (WEP_CVAR_SEC(mortar, damage) * (1 / wepinfo_sec_refire));
+                       
+                       wepinfo_sec_dps = (WEP_CVAR_SEC(mortar, damage) * (1 / max3(sys_frametime, WEP_CVAR_SEC(mortar, refire), WEP_CVAR_SEC(mortar, animtime))));
+                       wepinfo_ter_dps = 0;
+                       */
                case WR_THINK:
                {
                        if(autocvar_g_balance_mortar_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo))) // forced reload
index 50dcd532fb26fee30c15a8a7c45d0a2c5003154b..dd215ba14c246c973c3419ff1ac51004d71b3f28 100644 (file)
@@ -104,7 +104,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
 
        ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
 
-       if (!g_norecoil)
+       if (!autocvar_g_norecoil)
                ent.punchangle_x = recoil * -1;
 
        if (snd != "")