Garry's Mod Wiki

Revision Difference

Update_Preview_Changelog#552607

<cat>Play</cat> <title>Update Preview Changelog</title> This page contains upcoming changes to the game in the next update. The update date is available on the Steam News section for Garry's Mod. The update is already accessible on the `dev` [beta branch](Dev_Branch), and possibly on the `prerelease` beta branch. # Game Changes ## Additions * Ported some Portal 1 entities - the rocket and normal turrets, personality core, fizzler trigger and security camera * The 2 Portal 1 turrets are available to be spawned through the spawn menu in Sandbox * New default crosshair and crosshair customization * Addon preset importing and exporting * Confirmation when deleting addon presets * Added custom icons for tree nodes in spawnmenu categories (Community Contribution) * Added g_ragdoll_maxcount to server settings in spawnmenu * Added missing TF2 map icons * You can now favorite addons through main menu⤶ ## Fixes * Added portal scene files and made particles work on portal maps * Some minor security improvements * Several map category adjustments for new Fistful of Frags and Team Fortress 2 maps (Community Contribution) (`fofhr_`, `zi_`) * Disallowed making addon presets with empty names * Fixed addon presets with number only names being unable to be deleted * Fixed saved cursor position resetting to middle of the screen when clicking outside of the spawnmenu while it is open * Disable Half-Life 2's sneak attack code for non-hostile NPCs, when ignore players is set, or AI is disabled - Fixes NPCs getting one shot in the head by players most the time * Favorite and Vote Up/Down status for addons are now better synched with real values⤶ * Fixed citizens healing players with `ai_ignoreplayers` set to `1`, and when the player is standing above the NPC⤶ * Fixed "addon file conflict" problem duplicating file paths on addon remount⤶ * Fixed `env_skypaint` shader flickering when not given a valid sun normal⤶ ## Changes * More kill icons for physics-related kills * Adjust `"Failed to find any models for this addon"` error in spawnmenu to include a reason why it might be happening, as well as fit the text within its container * Half-Life Source ceiling turrets can now be spawned on the ground as well (Community Contribution) * Reduced default max_fps to 150 * Renamed CS:GO mountable game to mention the legacy branch - this option might be removed in a future version * Updated gm_construct navigation mesh - added walkable drop down only areas to elevated areas, such as roofs of certain buildings * Make `fps_max` console variable save across sessions, and add an option for it in video settings * Save NPC health and maximum health in duplications * Moved `Multiplayer` options tab to front, and renamed it to `Game`, moved FOV and Fast Weapon Switch options to it, removed those from their previous places, removed `"Advanced"` keyboard options which are now obsolete * This is aimed to help players find these settings easier * Set max health for NPCs spawned from spawnmenu that have health override, for things like healing NPCs * Make it easier to select addons in the Addons list (Community Contribution) * Improved projected texture shadow quality * Replaced util.TraceLine by util.TraceHull for tool traces. Fixes trace bypassing parented props (Community Contribution)⤶ * Don't play ammo pickup sounds for NPCs⤶ * Placeholder portal 2 entities to visually fill gaps on Portal 2 maps⤶ * Prevent empty gun sounds when trying to secondary fire certain weapons underwater that do not have a secondary fire attack⤶ * Do not allow HL2 helicopter to be dissolved by AR2 altfire⤶ ## TTT Changes * Prevent TTT weapon base creating Lua errors with NPCs (Community Contribution) # Technical Changes ## Additions * New `VertexLitGeneric` shader parameters - `$AllowDiffuseModulation` and `$NoTint` - both allow disabling color tint per material * Additions to .gma whitelist * Added data_static/ alternative to data/ folder with all the acceptable extensions for file.Write * Added materials/colorcorrection/*.raw * Add some of the existing [navmesh](navmesh) related entities to the base FGD * Restored content unloading, behind a convar - gmod_unload_test * Added `SolidEnergy` shader from CS:GO - enables certain things to draw correctly from Portal 2 and Black Mesa * Added `lua_refresh_file` <path>⤶ ## Fixes * RPG rocket stops its looping sound when removed prematurely * SourceTV fixes * Fixed crashes when using `tv_record` console command * <page>Player:IsBot</page> now returns true for `SourceTV` master client * Prevented `tv_enable` going beyond absolute max player count and crashing * `SourceTV` players are considered bots for <page>player</page> library * Fixed duplicate definitions for <page>Player:GetTool</page> (Community Contribution) * Improved support for non-English messages in <page>DTextEntry</page> history (Community Contribution) * World clicker aim uses correct FOV values, so it works when FOV is modified by <page>GM:CalcView</page> hooks, etc * Fixed displacements with `$alphatest 1` materials not having collisions * Fixed props with `VortWarp` shader crashing the game when entering water * Fixed crashes when accessing out of bounds flex controllers * Gave `sk_ally_regen_time` a minimum value of `0.01` to avoid division by `0`, and subsequent freezes due to infinite loops * Resolved incompatibility with `$BlendModulateTexture` and `$detail` - fixes gm_construct sand/grass transitions * Fixed blendable textures on a brush being inverted in Hammer i.e. not appearing like they do in-game * Fixed fonts from gamemode's `content/` folder inside a `.gma` not being extracted - so that they can actually be loaded * Clean up DOF_Ents table on DOF_Kill (Community Contribution) * Fixed airboat attachment name * Fixed seemingly incorrect calculation of vehicle wheel total height * Prevent audio system being able to read files outside of game folder * Make duplicator actually spawn the correct NPC * It was spawning them by entity class, luckily all of the base ones are present in the "NPC" list by their classname, now it spawns them by their actual original name in the "NPC" list. * Fixed SteamID placeholder calculation for clients with no SteamID (multirun environments) * Fixed crashes due to <page>CSoundPatch</page> * Fixed <page>Panel:SetDrawLanguageIDAtLeft</page> causing cursor selection to be offset⤶ * Fixed deleting a bunch of text in a <page>TextEntry</page> and then typing not updating the horizontal scrolling to show the typed text⤶ * Fixed server browser showing lowercase gamemode names for empty categories (Community Contribution)⤶ * Fixes for `func_door` looping sounds⤶ * Improve autorefresh handling for `lua_openscript(_cl)` scripts⤶ * Fixed secondary map instances overriding base map revision⤶ ## Changes * Added file path to `"ERROR: couldn't open."` warnings * Change usages of deprecated <page>gui.MousePos</page> to <page>input.GetCursorPos</page> (Community Contribution) * Safeguards against malformed `.gma` files * Empty stored entity outputs when pasting duplications to prevent abuse * Reduced `Player.__index` calls in player 3rd person animations for performance improvement (Community Contribution) * `func_physbox`/`func_pushable` is ignored by navmesh generation as walkable surfaces * More "reportable" keyvalues in default FGDs - shows useful info in the `Entity Report` window * Disabled default automatic navmesh unblocking to accommodate <page>CNavArea:MarkAsBlocked</page> * Hide `"No bound shader"` warning behind `developer 1` - and also add which materials the error is for * A bit faster optional argument handling for Lua API * Added classnames to `"C_BaseEntity::UnlinkFromHierarchy"` warning * Safe guard against invalid vector input to <page>PhysObj</page> functions to prevent crashes * Read `settings/users.txt` from `MOD` search path for safety * Limit `lua_error_url` to http(s) and send the client's SteamID with the Lua errors * Try bumping `MAX_MAP_ENTITIES` to `65k` (tools only) and engine hunk limit to `256MB` * Unhide `r_portalscloseall` cheat convar * Fallback shaders only if they don't exist * Favorite workshop categories are no longer cached - so that they update properly when favorites change⤶ * Mention what `nav_quicksave 2` does in the description of `nav_quicksave`⤶ * Enable episodic behaviors for `npc_citizen` when `hl2_episodic` is set to `1`⤶ * Do not handle spawnicons during <page>render.RenderView</page> to prevent possible issues⤶ * Turn Lua effect creation warnings into non halting Lua errors so they have a stack trace⤶ * Init vectors when GetSequenceLinearMotion fails to prevent potential issues⤶ ## Deletions * Nothing so far. ## gmad.exe changes * Auto ignore `.git` folder and `.git*` files * Print out list of files that did not match the whitelist at the end of the console output, so they are more visible * Print out ignored files, and their total at the end of the output * Added `-quiet` to suppress spammy messages * Reduced buffer reallocations, which results in much faster `.gma` file creation, most noticeable with many small files (Community Contribution) # Lua API Changes ## Additions * Added <page>net.WriteUInt64</page>, <page>net.ReadUInt64</page>, <page>File:WriteUInt64</page> and <page>File:ReadUInt64</page> * Added <page>Angle:IsEqualTol</page> * Added <page>render.ComputePixelDiameterOfSphere</page> * Added [COND.*](Enums/COND) enums, used in NPC creation * Added <page>ENTITY:OnTaskFailed</page> for `ai` type entities * Added <page>NPC:GetIdealYaw</page>, <page>NPC:GetArrivalDirection</page>, <page>NPC:SetUnforgettable</page> * Added <page>NPC:GetCurGoalType</page>, <page>NPC:IsCurWaypointGoal</page>, <page>NPC:GetGoalTarget</page>, <page>NPC:GetGoalPos</page> * Added <page>CNavArea:MarkAsDamaging</page>, <page>CNavArea:IsDamaging</page> * Added 2 optional arguments to <page>util.JSONToTable</page> - bypass depth/breadth limits & disable string to number conversion for keys * Added 6th optional argument to <page>util.ScreenShake</page> - AirShake * Added <page>DComboBox:RemoveChoice</page> (Community Contribution) * Improvements to <page>MatSelect</page> * Added <page>MatSelect:Clear</page> (Community Contribution) * Added <page>MatSelect:SelectedItemPaintOver</page> (Community Contribution) * `MatSelect:AddMaterial*` methods now return the created <page>DImageButton</page> (Community Contribution) * Added local pnl = <page>MatSelect:FindMaterialByValue</page> (Community Contribution) * Added <page>MatSelect:SelectMaterial</page> (Community Contribution) * <page>Vector:Mul</page>() now supports VMatrix * Added <page>navmesh.CreateNavLadder</page> * Added <page>GM:OnCloseCaptionEmit</page> hook * Added <page>gui.AddCaption</page> * Added <page>GM:OnPlayerJump</page> hook * Added new optional argument to <page>render.ClearDepth</page> - stencil * Added a new argument to <page>GM:EntityRemoved</page> - for full update removes * Added <page>NPC:SetViewOffset</page> and <page>NPC:GetViewOffset</page> * Added <page>Panel:GetScrollStartIndexes</page> * Added missing enum for <page text="NAV_MESH_BLOCKED_PROPDOOR">Enums/NAV_MESH#NAV_MESH_BLOCKED_PROPDOOR</page> * Added <page>navmesh.GetBlockedAreas</page> * Added <page>CNavArea:MarkAsBlocked</page>, <page>CNavArea:MarkAsUnblocked</page> * Added <page>CNavArea:RemoveAttributes</page>, <page>CNavArea:AddAttributes</page> * Added SWEP/SENT.ClassNameOverride (Community Contribution) * NPCData.OnCeiling, OnFloor, OnDuplicated can now also be functions * Added <page>net.ReadPlayer</page> and <page>net.WritePlayer</page> (Community Contribution) * Added 2nd return value to <page>NPC:Disposition</page> - priority * Added <page>ents.Iterator</page> and <page>player.Iterator</page> (Community Contribution) * Added <page>string.CardinalToOrdinal</page> (Community Contribution) * Added a new argument for <page>killicon.GetSize</page> - bool dontEqualizeHeight, set to true to return the actual height of a killicon * Added <page>killicon.Render</page> - draws the killicon without weird vertical offsets, also has dontEqualizeHeight argument to draw unscaled killicon * Added <page>killicon.AddTexCoord</page> - subrect killicons on a single texture (Community Contribution) * Added `sequential` parameter to <page>net.ReadTable</page>/<page>net.WriteTable</page> (Community Contribution) * Added <page>CNavArea:GetIncomingConnectionDistances</page> * Added <page>CNavArea:GetAdjacentAreaDistances</page> - Both have optional arguments to limit output to a certain navDir, and return the precalculated distances to the returned areas. * <page>GM:OnEntityCreated</page> is now also called for clientside only entities * Support <page>Vector</page> / <page>Vector</page> - divide each component individually * <page>GM:OnScreenSizeChanged</page> hooks get 2 new parameters - new width/height * Added optional filter option to <page>Global.EmitSound</page> and <page>Entity:EmitSound</page> * Added <page>Panel:GetLineHeight</page> - RichText only * Added <page>Panel:SetLineHeight</page> - RichText only, values below zero mean no override * Added <page>Panel:AppendTextWithURLs</page> - RichText only * Added <page>navmesh.FindInBox</page> * Added <page>CRecipientFilter.AddPlayers</page>( table or filter ) * Added <page>CRecipientFilter.RemovePlayers</page>( table or filter ) * Added <page>CRecipientFilter.RemoveMismatchedPlayers</page>( table or filter ) * Added `"Bone"` field for <page>Entity:GetAttachment</page> - returns the boneID the attachment point is attached to * Added optional argument to <page>LuaLocomotion:Jump</page> - activity * Added optional argument to <page>CLuaLocomotion:Jump</page> - activity * Added <page>Vector:Distance2D</page> and <page>Vector:Distance2DSqr</page> * Added <page>GM:HandlePlayerArmorReduction</page>( ply, dmginfo ) - This change moves the armor reduction system to Lua (base gamemode), allowing full control over it * Added <page>GM:PreRegisterTOOL</page> hook (Community Contribution) * Added <page>GM:CanCreateUndo</page> hook (Community Contribution) * Added <page>math.Factorial</page> (Community Contribution)⤶ * Added <page>ENTITY:TranslateActivity</page>( act ) for `ai` type entities⤶ * Added <page>GM:PostEntityFireBullets</page>( ent, info )⤶ * Added <page>NPC:SetIdealYaw</page>⤶ * Added <page>NPC:UpdateYaw</page>⤶ * Added <page>NPC:IsFacingIdealYaw</page>⤶ * Added <page>NPC:SetIgnoreConditions</page>⤶ * Added <page>NPC:RemoveIgnoreConditions</page>⤶ * Added <page>IGModAudioChannel:GetBufferedTime</page>()⤶ ## Fixes * Fixed <page>DNumberWang</page> passing both strings and numbers to OnValueChanged (Community Contribution) * Fixed <page>Player:SprintEnable</page> not working * <page>GM:EntityEmitSound</page> blocks CSceneEntity close captions * Made 2nd argument of <page>Global.EmitSound</page> actually set the sound position * <page>Global.EmitSound</page> precaches the sound when ran in multiplayer serverside * Sentences system calls <page>GM:EntityEmitSound</page> * Use brackets for keys in <page>Global.PrintTable</page> to avoid confusion with trailing/leading whitespace (Community Contribution) * Fixed <page>Panel:GetNumLines</page> not being up to date within <page>DTextEntry:OnTextChanged</page>. * Fixed an infinite loop with <page>string.Comma</page> when giving invalid input (Community Contribution)⤶ * Fixed <page>NPC:SetSquad</page> not working when the NPC has no squad⤶ ## Changes * <page>Panel:GetNumLines</page> now works with TextEntry * Added `.dem`, `.gma` and `.vcd` to <page>file.Write</page> whitelist * Added model file types to <page>file.Write</page> whitelist * Added overflow/underflow safeguards to <page>render.PushRenderTarget</page>/<page>render.PopRenderTarget</page> * <page>Weapon:GetTracerOrigin</page> is now called for 3rd person view as well * <page>IMesh:BuildFromTriangles</page> now allows modifying the exiting mesh without crashing (vertex count must be the same) * Also made certain `render.Push*` function overflowing not crash the game outright * Better optional argument handling for <page>sound.Play</page> * Bumped <page>gui.OpenURL</page> url limit to 2000 characters * Allowed <page>GM:OnPhysgunFreeze</page> to be ran on non vphysics entities - the 2nd argument (PhysObj) will be `NULL` for those cases * <page>Panel:DrawTextEntryText</page> doesn't silently fail with invalid input, will correctly error instead * <page>killicon.Add</page> can now use `.png`s * <page>CNavArea:MarkAsUnBlocked</page> and <page>CNavArea:MarkAsBlocked</page> first argument is now optional * Made <page>NPC:SetUnforgettable</page> 2nd argument default to true * <page>Global.ProtectedCall</page> supports varargs just like <page>Global.pcall</page> * <page>Entity:SetIK</page> is now shared (was clientside only) * Increased output limits of <page>ents.FindInCone</page>/Box, <page>ents.FindAlongRay</page> to match max entity count⤶ * Altered how missing members of <page>GM:EntityFireBullets</page> return table work, defaulting to pre existing values, not to static values⤶ * <page>Entity:SetPreventTransmit</page> can now accept a table of players or a filter⤶ * Return true for <page>GM:EntityFireBullets<page> in base gamemode - This allows multiple hooks to modify the bullet structure (Community Contribution)⤶ * Allowed omitting slot parameter to Entity:NetworkVar (Community Contribution)⤶ * Panel:GetText/GetValue now returns text of RichText panels⤶ * Improved default ammo HUD interactions with <page>WEAPON:CustomAmmoDisplay</page>⤶ ## Deletions * Nothing so far.