SuperiorServers / dash

Collection of libraries, utilities, and core Garry's Mod changes intended to improve development of addons and gamemodes
Other
66 stars 20 forks source link

Remove type optimisations that create different output results #7

Closed Kefta closed 4 years ago

Kefta commented 7 years ago
> local S = getmetatable"" local t = setmetatable({}, S) print(getmetatable(t) == S) print(isstring(t))...
true
false

The optimisations are not accurate in all cases. Also removed PhysObj functions since they aren't actually entities and thus don't inherit entity functions.

Kefta commented 7 years ago

Added ENTITY.IsCSEnt for clientside entities

Kefta commented 7 years ago

Removed isnumber optimisation:

> local i = 0/0 print(i ~= nil and i == tonumber(i)) print(isnumber(i))...
false
true
ghost commented 6 years ago

Nice backdoor

Kefta commented 4 years ago

This whole file should be removed honestly. Checking the type tag is the only accurate way of determining most types.

Kefta commented 4 years ago

Remove the entire type lib, everything here is wrong with little performance gain.