From: MirceaKitsune Date: Tue, 12 Jul 2011 17:01:11 +0000 (+0300) Subject: Castings for the grabber. Spawns a used rusty fuel bottle when reloading X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=67108e43e9ce117a18035e38d6eca974fd243554;p=voretournament%2Fvoretournament.git Castings for the grabber. Spawns a used rusty fuel bottle when reloading --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index b32b0801..520b78a4 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -406,7 +406,7 @@ set g_fullbrightplayers 0 "brightens up player models (note that the color, skin set g_fullbrightitems 0 "brightens up items" set g_nodepthtestplayers 0 "disables depth testing on players" set g_nodepthtestitems 0 "disables depth testing on items" -set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client" +set g_casings 1 "enable casings" set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)" set g_maplist_mostrecent "" "contains the name of the maps that were most recently played" seta g_maplist_mostrecent_count 3 "number of most recent maps that are blocked from being played again" @@ -639,8 +639,7 @@ seta cl_gibs_velocity_up 0 "extra z velocity for gibs" seta cl_gibs_ticrate 0.1 "ticrate for gibs" seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls" seta cl_casings 1 "enable or disable bullet casings" -seta cl_casings_shell_time 30 "shell casing lifetime" -seta cl_casings_bronze_time 10 "bullet casings lifetime" +seta cl_casings_time 10 "shell casing lifetime" seta cl_casings_ticrate 0.1 "ticrate for casings" seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls" seta cl_projectiles_sloppy 0 "sloppy projectiles, may temporarily penetrate walls" diff --git a/data/qcsrc/client/casings.qc b/data/qcsrc/client/casings.qc index f65975fe..4268b34c 100644 --- a/data/qcsrc/client/casings.qc +++ b/data/qcsrc/client/casings.qc @@ -47,10 +47,9 @@ void Casing_Touch() switch(self.state) { case 1: - s = strcat("weapons/casings", ftos(f), ".wav"); + s = strcat("weapons/casing_fuel", ftos(f), ".wav"); break; default: - s = strcat("weapons/brass", ftos(f), ".wav"); break; } @@ -97,16 +96,14 @@ void Ent_Casing(float isNew) casing.move_time = time; casing.event_damage = Casing_Damage; casing.solid = SOLID_TRIGGER; + casing.cnt = time + cvar("cl_casings_time"); switch(casing.state) { case 1: - setmodel(casing, "models/casing_shell.mdl"); - casing.cnt = time + cvar("cl_casings_shell_time"); + setmodel(casing, "models/casings/fuel_casing.md3"); break; default: - setmodel(casing, "models/casing_bronze.mdl"); - casing.cnt = time + cvar("cl_casings_bronze_time"); break; } @@ -120,12 +117,8 @@ void Ent_Casing(float isNew) void Casings_Precache() { - precache_model("models/casing_shell.mdl"); - precache_model("models/casing_bronze.mdl"); - precache_sound("weapons/brass1.wav"); - precache_sound("weapons/brass2.wav"); - precache_sound("weapons/brass3.wav"); - precache_sound("weapons/casings1.wav"); - precache_sound("weapons/casings2.wav"); - precache_sound("weapons/casings3.wav"); + precache_model("models/casings/fuel_casing.md3"); + precache_sound("weapons/casing_fuel1.wav"); + precache_sound("weapons/casing_fuel2.wav"); + precache_sound("weapons/casing_fuel3.wav"); } diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 15e50eb4..465eeaf9 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1691,6 +1691,8 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri // now begin the reloading process sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM); + if(self.weapon == WEP_GRABBER) // spawn grabber casting + 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); // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon, // then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there, diff --git a/data/scripts/items.shader b/data/scripts/items.shader index ccb7a618..bf5f9eda 100644 --- a/data/scripts/items.shader +++ b/data/scripts/items.shader @@ -14,4 +14,4 @@ models/items/jetpack map models/items/jetpack.tga rgbgen lightingDiffuse } -} \ No newline at end of file +}