Garry's Mod

Garry's Mod

PropHunt (Hide'n'Seek) - Original
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; 18 Jun, 2014 @ 11:39pm
< >
Showing 1-1 of 1 comments
la flame 28 Nov, 2020 @ 3:49pm 
Originally posted by LuckoftheLefty:
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.
This is a very old problem but I have the exact same issue. I update the option in the shared.lua file, reload the server, and I can still hear footsteps. Did you ever find a solution years ago?
< >
Showing 1-1 of 1 comments
Per page: 1530 50