]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Randomize all recoils and punch angles in several directions
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 31 Jan 2012 12:13:56 +0000 (14:13 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 31 Jan 2012 12:13:56 +0000 (14:13 +0200)
data/balanceVT.cfg
data/qcsrc/server/cl_weaponsystem.qc
data/qcsrc/server/t_items.qc
data/qcsrc/server/vore.qc
docs/TODO.txt

index c4de250460bd9d26d7d0c13d05d93e562ec73d1a..3e646b3d9b41d2481c5dc81c6b86971e29fa965e 100644 (file)
@@ -209,7 +209,7 @@ set g_balance_vore_swallow_speed_cutspd_prey 1 "prey movement slows down by this
 set g_balance_vore_swallow_speed_cutspd_pred 0.5 "predator movement slows down by this amount the closer they are to finishing swallowing"\r
 set g_balance_vore_swallow_speed 1 "how long it takes to swallow a player"\r
 set g_balance_vore_swallow_dropweapon 0.6 "probability of dropping your weapon when swallowed. 0 = never and 1 = always, does not apply to team mates"\r
-set g_balance_vore_swallow_predator_punchangle 12 "your view gets tilted by this amount when swallowing someone"\r
+set g_balance_vore_swallow_predator_punchangle 10 "your view gets tilted by this amount when swallowing someone"\r
 set g_balance_vore_swallow_predator_punchangle_item 6 "your view gets tilted by this amount when swallowing an item"\r
 set g_balance_vore_swallow_prey_punchvector 25 "your view gets lifted by this amount when getting swallowed"\r
 set g_balance_vore_regurgitate_damage 10 "predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)"\r
@@ -217,8 +217,8 @@ set g_balance_vore_regurgitate_swallowprogress 0.5 "regurgitated prey is given t
 set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at this speed, in the direction the predator is facing"\r
 set g_balance_vore_regurgitate_predatorforce 450 "players are pushed back by this amount when regurgitating someone, opposite of the direction they are facing"\r
 set g_balance_vore_regurgitate_delay 0.5 "regurgitation delay"\r
-set g_balance_vore_regurgitate_predator_punchangle 12 "your view gets tilted by this amount when regurgitating someone"\r
-set g_balance_vore_regurgitate_predator_punchangle_item 6 "your view gets tilted by this amount when regurgitating an item"\r
+set g_balance_vore_regurgitate_predator_punchangle 10 "your view gets tilted by this amount when regurgitating someone"\r
+set g_balance_vore_regurgitate_predator_punchangle_item 4 "your view gets tilted by this amount when regurgitating an item"\r
 set g_balance_vore_regurgitate_prey_punchvector 50 "your view gets lowered by this amount when getting regurgitated"\r
 set g_balance_vore_digestion_damage 3 "amount of damage applied to victims during digestion"\r
 set g_balance_vore_digestion_damage_death 4.5 "amount of damage applied to dead victims during digestion"\r
@@ -237,8 +237,8 @@ set g_balance_vore_kick_delay 0.6 "how many seconds must pass before you can per
 set g_balance_vore_kick_force 320 "predators are pushed by this amount when stomach kicked, in the direction their prey is facing"\r
 set g_balance_vore_kick_repress 0 "require pressing the fire key each kick rather than holding it down"\r
 set g_balance_vore_kick_scalediff 0.5 "the damage / force of stomach kicks is affected by the size of the prey compared to the size of the predator by this amount"\r
-set g_balance_vore_kick_predator_punchangle 6 "your view gets tilted by this amount when receiving stomach kicks"\r
-set g_balance_vore_kick_prey_punchangle 6 "your view gets tilted by this amount when dealing stomach kicks"\r
+set g_balance_vore_kick_predator_punchangle 8 "your view gets tilted by this amount when receiving stomach kicks"\r
+set g_balance_vore_kick_prey_punchangle 8 "your view gets tilted by this amount when dealing stomach kicks"\r
 set g_balance_vore_kick_cutregurgitate 0.75 "probability that a stomach kick will cause the predator to lose a scheduled regurgitation"\r
 set g_balance_vore_escapeprobability 0.003 "probability of getting regurgitated when the predator takes damage, based on the amount of damage dealt"\r
 set g_balance_vore_deadpredator 1 "allow dead predators to keep their prey, as long as their body isn't gibbed"\r
index e90c78e08ac99eeeeb45b23dc647eee4a90a5171..dedc00ba75aa1fe5cb1ec6eaefaf3d2c4e3ca8b3 100644 (file)
@@ -223,7 +223,10 @@ void W_SetupShot_Dir_ProjectileSize(entity ent, vector s_forward, vector mi, vec
        ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)\r
 \r
        if (!g_norecoil)\r
-               ent.punchangle_x -= recoil;\r
+       {\r
+               ent.punchangle_x += crandom() * recoil;\r
+               ent.punchangle_y += crandom() * recoil;\r
+       }\r
 \r
        if (snd != "")\r
        {\r
index 299632a85e68797819e46b1d93031c2cbcb33880..73e333334f4061e6f80b327e3c4b2cadb3cfc2eb 100644 (file)
@@ -297,7 +297,9 @@ void Item_Consumable_Remove(entity e, float regurgitate)
                PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
                setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
                pointparticles(particleeffectnum("vore_regurgitate"), e.predator.origin, '0 0 0', 1);\r
-               e.predator.punchangle_x += cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
+               e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
+               e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
+               e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
                e.predator.regurgitate_prepare = 0;\r
                e.predator.action_delay = time + cvar("g_balance_vore_action_delay");\r
 \r
@@ -348,7 +350,9 @@ void Item_Consumable_Spawn(entity e, entity pl)
        // predator effects, some common to those in Vore_Swallow\r
        PlayerSound(pl, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(pl, pl.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
-       pl.punchangle_x -= cvar("g_balance_vore_swallow_predator_punchangle_item");\r
+       pl.punchangle_x = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item");\r
+       pl.punchangle_y = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item");\r
+       pl.punchangle_z = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item");\r
        pl.regurgitate_prepare = 0;\r
        pl.action_delay = time + cvar("g_balance_vore_action_delay");\r
 }\r
index 464afe503b6966e736aa3a0640fadc8deaee8115..ef7f0291b236b7a5fdae257a5cabba39d64ac953 100644 (file)
@@ -314,7 +314,9 @@ void Vore_Swallow(entity e)
 \r
        PlayerSound(e.predator, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
-       e.predator.punchangle_x -= cvar("g_balance_vore_swallow_predator_punchangle");\r
+       e.predator.punchangle_x = crandom() * cvar("g_balance_vore_swallow_predator_punchangle");\r
+       e.predator.punchangle_y = crandom() * cvar("g_balance_vore_swallow_predator_punchangle");\r
+       e.predator.punchangle_z = crandom() * cvar("g_balance_vore_swallow_predator_punchangle");\r
        e.predator.regurgitate_prepare = 0;\r
        e.predator.spawnshieldtime = 0; // lose spawn shield when we vore\r
        e.predator.hitsound += 1; // play this for team mates too, as we could be swallowing them to heal them\r
@@ -412,7 +414,9 @@ void Vore_Regurgitate(entity e)
        PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
        pointparticles(particleeffectnum("vore_regurgitate"), e.predator.origin, '0 0 0', 1);\r
-       e.predator.punchangle_x += cvar("g_balance_vore_regurgitate_predator_punchangle");\r
+       e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle");\r
+       e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle");\r
+       e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle");\r
        e.predator.regurgitate_prepare = 0;\r
        e.predator.action_delay = time + cvar("g_balance_vore_action_delay");\r
        Vore_SetPreyPositions(e.predator);\r
@@ -536,8 +540,12 @@ void Vore_StomachKick()
 \r
                Damage(self.predator, self, self, damage, DEATH_STOMACHKICK, self.predator.origin, force);\r
                sound(self.predator, CHAN_PROJECTILE, strcat("weapons/hit", ftos(floor(random() * 8)), ".wav"), vol, ATTN_NORM);\r
-               self.predator.punchangle_x -= cvar("g_balance_vore_kick_predator_punchangle");\r
-               self.punchangle_x += cvar("g_balance_vore_kick_prey_punchangle");\r
+               self.predator.punchangle_x = crandom() * cvar("g_balance_vore_kick_predator_punchangle");\r
+               self.predator.punchangle_y = crandom() * cvar("g_balance_vore_kick_predator_punchangle");\r
+               self.predator.punchangle_z = crandom() * cvar("g_balance_vore_kick_predator_punchangle");\r
+               self.punchangle_x = crandom() * cvar("g_balance_vore_kick_prey_punchangle");\r
+               self.punchangle_y = crandom() * cvar("g_balance_vore_kick_prey_punchangle");\r
+               self.punchangle_z = crandom() * cvar("g_balance_vore_kick_prey_punchangle");\r
 \r
                // abort the predator's scheduled regurgitation\r
                if(random() < cvar("g_balance_vore_kick_cutregurgitate"))\r
index d9d82b42cf3b318d5c3f53f0fdcdbec9a6eda65a..d57912e0d6f7c3f3964e759ff374643374e19455 100644 (file)
 \r
 - +0.8: Fix flying spectators not going through teleporters and warpzones. Very hard, since they're FLY_WORLDONLY and can't touch triggers\r
 \r
-- 0.7: Randomize all punchangles.\r
-\r
 - 0.7 | 0.8: Enable r_shadows in some way?\r
 \r
 - 0.7 BUG: Flying spectators cause impact particles. Don't!\r