Add iqm support to the code, and use it for weapons. Alt fire anim will play melee...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 22:49:43 +0000 (01:49 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 22:49:43 +0000 (01:49 +0300)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_weaponsystem.qc
data/qcsrc/server/miscfunctions.qc
data/qcsrc/server/w_grabber.qc

index 8e3754b..b096334 100644 (file)
@@ -406,6 +406,7 @@ string CheckPlayerModel(string plyermodel) {
        {\r
                if(substring(plyermodel,-4,4) != ".zym")\r
                if(substring(plyermodel,-4,4) != ".dpm")\r
+               if(substring(plyermodel,-4,4) != ".iqm")\r
                if(substring(plyermodel,-4,4) != ".md3")\r
                if(substring(plyermodel,-4,4) != ".psk")\r
                        return FallbackPlayerModel;\r
index d806913..6c086a0 100644 (file)
@@ -382,8 +382,8 @@ void CL_Weaponentity_Think()
                        }\r
                        else\r
                        {\r
-                               setmodel(self, strcat("models/weapons/h_", self.owner.weaponname, ".dpm")); // precision set below\r
-                               animfilename = strcat("models/weapons/h_", self.owner.weaponname, ".dpm.animinfo");\r
+                               setmodel(self, strcat("models/weapons/h_", self.owner.weaponname, ".iqm")); // precision set below\r
+                               animfilename = strcat("models/weapons/h_", self.owner.weaponname, ".iqm.animinfo");\r
                                animfile = fopen(animfilename, FILE_READ);\r
                                // preset some defaults that work great for renamed zym files (which don't need an animinfo)\r
                                self.anim_fire1  = '0 1 0.01';\r
@@ -567,7 +567,7 @@ void CL_Weaponentity_Think()
 \r
        if(self.owner.alpha == default_player_alpha)\r
                self.alpha = default_weapon_alpha;\r
-       else if(self.owner.alpha != 0)\r
+       else if(self.owner.alpha != 0 && self.owner.predator.classname != "player")\r
                self.alpha = self.owner.alpha;\r
        else\r
                self.alpha = 1;\r
index 09e882f..d6d54ed 100644 (file)
@@ -1353,6 +1353,7 @@ void precache()
         precache_all_models("models/player/*.dpm");\r
         precache_all_models("models/player/*.md3");\r
         precache_all_models("models/player/*.psk");\r
+               precache_all_models("models/player/*.iqm");\r
         //precache_model("models/player/vixen.zym");\r
     }\r
 \r
index 34b1377..7274dd6 100644 (file)
@@ -191,7 +191,7 @@ float w_grabber(float req)
        {\r
                precache_model ("models/weapons/g_grabber.md3");\r
                precache_model ("models/weapons/v_grabber.md3");\r
-               precache_model ("models/weapons/h_grabber.dpm");\r
+               precache_model ("models/weapons/h_grabber.iqm");\r
                precache_sound ("weapons/grabber_impact.wav"); // done by g_grabber.qc\r
                precache_sound ("weapons/grabber_fire.wav");\r
                precache_sound ("weapons/grabber_altfire.wav");\r