Garry's Mod Wiki

Revision Difference

GM:AdjustMouseSensitivity#526615

<function name="AdjustMouseSensitivity" parent="GM" type="hook"> <ishook>yes</ishook> <description>Allows you to adjust the mouse sensitivity.</description> <realm>Client</realm> <predicted>No</predicted> <hidepredictionwarning>No</hidepredictionwarning> <file line="408">gamemodes/base/gamemode/cl_init.lua</file> <args> <arg name="defaultSensitivity" type="number">The old sensitivity In general it will be 0, which is equivalent to a sensitivity of 1.</arg> </args> <rets> <ret name="" type="number">A fraction of the normal sensitivity (0.5 would be half as sensitive), return -1 to not override.</ret>⤶ <ret name="" type="number">A fraction of the normal sensitivity (0.5 would be half as sensitive).⤶ ⤶ Return -1 to not override and prevent subsequent hooks and <page>WEAPON:AdjustMouseSensitivity</page> from running. ⤶ Return <page>nil</page> to not override and allow subsequent hooks and <page>WEAPON:AdjustMouseSensitivity</page> to run.</ret>⤶ </rets> </function>⤶ </function>