]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Castings for the grabber. Spawns a used rusty fuel bottle when reloading
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Jul 2011 17:01:11 +0000 (20:01 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Jul 2011 17:01:11 +0000 (20:01 +0300)
data/defaultVT.cfg
data/qcsrc/client/casings.qc
data/qcsrc/server/cl_weaponsystem.qc
data/scripts/items.shader

index b32b08019b6d454475956b465c67d22a6ebbaf3d..520b78a4b3ac2486e39fa41f3a40a5d9f3ce90e1 100644 (file)
@@ -406,7 +406,7 @@ set g_fullbrightplayers 0 "brightens up player models (note that the color, skin
 set g_fullbrightitems 0 "brightens up items"\r
 set g_nodepthtestplayers 0 "disables depth testing on players"\r
 set g_nodepthtestitems 0 "disables depth testing on items"\r
-set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"\r
+set g_casings 1 "enable casings"\r
 set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"\r
 set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"\r
 seta g_maplist_mostrecent_count 3      "number of most recent maps that are blocked from being played again"\r
@@ -639,8 +639,7 @@ seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
 seta cl_gibs_ticrate 0.1 "ticrate for gibs"\r
 seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"\r
 seta cl_casings 1 "enable or disable bullet casings"\r
-seta cl_casings_shell_time 30 "shell casing lifetime"\r
-seta cl_casings_bronze_time 10 "bullet casings lifetime"\r
+seta cl_casings_time 10 "shell casing lifetime"\r
 seta cl_casings_ticrate 0.1 "ticrate for casings"\r
 seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"\r
 seta cl_projectiles_sloppy 0 "sloppy projectiles, may temporarily penetrate walls"\r
index f65975fe61bc8c3096c45b263aed727972a6ae87..4268b34cfd324582b66e160dca52319176fa806e 100644 (file)
@@ -47,10 +47,9 @@ void Casing_Touch()
                                switch(self.state)\r
                                {\r
                                        case 1:\r
-                                               s = strcat("weapons/casings", ftos(f), ".wav");\r
+                                               s = strcat("weapons/casing_fuel", ftos(f), ".wav");\r
                                                break;\r
                                        default:\r
-                                               s = strcat("weapons/brass", ftos(f), ".wav");\r
                                                break;\r
                                }\r
 \r
@@ -97,16 +96,14 @@ void Ent_Casing(float isNew)
                casing.move_time = time;\r
                casing.event_damage = Casing_Damage;\r
                casing.solid = SOLID_TRIGGER;\r
+               casing.cnt = time + cvar("cl_casings_time");\r
 \r
                switch(casing.state)\r
                {\r
                        case 1:\r
-                               setmodel(casing, "models/casing_shell.mdl");\r
-                               casing.cnt = time + cvar("cl_casings_shell_time");\r
+                               setmodel(casing, "models/casings/fuel_casing.md3");\r
                                break;\r
                        default:\r
-                               setmodel(casing, "models/casing_bronze.mdl");\r
-                               casing.cnt = time + cvar("cl_casings_bronze_time");\r
                                break;\r
                }\r
 \r
@@ -120,12 +117,8 @@ void Ent_Casing(float isNew)
 \r
 void Casings_Precache()\r
 {\r
-       precache_model("models/casing_shell.mdl");\r
-       precache_model("models/casing_bronze.mdl");\r
-       precache_sound("weapons/brass1.wav");\r
-       precache_sound("weapons/brass2.wav");\r
-       precache_sound("weapons/brass3.wav");\r
-       precache_sound("weapons/casings1.wav");\r
-       precache_sound("weapons/casings2.wav");\r
-       precache_sound("weapons/casings3.wav");\r
+       precache_model("models/casings/fuel_casing.md3");\r
+       precache_sound("weapons/casing_fuel1.wav");\r
+       precache_sound("weapons/casing_fuel2.wav");\r
+       precache_sound("weapons/casing_fuel3.wav");\r
 }\r
index 15e50eb47d8894db021ae54f88c8f80de73b9042..465eeaf99fd2809cb90206ee4bd86f9b6c4e46d7 100644 (file)
@@ -1691,6 +1691,8 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
        // now begin the reloading process\r
 \r
        sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM);\r
+       if(self.weapon == WEP_GRABBER) // spawn grabber casting\r
+               SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1, self);\r
 \r
        // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon,\r
        // then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there,\r
index ccb7a618f1bab98acaf1832d2ccd0ed6acef8fb2..bf5f9edad518741180c7005621ef4cd682da3213 100644 (file)
@@ -14,4 +14,4 @@ models/items/jetpack
                map models/items/jetpack.tga\r
                rgbgen lightingDiffuse\r
        }\r
-}
\ No newline at end of file
+}\r