Garry's Mod Logo
Changes Header

Changes

What’s changed in Garry's Mod in each patch.

add_circle

Features

  • Output an identifying string on map/model compile tool startup so you know the studiomdl/vbsp/vvis/vrad is from Garry's Mod
  • Added "Browse" button to env_spritetrail in Hammer
  • Ported updated layout of the Particle Particle Editor from newer Source Engine games
  • Added color input/key-value for func_water_analog in Hammer
arrow_circle_up

Improvements

  • VVIS/VBSP automatically tries to find gameinfo.txt if path not given
  • Load particle editor first in -tools mode for convenience
  • Improve scrollbar styling in -tools mode, so its more obvious what the position of the slider is
  • $eyeposition and $illumposition are now affected by $scale (studiomdl.exe)
  • VRAD: -dumppropmaps dumps the lightmaps as .pfm during HDR compiles
  • VRAD: -dumppropmaps dumps files to /sp_lightmaps/ instead of base directory
  • VRAD: Fixed -dumppropmaps TGA output color range to be accurate with what is written to the BSP (also only writes TGA files for SDR compiles)
  • VRAD displays which lighting mode is being compiled in the log (HDR vs SDR)
  • Compile HDR .ppl files into the BSP, without overwriting the SDR ones and swap-in HDR static prop lightmaps when HDR lighting is in use in-game
handyman

Fixed

  • Fixed VBSP disabling -v flag midway through compilation if -verboseentities is not set
  • Fixed VBSP being unable to find sub instances in subfolders
  • gmad.exe allows model.vtx files again to be uploaded to Steam Workshop
  • Adjust Hammer entity definitions so Garry's Mod specific sandbox settings don't appear on point entities such as point_spotlight
  • StudioMDL: Fixed models with more than 65k vertices breaking up
  • Fixed studiomdl.exe crashing when remapping sequences to preserve their order
add_circle

Features

  • Added ENT.PhysicsSounds for anim type SENTs - If set to true, re-enables physics impact sounds for the entity
  • Added vgui.GetAll - Internal, returns only Lua created panels. Used to fix PANEL:PreAutoRefresh and PANEL:PostAutoRefresh not working
  • Middle mouse click for DColorCube/DColorMixer to reset to convar defaults
  • Added DColorCube:GetDefaultColor/DColorCube:SetDefaultColor
  • Added DSlider:ResetToDefaultValue
  • Added "content_descriptors" to steamworks.FileInfo result
  • Added private activity functions - util.GetActivityNameByID, util.GetActivityIDByName, util.GetAnimEventIDByName
  • util.GetAnimEventNameByID is now shared
  • Added Panel:SetCookieName support for DNumSlider, DCheckbox, DCheckboxLabel
  • Added DAdjustableModelPanel:GetMovementScale/DAdjustableModelPanel:SetMovementScale
  • Added optional argument to NPC:StopMoving
  • Added new argument to Entity:CreateBoneFollowers
  • Bone follower support for AI and Nextbot SENTs
  • Added Entity:Dissolve
  • Added a 3rd argument for PathFollower:Chase
  • Added NPC:SetStepHeight and NPC:GetStepHeight
  • Added NPC:GetArrivalSpeed / NPC:GetArrivalDistance
  • Added ability for traces to use a table of class names as "filter"
  • Traces now have "whitelist" input property - This will turn the table filter into a whitelist, rather than ignore list. This will NOT affect function() filters
  • Added "hitclientonly" option to trace functions clientside
  • Added new data to util.GetModelInfo - MeshCount, BoneCount, Flags, StaticProp (specific flag)
  • Added a new argument to concommand.Add autocomplete callback - tokenized arguments
  • Added CNewParticleEffect:GetRenderBounds
  • Clientside physics object scaling is now possible with Entity:SetModelScale
  • Added RegisterMetaTable( name, table )
  • sound.Generate now accepts table of samples, or direct binary data as a string
  • Added optional argument to sound.Generate - loopStart (sample ID)
  • Entity:GetPoseParameter and Entity:SetPoseParameter now can accept numbers instead of strings
  • Entity:GetPoseParameterRange can now accept string instead of a number
  • Added steamworks.GetList/steamworks.FileInfo serverside
  • Allow 3 separate number inputs to certain mesh.* functions - mesh.Position, mesh.Normal, mesh.TangentS, mesh.TangentT
  • file.Delete now returns true on success, false otherwise
  • Gamemode cvars: Added "replicate" field - If set to 0, removes REPLICATED flag from gamemode cvars
  • Added Entity:GetFlexType( id ) = string
  • Added Color:Lerp( target, frac )
  • Added string.NiceName
  • Added player_manager.GetPlayerClassTable (Community Contribution)
  • Added 2nd return value to SANDBOX:CanArmDupe hook - message to display on denial (Community Contribution)
  • Added GM:OnPauseMenuShow
  • Added ENT.PhysicsSolidMask to anim/ai/nextbot SENTs
  • 3rd argument to GM:NetworkIDValidated - ownerID64
arrow_circle_up

Improvements

  • Increase the limit of Entity:ManipulateBoneScale to 512 (from 32)
  • Material function can use .cache files from steamworks.Download
  • DCollapsibleCategory items support disabled styles
  • More consistent Vector/Angle optional argument handling - You can now do Vector( nil, 1, 2 ) and get the expected output
  • Made new vgui.Create errors non halting to prevent breaking existing mods that are badly coded
  • Block mem_force_flush from Lua access just in case - Having this enabled in autoexec causes issues, so lets disallow servers to force it on players
  • Block servers from modifying fov_desired, skill, cl_playerspraydisable, voice_overdrivefadetime
  • Block "path" concommand from being able to be ran via Lua
  • Block all .log files for file.Read, not just console.log
  • Changed Matrix memory management to match Vector/Angle - This aims to fix stuttering when GCing lots of matrices, for example in rendering hooks
  • Try to make sure SENTs are initialized clientside before processing net messages, to avoid a race conditions with sending newly spawned SENTS to clients
  • Type check table arguments of ColorToHSL, ColorToHSV and physenv.SetPerformanceSettings
  • "anim" type SENTs move physics objects clientside for you - hopefully this does not cause any issues
  • Try loading model from Hammer keyvalues before setting models/error.mdl on anim SENTs
  • Player:SetAvoidPlayers ignores noclipping players
  • Give debug name to physics objects created via Lua & models scaling - for Lua functions, will be the function name that created it, for scaled physics objects - model name + scale
  • Entity:FollowBone, Entity:SetAttachment and Entity:SetParent will throw errors when given absolutely invalid attachment/bone IDs (i.e. less than 0, or above 255)
  • Entity:GetBodyGroups returns "empty" for submodels with no meshes (instead of nothing)
  • DNumSlider:SetEnabled also affects its DLabel
  • DLabel:SetDark disables DLabel:SetBright, and vice versa
  • DLabel:SetHighlight always overrides DLabel:SetDark AND DLabel:SetBright
  • IMaterial:GetColor returns an actual Color
  • Disabled DLabel has faded out colors
  • Make WEAPON:Think not run before NextAttack in singleplayer - This mimics SWEP:Think's behavior clientside in multiplayer
  • Call TOOL:Holster and TOOL:Deploy when switching tools clientside - This was done when using gmod_tool serverside only, it is now done when gmod_toolmode changes both clientside and shared
handyman

Fixed

  • Fixed PhysObj:GetFrictionSnapshot only returning 1 entry
  • Fixed crashes with ENT.RenderGroup = RENDERGROUP_STATIC(_HUGE)
  • Fixed a crash with Entity:PhysicsInitConvex and invalid input
  • Potential fix for a crash withNextbot:BodyMoveXY
  • Fixed render.SetLocalModelLights ignoring last light
  • Fixed IMaterial:GetKeyValues sometimes returning nothing on dedicated servers
  • Prevented invalid input to render.DrawWireframeSphere to avoid crashes
  • Fixed DMenuOptionCVar resetting from cvar too early in certain use cases
  • surface.PlaySound can accept soundscript names clientside
  • EmitSound handles registered sounds a bit better clientside (no need for a hack by adding .wav to the sound name)
  • Fixed Entity:FollowBone not working with boneID 0
  • Fixed SoundDuration returning wrong values for MP3 files
  • Fixed .wav SoundDuration being off by number of channels on srcds
  • Fixed SoundDuration not really working on Linux SRCDs
  • Fixed timer callbacks, HTTP callbacks & async file read callbacks not firing clientside if the client is timing out
  • Release materials created by surface.GetTextureID clientside on disconnect
  • Fixed Entity:SetModel, util.GetModelMeshes and util.PrecacheModel leaking model reference counts
  • Fixed crashes relating to Entity:FollowBone
  • Fixed util.DecalMaterial to actually work
  • Fixed file.AsyncRead erroring after Lua shutdown
  • util.StringToType supports "boolean" and "number" types
  • Panel:GetFont works for RichText
  • Fixed RichText Panel:InsertColorChange to black not working when its the first and only color change
remove_circle

Removed

  • Removed file.AsyncRead from menu state entirely, since its broken there anyway
add_circle

Features

  • Added TTTShowSearchScreen hook (Community Contribution)
arrow_circle_up

Improvements

  • Optimized ragdoll search network traffic (Community Contribution)
  • Updated Russian localization (Community Contribution)
  • Updated localization files (Community Contribution)
  • Replace deprecated GetConVarNumber/GetConVarString usage (Community Contribution)
handyman

Fixed

  • Fixed disconnected player networking (Community Contribution)
add_circle

Features

  • Build vbspinfo.exe (now shipped with the game)
  • Added sv_maxunlag convar
  • Added sv_log_client_errors (defaults to 1) - Allows disabling logging of them to a file
  • Added sv_npc_full_pvs_checks (Default to 1) - Fixes some NPCs flicking in multiplayer with more than 1 player on the server
  • Added host_workshop_autoupdate (defaults to 1) - Set to 0 to disable dedicated server workshop auto updates
  • Added new shader parameters to Core shader - $EntityOrigin, $Diameter
  • Added $BASETEXTURESPEED, $BASETEXTURE2SPEED, $BASETEXTURE3SPEED for VolumeClouds shader
  • Added -disablehttp command line parameter
arrow_circle_up

Improvements

  • Increase default value of budget_panel_height to 800
  • Allow prop_vehicle_crane to receive damage events when player hitbox is not hit
  • Some minor memory usage optimizations
  • Added convar descriptions to many default Lua-defined convars
  • Hide mod_load_*_async convars - They are linked to a game hang when enabled, and they are disabled by default anyway
  • Reset ammo types on map shutdown as well, so they are gone by the time another map is loaded
  • Move some hardcoded values of weapon_fists to SWEP.* variables
  • Default cl_detail_allow_vertex_lighting to 1
  • Added "resource/overviews/*.txt" to BSP whitelist
  • Ignore \n, \r and \t in player names
  • Optimized skypaint matproxy (Community Contribution)
  • Reworked Portal Rocket Turret targeting to make the SetTarget input work
  • Do not prevent C_BaseAnimating entities from rendering if sequence is set to -1
  • Do not run animations on prop_prisoner_pod if its empty, to potentially save on network bandwidth
  • Allowed custom (private) activity IDs on client to be registered on model load
  • Restored "permanent failure" check on SRCDS steam logon failure - Basically will login anonymously if provided GLST is invalid
  • Block more URLs that crash Awesomium - .mov, .mp4 - This is not ideal, but there isn't a better way
  • Micro optimizations with weapon_base & GM:DrawDeathNotice (Community Contribution)
  • Print games that are mounted to console (like folder addons) with developer 1
  • Improve consistency of trace surfaceID returns clientside - this only relates to usages of shadow PhysicsObjects
  • vcollide_wireframe - draw the actual physics object clientside if it exists
  • Prop gibs inherit model scale of scaled props
  • Improved scaled physics prop trace hit detection when the prop is scaled only from the server
  • Reworked game_text rendering clientside to allow for 256 channels at the same time (from 6)
  • Merge scripts/talker/* with episodes, re-enabling certain NPC behaviors, such as Alyx darkness prank
  • Gravity Gun no longer deletes Physics Objects it didn't create
  • Hammer support for sent_ball - To serve as another example of Lua entity in Hammer
  • debug_dump: Separate Lua and non-Lua cvars
  • Add more info to "gamemode is not a table" error/crash
  • Updated map icon for ep2_outland_06a to actually represent what it is
  • Half-Life 2 map categories are done strictly by name, so modded versions of those maps do not unexpectedly end up in the Half-Life 2 categories
  • Limited m_customaccel_max and m_customaccel_exponent to sane values
  • Unhide sv_stressbots and make it a cheat
  • Reduced max allowed voice packets per frame to 48 (from 64)
  • Include map name in map related disconnect messages
  • Kick players who send impossible voice packet sizes (<= 1 byte, above 2k)
  • Added sv_signon_dos_disconnect from CS:GO - mitigates a DOS exploit
  • Experimental: Do not close srcds on model precache overflow, just use error model
handyman

Fixed

  • Fixed a longstanding crash with CSoundPatch usage
  • Fixed a crash on exit to do with panels
  • Fixed a crash with gameui_show_dialog and remove the console command
  • Potential crash fixes to do with traces
  • Fixed a crash due to missing attacker in player take damage hook
  • Fixed a crash related to static props on map load for certain maps
  • Fixed some crashes with DSPs
  • Fixes towards crashes with poster command and insane size values
  • Fixed crashes with huge font blur values
  • Fixed a crash when an NPC sees more than 255 enemies
  • Fixed a self-crash with +vgui_drawtree
  • Fixed a crash with multicore rendering and logging
  • Properly handle mounted addons disappearing (unmounted) - This fixes a crash with BASS.DLL trying to play addon files that are no longer there
  • Fixed a crash to do with static props when they change models - i.e. when a static prop goes from error.mdl to a more complex one
  • Move various crash fixes & security improvements
  • Restored "gamemenucommand RestartWithNewLanguage"
  • Fixed a warning about "Invalid texture id -1" on disconnect
  • Fixed env_blood color setting, and add new colors, as well as fixed missing textures for some settings and restored hidden settings
  • Fixed certain detail props not rendering on maps with more than 65k of them
  • Prevent ent_create player to avoid issues from doing so
  • Fixed a memory leak with serverlist.Query
  • Implemented a workaround for animation event IDs on listen servers being set to "invalid" values (client vs server conflicts)
  • Fixed Portal 2 .wav files that are actually .mp3s not playing
  • Fixed trackspeed only working after ReturnToEyes input (point_viewcontrol)
  • Fixed env_screenoverlay SwitchOverlay input forcing overlays on when the entity is disabled
  • Fixed env_zoom not working sometimes, and not undoing itself on removal
  • Fixed scaled props scaling collision bounds twice
  • Fixed clicking a TextEntry sometimes setting invalid caret position
  • Fixed crashes when point_template is used improperly
  • Fixed logic_collision_pair not working at all when spawned by map
  • Fixed crashes when certain models are spawning generic gib types that do not come with GMod
  • Fixed a bunch of possible crashes with Vehicles pre Entity:Spawn()
  • Fixed whereis concommand sometimes not finding the certain workshop addons (server exclusive .GMA addons)
  • Fixed unmounting GMAs leaving behind empty folders internally
  • Fixed division by 0 when parsing MP3 files on Linux
  • Resolved case sensitivity issues with lua_refresh_file
  • Fixed materials with matproxies sometimes getting permanent artificial refcount
  • Resolved model materials going into negative refcounts - This is a specific case where error models are "hotloaded" into non error models
  • Fixed sprites causing material refcounts going negative - Similar case to models where sprite materials become available after precaching as error
  • Fixed Lua particles leaking material refcount - This is fixed by precaching the material just before it is used
  • Do not precache particle materials on the server (game.AddParticles) - Allows particle materials to reach 0 refcount on disconnect from singleplayer, and also makes no sense to precache particle materials serverside anyway
  • Clean up rope materials on disconnect, not game shutdown - Allows rope materials to reach 0 refcounts
  • Fixed intro screen material not being freed
  • Fixed __error material getting an extra forever refcount on game launch
  • Fixed __loading and __background getting forever refcounts, preventing them from being freed
  • Fixed certain sprites (such as physgun beam) being forever referenced if drawn
  • Fixed NPCs spawning sprites sometimes causing artificial refs on the material
  • Fixed another case where particle materials would end up with artificial refcount
  • Free existing/previous font textures/materials on disconnect
  • Fixed NPC death animation blending (Community Contribution)
  • Fixed NPC death poses (Thanks MapBase)
  • Fixed legacy workshop addons sometimes not extracting correctly - This would happen on download, potentially after messing about with Steam files
  • Prevent NPCs complaining about sequence -1 when trying to move, but the NPC model has no correct movement sequence
  • Fixed NPCs and players complaining about bone access when creating death ragdolls
  • Corrected string representations of some CLASS_ enums
  • Fixed a crash to do with soundscapes after map cleanup
  • Rework how movement is disabled when player is dead with movetype_walk, so gravity/velocity, etc. is still applied
  • Fixed nextbot deaths counting twice for npc_maker
  • Fixed flex bone drivers in-game - Made the flex bone driver code mimic the code from HLMV, which basically includes special case for BONE_USED_BY_BONE_MERGE
  • Fixed player angles serverside while in vehicle not matching client
  • Also fixed GetPassengerSeatPoint returning wrong values for vehicles without ACT_IDLE, such as the chair models, now will select first sequence
  • Fixed crashes when getting name of invalid ammo type
  • Fixed "Unknown language" in TextArea right click for certain languages, now will try to get correct name from Windows.
  • RichText uses localized string for "Copy" in context menu, fixing extra "&" being present in Lua created version of the panel
  • Fixed Text Entry Copy/Cut context menu buttons not being disabled when they should be
  • Fixed a whole bunch of potential crashes with NPCs in multiplayer when there are no players on the server
  • Fixed crash with trigger_weapon_strip when a non NPC/Player entity enters it
  • Fixed crashes with npc_portal_turret_floor
  • Prevent stack overflow crashes with InvalidateLayout( true ) from PerformLayout
remove_circle

Removed

  • Removed mat_stub convar
  • Removed full paths from "Adding Filesystem Addon" console messages
  • Removed -textmode
add_circle

Features

  • Ported -blocksize for vbsp from CS:GO
  • Added Ambient Occlusion for vrad (-aoscale, -ambientocclusion)
  • Added ficool2's VRAD ambient occlusion implementation
  • Added a new option to HLMV Flex tab for $boneflexdriver preview - It will move Flex sliders live as the animation plays
  • Added a bunch of new options for Hammer's Run Map dialog so they are not hidden from the average user
arrow_circle_up

Improvements

  • Alternative fix for traces not hitting transparent displacements (vbsp) - better consistency with brushes that use same materials - does not cast shadow and traces hit them
  • Improve verbosity and detection of "CMaterial::Draw(): StretchDIBits failed" in Hammer
  • Use integers, not shorts for leafs in map compile tools (vrad) - fixes warnings/issues on some complex maps
  • Move "Model X has mismatching model version" to -verbose (vbsp.exe)
  • More logical defaults for func_button in Hammer
  • Increased size of "size" status bar in Hammer to be able to fit the entire text
  • Add light position to some vrad.exe warnings
  • Also added info to the "Cast Entity Shadows" hammer key-value on lights about how to properly make it work
  • point_viewcontrol only gives invincibility if it freezes the player
  • GMad.exe: On windows, pause on error when using drag'n'drop so the user can see the errors
  • Only allow dx80/dx90.vtx files in gmpublisher, sw.vtx/xbox.vtx are useless files not used by the game, so no reason to allow them on workshop to waste disk space
  • Added more info to "Patch Sample Radius Clamped" warning in vrad
handyman

Fixed

  • Fixed Hammer's expert config files not being treated as userconfig by Steam, therefore getting wiped on validation
  • Minor fixes to map compile tool output text not having new lines in some cases
  • Fixed "Point At" button always writing to "angles" key-value pair instead of the selected key-value pair
  • Fixed improper model removal handling for LODs in studiomdl.exe, resulting in a crash
  • Fixed vrad.exe not writing light entity flags to the BSP, fixes "Cast entity shadows" option in Hammer not working
  • Fixed errors with singular static prop causing VRAD to stop for all remaining static props yet to be processed
  • Fixed default detail types (Hammer Editor) having missing models and textures
  • Fixed a crash with Hammer Model Viewer and bad models
  • Merge hlmv crash fixes from CS:GO - Related to high poly models and the debug rendering modes
  • studiomdl.exe no longer requires -nop4 every time it is used
remove_circle

Removed

  • Disabled .sw.vtx generation in studiomdl.exe