code_gs

Results 32 issues of 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...

Enhancement

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...

Enhancement

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...

Addition

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...

Addition

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()) --...

Addition

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...

Addition

- 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...

Enhancement

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...

Enhancement
Conflicts

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...

Addition