Garry's Mod

Garry's Mod

PropHunt (Hide'n'Seek) - Original
LuckoftheLefty Jun 18, 2014 @ 9:05pm
Prop Hunt Footsteps
I've recently noticed on my newly setup Dedicated Server that the props footsteps are audible to the hunters. I've found the Class.DisableFootsteps in the shared.lua under Fretta but i'm not sure if/what to modify. It reads as followed:

Name: gamemode:PlayerFootstep( Player ply, Vector pos, Number foot, String sound, Float volume, CReceipientFilter rf )
Desc: Player's feet makes a sound, this also calls the player's class Footstep function.
If you want to disable all footsteps set GM.NoPlayerFootsteps to true.
If you want to disable footsteps on a class, set Class.DisableFootsteps to true.
---------------------------------------------------------*/
function GM:PlayerFootstep( ply, pos, foot, sound, volume, rf )

if( GAMEMODE.NoPlayerFootsteps || !ply:Alive() || ply:Team() == TEAM_SPECTATOR || ply:IsObserver() ) then
return true;
end

local Class = ply:GetPlayerClass();
if( !Class ) then return end

if( Class.DisableFootsteps ) then // rather than using a hook, we can just do this to override the function instead.
return true;
end

if( Class.Footstep ) then
return Class:Footstep( ply, pos, foot, sound, volume, rf ); // Call footstep function in class, you can use this to make custom footstep sounds
end

end

Any help is much appreciated. Thanks

*EDIT*
Also when, as a hunter, someone walks over a glass bottle and it breaks, it is causing damage equal to the damage for shooting a non-player prop.

Again, any help please and thanks.
Last edited by LuckoftheLefty; Jun 18, 2014 @ 11:39pm