code_gs
code_gs
Reposting from https://github.com/ValveSoftware/source-sdk-2013/issues/518 since the creator is banned. These usages from FLT_MIN should be replaced with ``std::numeric_limits::lowest()``, and FLT_MAX with `std::numeric_limit::max()` for consistency though these are standard to be equivalent....
"How could this possibly be useful?" Some weapons and entities are made to override ones created by the map, or default engine instances. For example, a CS:S weapon pack would...
Remake of https://github.com/Facepunch/garrysmod/pull/920 with more flexibility and extendibility to custom types. Adds: - `string Vector:Serialize(string seperator)` (C++ implemented: https://gist.github.com/Kefta/e34782f4622a6bc63262b42d9dee451d ) - `string Angle:Serialize(string separator)` - `string Matrix:Serialize(string separator)` - `string...
An alternative of https://github.com/Facepunch/garrysmod/pull/1880 for dynamic text. Relies on https://github.com/Facepunch/garrysmod/pull/1881. Supersedes https://github.com/Facepunch/garrysmod/pull/1333 - I closed that one because people should really be using a function like that added in #1880...
Checks if the table can be interpreted as an rgb(a) color since engine functions that return a color do not set the metatable. The alternative would be to add a...
Usage ```Lua -- Shared outright in a file local HelloWorldMessage = util.MakeColoredTextMessage( "HelloWorldMessage", Color(255, 0, 255), "Hello World!" ) -- Inside of a serverside function HelloWorldMessage(ply) -- or HelloWorldMessage(player.GetAll()) --...
Adds: - `bool success, ... rets SafeIndex(any var, any key)` - attempts to index the var with the given key. Returns true and the ret(s) if the index could occur...
- Localised global/library functions to the top. A majority of these were already done for string.Explode (and was accepted into the codebase before), so I just moved them to the...
Deep copies are now made of weapons and entities in Get. Also, BaseClass keys are no longer set in any table except the base SWEP/ENT table. Lastly, the SWEPs base...
Finale to the critically acclaimed color-hex PR series (https://github.com/garrynewman/garrysmod/pull/1089); I ended up going with the implementation recommended by @SimonSchick. Although @sannysc made some very good points on the side of...