Commit Graph

3527 Commits

Author SHA1 Message Date
CoreyLee Hassell
81de36bf67
Rename license to LICENSE 2021-03-06 10:36:19 -05:00
CoreyLee Hassell
9915717ae0
Update CONTRIBUTING.md 2021-03-06 10:33:52 -05:00
Divran
d6ddc396d0
Merge pull request #2142 from wiremod/egp-screen-3dtracker
EGP screen support for egp3DTracker and optional directionality parameter for egp3DTracker
2021-02-14 21:37:33 +01:00
TomyLobo
a68e24e599 Add E2Helper description for egp3DTracker(xwl:nvn) 2021-02-14 21:25:03 +01:00
TomyLobo
8b8e71f858 Fix luacheck warnings 2021-02-14 21:25:03 +01:00
TomyLobo
ad78711555 Convert huddraw.lua to standard lua 2021-02-14 21:25:03 +01:00
TomyLobo
772e2348a9 Add an optional "directionality" parameter to egp3DTracker
- Setting directionality < 0 hides the tracker if the target is in front of the screen/emitter.
- Setting directionality > 0 hides the tracker if the target is behind the screen/emitter.
- Setting directionality = 0 (the default and previous behaviour) shows the tracker in both cases.

This only affects EGP screen and EGP emitter.
EGP HUD ignores this parameter because everything is only visible in front of you anyway.
2021-02-14 21:25:03 +01:00
TomyLobo
a9db15bd2a Refactor to reuse more code 2021-02-14 21:25:03 +01:00
TomyLobo
11e9848ff5 Return early for HUDs 2021-02-14 21:25:03 +01:00
TomyLobo
d304aeb98e Implement 3DTracker for EGP screens 2021-02-14 21:25:03 +01:00
TomyLobo
83203b6642 More code reuse in 3DTracker
This introduces extra CPU load when using 3DTracker on a screen, but
that is only temporarily useless. See next commit.
2021-02-14 21:25:03 +01:00
TomyLobo
b6a05cd8f8 EGP: Rename Is3DTracker to NeedsConstantUpdate 2021-02-14 21:25:03 +01:00
thegrb93
ef8ed00c4f
Allow single line linestrip (#2141) 2021-02-12 20:57:11 -05:00
TomyLobo
0c49a2a5c7
Fix filename for huddraw.lua in cl_init.lua (#2140)
The wrong name broke the EGP HUD for me.
2021-02-06 21:49:01 -05:00
thegrb93
8d44a7e6d4
Prevent admins from seeing who everyone is friends with (#2136) 2021-02-04 10:50:16 -05:00
Vurv
625f2ce6fd
Overall optimizations, Normalize DEFAULT usage to a new E2Lib functio… (#2118)
* Overall optimizations, Normalize DEFAULT usage to a new E2Lib function, newE2Table, Fix D+R Functions

Really long title, but that's because I ended up putting A LOT into the PR. This fixes #2006, as I replaced the usage of the DEFAULT e2 table variable with a new function in the E2Lib, newE2Table, which returns a default e2 table structure.

Also fixed and optimized the Death + Respawn functions I added a year ago. Some functions were broken actually and overall I didn't like the code at all. It is much smaller / neater and avoids memory leaks.

* Use #2110's PlayerTable system

There are also other cores that need to use these new tables, I'm not sure if I want to add more to this PR though.

Thanks to gohidas pointing it out to me.. I got rid of the hook inside player.lua that cleaned up the player death / respawn events and replaced it with #2210's player table system.

* Get rid of redundant comments, whitespace and args

newE2Table had an unused arg left over from when I thought the depth / istable parameters were needed, and I removed the pointed out redundant comments along with another one

Co-authored-by: Vurv78 <Vurv78@users.noreply.github.com>
2021-02-03 21:50:35 -05:00
LightRobin
5c59988659
add getGateName to cl (#2138) 2021-02-02 15:00:19 -05:00
Ripmax
2c127abfd3
Fixes seat switching bug on Pod Controllers (#2134)
* Fixes seat switching bug on Pod Controllers

Noticed a bug which was possibly introduced by commit d6662b2ed4 where left clicking on a seat would transfer the player to said seat, and the player would then not be able to enter the original seat until it is respawned/the player rejoins.

I've recently returned to GMod after about 4-5 years, and do not remember this being an issue.

It is possible that this is intended functionality, and the returning to seat issue is just a bug.

Fixes seat switching bug on Pod Controllers with "Allow Buttons" enabled.

* Update gmod_wire_pod.lua

Changed ```!``` to ```not```
2021-01-26 12:34:58 -05:00
thegrb93
696d344942
Fix string rep limit (#2133) 2021-01-24 20:58:57 -05:00
thegrb93
cd5c3a3377
Fix check causing turret sounds not to work (#2131) 2021-01-23 16:55:15 -05:00
relt-1
5fb9958432
Update gmod_wire_screen.lua (#2129)
fix the background
2021-01-23 00:38:40 -05:00
relt-1
81f6ab2739
Added 5 monitors. (#2127)
* Update wiremonitors.lua

added 5 monitors.

* Update cl_modelplug.lua

make the monitors visible in the gui

* Update wiremonitors.lua

added 5 monitors.

* Update wiremonitors.lua

* Update cl_modelplug.lua

im dumb

* fix z-fighting on oscilloscope screen
2021-01-21 13:54:07 -05:00
Vurv
787e663218
Fix assert (#2117)
Fix e2's assert to now check properly if the condition was 0. Before it checked if the condition would be false or nil, which wouldn't be possible on a number
2020-12-12 16:04:11 -05:00
thegrb93
145863260d
Stops creating an e2 folder in adv_duplicator (#2116) 2020-12-12 16:03:52 -05:00
thegrb93
d7e851dabb
Fix case when wire pointer has no owner. Supersedes #2090 (#2115)
* Fix case when wire pointer has no owner. Supersedes #2090

* It's working
2020-12-11 00:54:48 -05:00
storm37000
180b39a5f9
optimize base_wire_entity client and serverside (#2108)
* optimize client and serverside

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
Co-authored-by: Divran <arviddivran@gmail.com>
2020-12-11 00:42:44 -05:00
TomyLobo
1a0c31105d
Add a system for automatically cleaning up tables with player keys on disconnect (#2110)
* Add a system for automatically cleaning up tables with player keys on disconnect

* Use the player table cleanup system for EGP's ScrHW

* Use the player table cleanup system everywhere else

* Convert some files to standard Lua

* Insert TODO for a function that looks off

* Remove some continue statements

* Fixed some bugs relating to an "undefined variable" luacheck warnings

* Update wire_paths.lua

* Update queuesystem.lua

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
2020-12-10 02:10:08 -05:00
Divran
10f2971b3c
added simple anti spam check to setname (#2112) 2020-12-10 02:09:35 -05:00
thegrb93
403496f557
Fix ridiculous writedata error (#2111) 2020-12-08 13:40:32 -05:00
thegrb93
28127720b2
Update init.lua (#2106)
Fix lua error with nil context
2020-12-07 16:09:50 -05:00
storm37000
fd492dc171
fix serverside EGP.ScrHW memory leak (#2107) 2020-12-06 00:08:18 -05:00
Emily
13d6bdb3ab
Fix GPU VM error on membus write if RAM size <128k (#2105)
Also fixes negative addresses not being treated as ports
2020-12-04 15:57:24 -05:00
thegrb93
8ae2f1a9e4
Fix null chars screwing up e2 networking (#2103) 2020-12-01 23:49:59 -05:00
shadowscion
501dd9875a
Add new GetFrictionSnapshot function (#2100)
* Add GetFrictionSnapshot function

https://wiki.facepunch.com/gmod/PhysObj:GetFrictionSnapshot

* Supposed to support multiple events

* Update entity.lua
2020-11-19 16:56:15 -05:00
Emily
2534e6a213
Fix CPU/GPU/SPU errors caused by null entity (#2101)
* Fix CPU/GPU/SPU errors caused by null entity

Fixes errors caused by the CPU/GPU/SPU being deleted
mid-upload/cache resend/model reset/sound source init

* Simplify GPU/SPU init/update/resend timers
2020-11-19 16:55:56 -05:00
Emily
72a9a990c2
Update HUD Indicator vehicle linking code (#2099)
* Update HUD Indicator vehicle check

* Update HUD Indicator vehicle linking

Made the vehicle linking code more consistent with other entities.

Also made the entity's linking methods compatible with
WireToolSetup.SetupLinking().

* Fix typo

* Make HUDIndicator use DrawHUD from SetupLinking
2020-11-17 16:02:28 -05:00
Emily
70dadb80cc
Fix incorrect GPU monitor bounds (#2098)
* Add automatic calculation of monitor scale

why do it by hand when the computer can do it for you?

* Correct GPU monitor bounds

Cube, panels, window bounds are based on the model's verts
Tray bounds were calculated from previous scale factor of 0.009

Note: the values of the x{1,2}, y{1,2} pairs are only ever used to
calculate the screen's width - the only thing that matters is the
sum of the two values
2020-11-17 16:02:21 -05:00
Emily
29482b0009
Remove F key check from pod controller (#2097)
It was overriding the PlayerBindDown hook, which properly checks the
flashlight bind.
2020-11-14 16:14:26 -05:00
CornerPin
410ab96ed3
Fix egpAngle for text (#2093) 2020-10-13 23:08:09 -04:00
thegrb93
ebade4ed01
Fix button halo drawing despite wire_drawoutline 0 (#2088) 2020-09-14 06:55:08 -04:00
TomyLobo
e7e9569b49
Add findAllowBlockedClasses(N) (#2084)
* Add findUseHardcodedFilter(N)

findUseHardcodedFilter(1) - (default behaviour) Use the hardcoded entity type filter from A Land Before Git History
findUseHardcodedFilter(0) - Don't.

* Add e2doc comment to findUseHardcodedFilter

* Make findUseHardcodedFilter(0) use filter_all instead of filter_none

* Make findUseHardcodedFilter(0) still prevent the chip from being found

* Rename findUseHardcodedFilter to findAllowBlockedClasses and invert its function

* Add E2Helper description for findAllowBlockedClasses
2020-09-06 20:22:37 -04:00
shadowscion
a16532bb97
Reference to Holo object on the holo entity (#2082)
* Reference to Holo object on the holo entity

Small change but it will help with external compatiblity

* Update hologram.lua
2020-08-27 17:44:30 -04:00
shadowscion
295749aaa6
Linked vehicle IO for vehicle controller (#2083)
* Linked vehicle in/out for vehicle controller

* Update gmod_wire_vehicle.lua

* Update gmod_wire_vehicle.lua

* Update gmod_wire_vehicle.lua

I'll get it eventually
2020-08-27 15:18:09 -04:00
Deyan Dobromirov
d6f6333aab
Update wirelib.lua (#2079) 2020-08-20 19:57:26 -04:00
shadow7483147
30f9c4c325
Shadow7483147 bone ragdoll gravity (#2080)
* Add files via upload

* Add files via upload

remove trailing whitespace and various other renaming

* Add files via upload

Clean up garry style commenting and logical operators from the Astar function and its children

* General code cleanup

Mostly just to follow the coding style guideline.
Also fixed navNearestMesh(vn) in the e2 helper not showing up because of the comma.

* missed one

* christ

* ok

* typo

line of sight to that navmvesh.

* Add files via upload

change local variable formatting to CONSTANTS

* ops iterator

loop check to come later

* variable typo

* un/fix navmesh:navIsConnected

* something

(attempt to use getid instead of directly comparing navmesh data, not sure how gmod would handle this so gonna go by tick quota.)

* Delete nav.lua

* Delete cl_nav.lua

* Update bone.lua

* Update prop.lua

* Update prop.lua

* Update bone.lua

use comparison code from propcore to set gravity instead of if condition

* oops

oops

* one moment

check additionally if the bone it iterates over is a valid bone. idk, weird cases.

* should i call it phys instead of bone?

seems like a reasonable change if i'm not directly referring to a model's bones but rather their physics objects

* 😬

* it is now the third time I have forgotten that the IsValid global is capitalized

* utilize E2Lib functions instead of GMod standard

i hate myself, not for any particular reason resulting from the disonnance of this or that on the spagetthification of code or whatever, but there we go.

* Update bone.lua

copy pasting is bad mkay

* fuck go back

* Update e2descriptions.lua

* Update e2descriptions.lua

* for now just check validity independently

* Type checking is not necessary

IsValid already covers whether the physobj is correct, and we're only feeding it physobjs anyways, assuming ValidAction already runs as expected.

* In the context of bone.lua this is fine, but ech.

Sorry, I had confused the code format with propcore.
2020-08-20 19:56:55 -04:00
Sparky
b4387dd182
Merge pull request #2077 from shadowscion/podctrlumsgfix
Unreliable Pod Controller Usermessages
2020-08-18 00:38:28 -04:00
Sparky
8318ab4243
Merge pull request #2078 from Alexandre425/debugger_angle_fix
Fixed debugger crash when trying to represent angles in tables in E2
2020-08-18 00:37:59 -04:00
Sparky
5e5c27bc2c
Update debuggerlib.lua 2020-08-17 20:32:30 -04:00
Alexandre425
7576c53d93 requested changes 2020-08-18 01:21:13 +01:00
shadowscion
589b26ee2e Update gmod_wire_pod.lua 2020-08-17 07:09:26 -05:00