]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Make the earthquake sounds work properly with macro players
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 3 Mar 2012 14:12:32 +0000 (16:12 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 3 Mar 2012 14:12:32 +0000 (16:12 +0200)
data/qcsrc/server/miscfunctions.qc
data/qcsrc/server/sv_main.qc

index bcf1c1d8b09263e482a82708d3c3639fb1a1f56b..4ccf1e265b0518d8d3d5082e7a1d96c096638532 100644 (file)
@@ -2614,5 +2614,5 @@ float playersize_macro(entity e)
 {\r
        if(!cvar("g_healthsize"))\r
                return 0;\r
-       return bound(0, (e.health / cvar("g_healthsize_max") - 1) / (cvar("g_healthsize_center") / cvar("g_healthsize_max") - 1), 1);\r
+       return 1 - bound(0, (e.health / cvar("g_healthsize_max") - 1) / (cvar("g_healthsize_center") / cvar("g_healthsize_max") - 1), 1);\r
 }\r
index 92819c2cf3b8a850be0ba19b0682656652859866..e2f26c8c066478461ca7f1d09dbc78d72311ffa9 100644 (file)
@@ -124,7 +124,7 @@ void CreatureFrame (void)
                                                else\r
                                                        GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * micro_to_normal, 1));\r
 \r
-                                               //sound(self, CHAN_AUTO, "misc/macro_footstep.wav", VOL_BASE, ATTN_NORM);\r
+                                               sound(self, CHAN_AUTO, "misc/macro_footstep.wav", bound(0, VOL_BASE * normal_to_macro, 1), ATTN_NORM);\r
                                        }\r
                                }\r
                        }\r