set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
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
+set g_healthsize_quake_step_radius 500 "Radius in which a player must be located to shake the view"\r
+set g_healthsize_quake_fall 20 "The view of nearby players is shaken by this amount when a macro falls near them"\r
+set g_healthsize_quake_fall_radius 750 "Radius in which a player must be located 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
pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', self.scale);\r
}\r
sound(self, CHAN_AUTO, "misc/macro_hitground.wav", bound(0, VOL_BASE * playersize_macro(self), 1), ATTN_NORM);\r
+\r
+ // earthquake effect for nearby players when a macro falls\r
+ if(cvar("g_healthsize_quake_fall"))\r
+ {\r
+ entity head;\r
+ for(head = findradius(self.origin, cvar("g_healthsize_quake_fall_radius")); head; head = head.chain)\r
+ {\r
+ if not(head.classname == "player" || head.classname == "spectator")\r
+ continue;\r
+ if(head == self || head.spectatee_status == num_for_edict(self))\r
+ continue; // not for self\r
+ if not(head.flags & FL_ONGROUND)\r
+ continue; // we only feel the ground shaking if we are sitting on it\r
+\r
+ float shake;\r
+ shake = vlen(head.origin - self.origin);\r
+ if(shake)\r
+ shake = 1 - bound(0, shake / cvar("g_healthsize_quake_fall_radius"), 1);\r
+ shake *= cvar("g_healthsize_quake_fall");\r
+\r
+ head.punchvector_x += crandom() * shake;\r
+ head.punchvector_y += crandom() * shake;\r
+ head.punchvector_z += crandom() * shake;\r
+ }\r
+ }\r
}\r
else\r
{\r