From: MirceaKitsune Date: Wed, 13 Jul 2011 19:22:43 +0000 (+0300) Subject: Base stomach kick sounds on player scale difference, and tweak the system a bit X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8f279042386c373530aebd7f8d568c766da74dd2;p=voretournament%2Fvoretournament.git Base stomach kick sounds on player scale difference, and tweak the system a bit --- diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index 7a5d7b1c..92c77a39 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -1236,10 +1236,7 @@ void GlobalSound(string sample, float chan, float voicetype) if(self.stat_eaten && cvar("g_vore_soundocclusion")) // reduce sound volume for prey, to simulate stomach culling vol *= cvar("g_vore_soundocclusion"); if(cvar("g_healthsize") && cvar("g_healthsize_soundfactor")) // amplify or reduce sound volume based on the size of the player - { - vol /= 2; // volume being greater than 1 causes stuff to brake, so it must be 0.5 at normal scale vol *= (self.scale * cvar("g_healthsize_soundfactor")); - } vol = bound(0, vol, 1); switch(voicetype) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index e47b0655..736e7bda 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -537,20 +537,23 @@ void Vore_StomachKick() if(time > self.stomachkick_delay && !self.kick_pressed) { - float damage; + float damage, vol; vector force; damage = ceil(random() * (cvar("g_balance_vore_kick_damage_max") - cvar("g_balance_vore_kick_damage_min")) + cvar("g_balance_vore_kick_damage_min")); force = v_forward * cvar("g_balance_vore_kick_force"); + vol = VOL_BASE; // apply player scale to the damage / force of the kick - if(cvar("g_balance_vore_kick_scalediff")) + if(cvar("g_healthsize") && cvar("g_balance_vore_kick_scalediff")) { damage *= (self.scale / self.predator.scale); force *= (self.scale / self.predator.scale); + vol *= (self.scale / self.predator.scale); // kick sound volume based on the same scale } + vol = bound(0, vol, 1); Damage(self.predator, self, self, damage, DEATH_STOMACHKICK, self.predator.origin, force); - sound(self.predator, CHAN_PROJECTILE, strcat("weapons/hit", ftos(floor(random() * 8)), ".wav"), VOL_BASE, ATTN_NORM); + sound(self.predator, CHAN_PROJECTILE, strcat("weapons/hit", ftos(floor(random() * 8)), ".wav"), vol, ATTN_NORM); self.predator.punchangle_x -= cvar("g_balance_vore_kick_predator_punchangle"); self.punchangle_x += cvar("g_balance_vore_kick_prey_punchangle");