set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
set g_healthsize_weapon_scalefactor_pos 6 "Amount by which the view model is moved vertically based on player size"\r
\r
+set g_healthsize_quake_step 10 "The view of nearby players is shaken by this amount when a macro walks near them (requires g_footsteps)"\r
+set g_healthsize_quake_step_radius 500 "Radius in which a player must be to shake the view"\r
+\r
set g_power 5 "when armor is below this level, the HUD, crosshair and helper will not work"\r
set g_power_reboot 2 "amount of time it takes to boot a player's subsystems once he has enough armor"\r
set g_power_reboot_spawn 1 "when enabled, a player's subsystems must boot whenever he spawns"\r
else\r
GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1));\r
sound(self, CHAN_AUTO, "misc/macro_footstep.wav", bound(0, VOL_BASE * playersize_macro(self), 1), ATTN_NORM);\r
+\r
+ entity head;\r
+ for(head = findradius(self.origin, cvar("g_healthsize_quake_step_radius")); head; head = head.chain)\r
+ {\r
+ if(head.classname != "player")\r
+ continue;\r
+\r
+ float shake;\r
+ shake = vlen(head.origin - self.origin);\r
+ if(shake)\r
+ shake = 1 - (shake / cvar("g_healthsize_quake_step_radius"));\r
+ shake *= cvar("g_healthsize_quake_step");\r
+\r
+ head.punchvector_x += crandom() * shake;\r
+ head.punchvector_y += crandom() * shake;\r
+ head.punchvector_z += crandom() * shake;\r
+\r
+ dprint(strcat(head.netname, " | ", ftos(shake), " --------\n"));\r
+ }\r
}\r
else\r
{\r