if(self.stat_eaten && cvar("g_vore_soundocclusion")) // reduce sound volume for prey, to simulate stomach culling\r
vol *= cvar("g_vore_soundocclusion");\r
if(cvar("g_healthsize") && cvar("g_healthsize_soundfactor")) // amplify or reduce sound volume based on the size of the player\r
- {\r
- vol /= 2; // volume being greater than 1 causes stuff to brake, so it must be 0.5 at normal scale\r
vol *= (self.scale * cvar("g_healthsize_soundfactor"));\r
- }\r
vol = bound(0, vol, 1);\r
\r
switch(voicetype)\r
\r
if(time > self.stomachkick_delay && !self.kick_pressed)\r
{\r
- float damage;\r
+ float damage, vol;\r
vector force;\r
damage = ceil(random() * (cvar("g_balance_vore_kick_damage_max") - cvar("g_balance_vore_kick_damage_min")) + cvar("g_balance_vore_kick_damage_min"));\r
force = v_forward * cvar("g_balance_vore_kick_force");\r
+ vol = VOL_BASE;\r
\r
// apply player scale to the damage / force of the kick\r
- if(cvar("g_balance_vore_kick_scalediff"))\r
+ if(cvar("g_healthsize") && cvar("g_balance_vore_kick_scalediff"))\r
{\r
damage *= (self.scale / self.predator.scale);\r
force *= (self.scale / self.predator.scale);\r
+ vol *= (self.scale / self.predator.scale); // kick sound volume based on the same scale\r
}\r
+ vol = bound(0, vol, 1);\r
\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_BASE, ATTN_NORM);\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
\r