I'm bored out of my mind, have nothing to do, so I thought I might change the registerFunction to e2function in the E2/core. This is how things are as of now:
E2 func list:
Code:
bone
debug
console
files
bitwise
wirelink
weapon
register function list:
Code:
angle
array
compat
selfaware
player
entity
vector2
vector
I think using the e2function is a lot cleaner, adds DESCRIPTIVE variables (and readable by E2 helper) names to the code, not that *@#$%ing rv1,rv2 which was driving me crazy when I tried to edit some code in E2.
Permission from devs? As starting and the edits getting denied wouldn't be nice......
----
Im talking about this:
http://wiki.garrysmod.com/?title=Wir...nsion_Tutorial
Atm Im working on remaking angle.lua
edit: 2/3 of angle.lua done, testing in SP
at devs:
why the heck you complicate your lives like that? math.ceil etc is way faster I bet
Code:
e2function angle ceil (angle a)
--original code:
--local p = a[1] - a[1] % -1
--local y = a[2] - a[2] % -1
--local r = a[3] - a[3] % -1
--return {p, y, r}
--my code:
local p = math.ceil(a[1])
local y = math.ceil(a[2])
local r = math.ceil(a[3])
return {p,y,r}
end also:
Code:
e2function angle angnorm(angle a)
return {(a[1] + 180) % 360 - 180,(a[2] + 180) % 360 - 180,(a[3] + 180) % 360 - 180}
end Calling destructors for all Expression2 chips.
Reloading Expression2 extensions.
entities/gmod_wire_expression2/core/angle.lua:175: PP syntax error: Function names may not start with a number.
:13777: '=' expected near 'void'
Calling constructors for all Expression2 chips.
Done reloading Expression2 extensions.
Bookmarks