Note
This build requires the server to run on the newest GMod version! (The 2026.04.29 net compat update)
It took over a year, though here we are :)
This Update (may not include every single new thing)
- [+] Any files in lua/autorun/_holylua/ are loaded by HolyLib on startup.
- [+] Added a new modules luathreads, networkthreading, soundscape, luagc, nw2, crashhandler
- [+] Added NS_ enums to gameserver module.
- [+] Added missing CNetChan:Shutdown function to the gameserver module.
- [+] Added LZ4 compression for newly implemented net channel.
- [+] Added util.CompressLZ4 & util.DecompressLZ4 to util module.
- [+] Implemented a custom CNetChan for faster Server <-> Server connections. See #42
- [+] Added HolyLib.ReceiveClientMessage & HolyLib.GetEnvironmentValue (See #139) to HolyLib module.
- [+] Added physenv.IVP_NONE flag to physenv module.
- [+] Added a few stringtable related functions to the stringtable module.
- [+] Added a new hook HolyLib:OnClientTimeout & HolyLib:OnClientExecuteStringCommand to the gameserver module.
- [+] Added voicechat.LoadVoiceStreamFromWaveString, voicechat.ApplyEffect, voicechat.IsPlayerTalking & voicechat.LastPlayerTalked to the voicechat module.
- [+] Added VoiceStream:ResetTick, VoiceStream:GetNextTick, VoiceStream:GetCurrentTick, VoiceStream:GetPreviousTick to the voicechat module.
- [+] Added util.FancyJSONToTable & util.AsyncTableToJSON to the util module.
- [+] Added gameserver.GetClientByUserID & gameserver.GetClientBySteamID & gameserver.GetCPUUsage (See #136) to the gameserver module.
- [+] Added a config system allowing one to set convars without using the command line.
- [+] Added IPhysicsEnvironment:SetInSimulation to the physenv module.
- [+] Added HttpResponse:SetStatusCode to httpserver module. (See #62)
- [+] Added HttpRequest:GetPathParam to httpserver module. (See #63)
- [+] Added HttpServer:AddProxyAddress to httpserver module.
- [+] Added bitbuf.CreateStackReadBuffer & bitbuf.CreateStackWriteBuffer to bitbuf module.
- [+] Added a fallback method for HolyLib's internal Util::PushEntity function in case a Gmod update breaks our offsets which previously lead to undefined behavior
- [+] Added a ILuaThreadedCall to call all modules Think function when HolyLib is loaded as a binary module/loaded using require("holylib")
- [+] Added a new DLL system if anything wants to be loaded with HolyLib. (See: example-module-dll)
- [+] Added JIT support to some C functions & to our __index and __newindex functions.
- [+] Added steamworks.GetGameServerSteamID to the steamworks module.
- [+] Added HolyLib:OnLuaRunString hook to the holylib module.
- [+] Added pvs.SetMaxViewDistance & pvs.PreventTransmitAllExcept to the pvs module.
- [+] Added the -norcon option for the httpserver module to disable RCON and free the TCP port, allowing one to run an httpserver on the gameserver port instead.
- [#] Added missing numeric key conversion to util.FancyJSONToTable (See #105)
- [#] Added some more safeguards to IPhysicsEnvironment:Simulate to prevent one from simulating a environment that is already being simulated. (else you might end up with all memory freed & a certain crash)
- [#] Highly optimized util module's json code to be noticeably faster and use noticeably less memory.
- [#] Better support for multiple Lua states
- - This required most of the lua setup to be changed >:(
- [#] Solved a few possible stack issues
- [#] Fixed a crash after a map change. See #41
- [#] Update internal netadr struct to now properly support loopback and localhost inputs for IP's.
- [#] Possibly fixed memory issues caused by IGModAudioChannel's being deleted & having undefined behavior.
- [#] Fixed HolyLib:OnPhysicsLag possibly being called recursively causing a crash.
- [#] Fixed every function from the physenv module not accepting gmod's PhysObj.
- [#] Fixed a crash caused by comcommand module since Gmod's ConCommand_IsBlocked changed. (See #45)
- [#] Fixed a few Windows issues.
- - [+] Added support for the stringtable module on Windows.
- - [#] Fixed entitylist not being loaded on Windows
- [#] Solved a few Bass bugs.
- [#] Fixed possible undefined behavior & two buffer overflows in gameserver module.
- [#] Updated VoiceStream file structure to also save the server tickrate and include a file version.
- - The VoiceStream now properly updates the tickCount for the saved VoiceData to scale the tickCount when the server changed tickrate which should ensure the audio remains usable.
- [#] Fixed a issue with the gameserver module causing random Lost Connection disconnects (See #51)
- [#] Extended networking module to include some new things.
- - Made some optimization for PackEntities_Normal reducing overhead
- - Slightly optimized our own implementation of CServerGameEnts::CheckTransmit
- - Added holylib_networking_fastpath which will use a transmit cache for CServerGameEnts::CheckTransmit as a noticeable optimization.
- - Added holylib_networking_maxviewmodels allowing one to limit view models to 1 for each player instead of each having 3 of which 2 often remain unused.
- - Added holylib_networking_transmit_all_weapons
- - Added holylib_networking_transmit_all_weapons_to_owner
- [#] Slightly improved memory usage & performance for UserData created by HolyLib
- [#] Updated VoiceStream Load/Save function to be able to read/write .wav files
- [#] Fixed IModule::ServerActivate not being called when being loaded as a binary module
- [#] Fixed HolyLib:ProcessConnectionlessPacket being called for SourceTV packets
- [#] Fixed gameserver.SendConnectionlessPacket crashing instead of throwing a lua error when NET_SendPacket couldn't be loaded
- [#] Fixed HttpServer not properly shutting down and possibly crashing
- [#] Fixed CGameClient & CHLTVClient possibly crashing when accessed after the client already disconnected
- [#] Reduced HolyLib's userdata size by 16 bytes.
- [#] Improved bitbuf.CreateStackReadBuffer thanks to our userdata changes making it 3x faster
- [#] Fixed possible memory leaks when using bf_read and bf_write
- [#] Tried to improve out of memory handling of bitbuf.Create[Read/Write]Buffer and bf_read:ReadString() functions
- [#] Fixed a regression with util.FancyTableToJSON crashing with the 0.8-pre build when it falsely tried to become sequential while being already non-sequential. (Reported by @Noahbg)
- [#] Fixed absolute search cache causing files from any search path to be returned / destroying separation between search paths (See #83)
- [#] Fixed HolyLua being unable to register any metatable causing crashes when trying to use them.
- [#] Fixed some small memory leaks in HolyLibs CLuaInterface class
- [#] Fixed steamworks.ForceAuthenticate being silently broken
- [#] Fully separated HolyLib's core from all modules allowing anyone to remove modules they don't want.
- [#] Removed all dependencies modules had on each other allowing each module to compile without requiring another one.
- [#] Fixed some issues in luathreads module that caused either crashes or simply were bugs
- [#] Fixed lua error handler used by any CLuaInterface created by HolyLib failing (error in error handler)
- [#] Moved HolyLua from HolyLib's core into a module to separate it and allow anyone to remove it
- [#] Fixed some memory leaks from our own CLuaInterface since on shutdown they never cleared up on removal/shutdown
- [#] Added a speedup for pushing networked entities to Lua (On 64x pushing entities became 2.6x faster)
- [#] Fixed some issues where Vectors & Angles pushed from HolyLib would be the original one instead of a copy causing issues like corruption when modified
- [#] Fixed IGModAudioChannel:__tostring() including a full filepath, this also fixed bass.PlayFile being unable to play sounds mounted by the filesystem from GMAs or VPK files (See #98)
- [#] Fixed DEDICATED flag being set on Windows builds
- [#] Fixed util.FancyJSONToTable not being unloaded when disabled causing a invalid function to remain in Lua that would crash on call
- [#] Fixed util.FancyJSONToTable crashing when given sequential arrays (See: #101)
- [#] Fixed util.FancyTableToJSON being unable to handle math.huge causing the parser to stop leaving invalid json
- [#] Implemented a workaround for 64x possibly hanging indefinitely when a threadpool is deleted
- [#] Fixed holylib_filesystem_splitgamepath breaking searchpath separation. It now only takes effects for the GAME path
- [#] Fixed INetworkStringTable:GetStringUserData not fully pushing the userdata as a string
- [#] Changed internal code to use ArgError instead of ThrowError where possible to improve Lua errors when invalid function arguments are given
- [#] Removed dependency on bass allowing HolyLib to be loaded on Windows srcds
- [#] Fixed LuaJIT breaking with FTZ & DAZ XMCSR flags
- - Our LuaJIT build will now save, override and restore the flags when entering and exiting the VM
- [#] Fixed our FFI Vector & Angle implementations failing to handle input strings
- [#] Fixed our FFI Vector's :GetNormalized function returning a number instead of a vector (See #130)
- [#] Improved thread safety for lua state access
- [#] Fixed workshop map being prioritied over local map version (See #138)
- [#] Fixed our LuaJIT build failing to call gmod13_unload when closing a module (See #140)
- [-] Removed some unused code of former fixes that were implemented into GMod
You can see all changes/commits here:
Release0.7...Release0.8
Existing Lua API Changes
- [+] Added third protocolVersion argument to gameserver.CreateNetChannel
- [+] Added fourth socket(use NS_ enums) argument to gameserver.CreateNetChannel & gameserver.SendConnectionlessPacket
- [+] Added second and third arguments to HolyLib:OnPhysicsLag providing the entities it was working on when it triggered.
- [+] Added voicechat.SaveVoiceStream 4th argument returnWaveData (previously the 4th argument was async but that one was removed)
- [+] Added directData argument to VoiceStream:GetData, VoiceStream:GetIndex, VoiceStream:SetIndex and VoiceStream:SetData
- [+] Added overflow checks for gameserver.BroadcastMessage, CNetChan:SendMessage and CBaseClient:SendNetMsg when you try to use a overflowed buffer
- [+] Added a few more arguments to HolyLib:OnPhysicsLag like phys1, phys2, recalcPhys, callerFunction and the arguments ent1 & ent2 were removed since you can call PhysObj:GetEntity
- [+] Added holylib_gameserver_maxplayers allowing the player queue to support up to 8192 players (in theory more but you'd never need more)
- [#] Fixed addonsystem.ShouldMount & addonsystem.SetShouldMount workshopID arguments being a number when they should have been a string.
- [#] Changed VoiceData:GetUncompressedData to now returns a statusCode/a number on failure instead of possibly returning a garbage string.
- [#] Limited HttpServer:SetName to have a length limit of 64 characters.
- [#] Fixed IGModAudioChannel:IsValid throwing a error when it's NULL instead of returning false.
- [#] Fixed HttpServer:SetWriteTimeout using the wrong arguments. (See #65)
- [#] Fixed bf_read:ReadBytes and bf_read:ReadBits both failing to push the string properly to lua.
- [#] Changed voicechat.SaveVoiceStream & voicechat.LoadVoiceStream to remove their 4th sync argument, if a callback is provided it will be async, else it'll run sync
- [#] Renamed HolyLib:OnPhysFrame to HolyLib:PrePhysFrame
- [#] Fixed a typo bf_write:WriteBitVec3normal -> bf_write:WriteBitVec3Normal
- [#] Changed arguments and return value of HolyLib:PostEntityConstructor
- [#] Changed pvs.AddEntityToTransmit to only work inside HolyLib:PreCheckTransmit due to safety & performance reasons
- [#] Changed HolyLib:[Pre/Post]CheckTransmit hooks to be disabled by default needing to be now enabled using pvs.Enable[Pre/Post]TransmitHook
- [#] Changed HttpServer:[Get/Put/Post/OtherShit] callback return value to be flipped, return false to mark a request as NOT handled, return true to mark it as handled
- [#] Fixed networking module partially not working without the pvs module - it internally had depended on it.
- [#] Fixed stringtable.CreateStringTable and stringtable.CreateStringTableEx both failing to catch the case in which all stringtable slots were used leading to a server error/shutdown.
- [#] Fixed pvs.GetEntitiesFromTransmit failing internally due to it using the wrong value
- [#] Changed callback arguments of HttpServer:[Get/Put/Post/Patch/Delete/Options] to remove the response.
- -> The HttpRequest now contains all methods of the HttpResponse so you should use the request directly! (This was done to help the Lua GC a bit & slightly improve callback performance)
- [#] Fixed HttpServer:IsRunning() falsely reporting true even if it failed to start.
- [-] Removed VoiceData:GetUncompressedData decompress size argument
- [-] Removed CBaseClient:Transmit third argument fragments.
- [-] Removed gameserver.CalculateCPUUsage and gameserver.ApproximateProcessMemoryUsage since they never worked.
QoL updates
- [#] Changed some console message to be more consistent.
- [#] Solved a possible crash caused by a CGameClient disconnecting after g_Lua became NULL