Commit Graph
77 Commits
Author SHA1 Message Date
b3976eb8d7 Analyzer Bongaloo 2: The Return (#1512)
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2021-02-08 18:05:27 +01:00
a274b8dfc2 EntityQuery no longer yields paused by default (#1521)
* Change EntityQuery to not get paused by default

* GetAllComponents

* Fix shell commands

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-02-04 00:20:31 +11:00
Pieter-Jan Briers d5f3292e0a Unregister OnSessionOnPlayerStatusChanged on bound user interfaces.
I am frankly flabbergasted this is only a problem now.
2021-01-20 21:00:24 +01:00
20kdcandGitHub 5e914cb13a PointLightComponent: Don't dirty if enabled is being set to what it's already set to. (#1507) 2021-01-16 00:13:55 +11:00
DrSmugleafandGitHub 07c1f9e1af Replace MaybeNullWhen(false) with NotNullWhen(true) in AppearanceComponent (#1461) 2020-12-25 15:17:54 +01:00
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
a37ac16fa3 EntityPrototypeIcon SpriteSpecifier (#1401)
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2020-11-16 01:52:19 +01:00
ef622f7dde spritecomp will ignore state/texture attribute when layers are defined (#1399)
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2020-11-13 01:03:47 +01:00
DTanxxxGitHubDavid Tan <>
791fcfd65e Updated ContainerHelpers to use new extensions (#1396)
Co-authored-by: David Tan <>
2020-11-09 09:22:31 +01:00
fd93fcb89c EyeComponent improvements (#1384)
* EyeComponent improvements

* Use EqualsApprox where appropiate.

* Update Robust.Client/GameObjects/Components/Eye/EyeComponent.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2020-11-06 19:29:44 +11:00
DrSmugleafandGitHub 2296699651 Add shared and server eye components (#1356) 2020-10-30 00:55:56 +01:00
c0e66d725a Stop redundant appearance data from being sent (#1326)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-14 18:12:22 +02:00
bc87f2ea9c Pause refactor (#1314)
* Refactor pausing

* Sprite as well woops

* Bring PauseManagerExt back with [Obsolete] so that content compiles.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-10-12 18:16:20 +02:00
Víctor Aguilera Puerto 7784a41567 Adds LayerCount property to server-side SpriteComponent 2020-10-12 12:50:36 +02:00
Víctor Aguilera Puerto 7aaeac81b0 Use EnsureComponent in ContainerManagerComponent
Just a small change.
2020-09-29 17:34:42 +02:00
DTanxxxGitHubDavid Tan <>
8dc3723c09 Make more fields VV and editable (#1284)
* Make more fields VV and editable

* Applied feedback

Co-authored-by: David Tan <>
2020-09-17 23:17:46 +02:00
9cc9b68e09 Toggle function in BoundUserInterface (#1283)
* add toggle

* Update Robust.Server/GameObjects/Components/UserInterface/ServerUserInterfaceComponent.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-09-08 18:54:03 +02:00
ExpandGitHub 31e9554cd7 Makes more fields VV (#1282)
* Sprite & Appearance VV

* Added Client SpriteComp & RSI
2020-09-08 18:44:53 +02:00
DrSmugleafandGitHub ad2545d83d Add nullable API methods for getting components and user interfaces (#1241) 2020-08-22 13:56:05 +02:00
Pieter-Jan Briers f0824212da Make container shutdown more sane.
Fixed removal of deleted entities from their parent container not working if one of said parent's other containers got deleted at some point.
2020-08-21 14:53:48 +02:00
DrSmugleafandGitHub 31ff253fc0 Replace assert with nullable operator (#1242) 2020-08-20 16:38:56 +02:00
VinceandGitHub 6a546dadf1 Fixes most warnings (#1233) 2020-08-16 14:04:15 +02:00
16d50f3ecf Container light occlusion (#967)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-26 13:28:25 +02:00
ShadowCommanderandGitHub 30108cf992 Refactor DetachParent (#1188) 2020-07-25 17:04:14 +02:00
Pieter-Jan Briers bec9639554 Optimize PVS a little bit. 2020-07-09 02:56:07 +02:00
Pieter-Jan Briers 8d89a6af05 Add some VV attributes to containers. 2020-07-04 00:35:40 +02:00
AcruidandGitHub 99933499b7 Merged Client and Server PhysicsComponent (#1163) 2020-07-02 09:34:16 +02:00
650033a184 Event for changing server PhysicsComponent Anchored (#1160)
Co-authored-by: py01 <pyronetics01@gmail.com>
2020-06-30 18:44:03 +02:00
Pieter-Jan BriersandGitHub 31fb65bcb9 Movement prediction work. (#1144)
* Fix client-side input system not sending sequence numbers for input messages.

This caused message ordering issues and keys getting stuck down.

* Make sure EyeUpdateSystem runs after physics.

* IGameTiming.TickFraction helper.

* Subtick data for input commands.

* Literally a unit test to verify that I wasn't going insane while debugging input message ordering issues.

* More prediction logs behind net.predict.

* Move physics to shared and run it on the client.

* Synchronize grid gravity.

* Fix ResetPredictedEntities crash when entities get deleted server-side.

* Fix CollidableComponent setters not calling Dirty()

* Fix going into space while predicting.

* Watch window uses history line edit.

* Fix unpredicted objects stuck-jittering.

* VV tags for interp vars on transform.

* Fix 0 mass objects on client.

* Fix friction calculations being TPS dependent.

* Reset predict flag on handelComponentState
2020-06-24 20:47:20 +02:00
Tyler YoungandGitHub faff0797bf Make Lidgren Use Spans & Shared Pool (#1140)
* make lidgren use spans everywhere where it can

convert custom pooling to shared array pool impl

add unit tests for read/write

add native socket extensions to socket so we can legit pass spans for SendTo/ReceiveFrom

bump version in lidgren csproj

replace some random "% 8" w/ "& 7"

more minor nullability hacks to fix static analysis complaints

made receiving packets use span

minor native sockets refactor to use pinvoke

add read/write constrained/prealloc'd bit stream impl to lidgren and update usages

fixed missing stream cleanup

remove outstanding stream cleanup since it refs buffer thru the class, can't read some other buf

apply suggestions from code review

remove unsafe cruft

* add tests to gh actions

* make stats use interpolation in tostring and remove m_bytesAllocated since it's all in the shared pool now

* this pr still open so fuck it

stats, human readability, faster BitsToHold methods

* add api compatible version of ReadBytes

* rename ReadOnlyStreamWrapper -> ReadOnlyWrapperStream

rename WriteOnlyStreamWrapper -> WriteOnlyWrapperStream

add AppendViaStream, AppenderStream impl

add and update documentation on read/write bytes methods

also fix some goofs
2020-06-24 04:09:20 +02:00
Pieter-Jan BriersandGitHub af249f80c8 Improved click detection supporting features: (#1133)
* Improved click detection supporting features:

Clickable removed from engine
Texture/RSI load hooks for content
New sprite layer API

* Fix tests.
2020-06-18 02:25:02 +02:00
Pieter-Jan BriersandGitHub 0d3cd41382 Enable NRTs on Robust.Server (#1118) 2020-06-09 14:18:29 +02:00
SweptandGitHub a3814dd7c0 Changes PointLightComponent radius from an int to a float. (#1111) 2020-06-07 17:33:03 +02:00
ComicIronicandGitHub 486fd670e2 Change DrawDepth to int, add content constant hook (#1090)
This allows DrawDepth to be defined in the content layer.
2020-05-31 00:40:48 +02:00
Pieter-Jan Briers 9eeb1d1afa Fix compiler warnings 2020-05-28 17:44:31 +02:00
Pieter-Jan Briers 263a72ed07 Fix NullRef in PhysicsComponent.RemoveController() 2020-05-28 13:18:25 +02:00
Pieter-Jan Briers 488ce445a0 Shut down physics controllers when PhysicsComponent shuts down. 2020-05-28 00:49:42 +02:00
Pieter-Jan Briers e334d6610e Fix race condition in the Bound UI system.
If you sent multiple state updates on the same frame these could easily arrive in different orders on the client, which is definitely not intended. This fixes that by sending them per frame.

As a result, this also means earlier updates on the same frame are discarded, saving bandwidth.
2020-05-26 16:20:47 +02:00
Jackson LewisandGitHub 274334c926 Rewrite the physics engine (#1037) 2020-05-23 01:21:02 +02:00
chairbenderandGitHub 4e192f9084 Add helper method for statically getting entity systems (#1061) 2020-05-20 16:42:02 +02:00
Víctor Aguilera PuertoandGitHub 424a9c9dfb ServerUserInterfaceComponent can now SetState on a specific player (#1060) 2020-05-18 20:53:03 +02:00
Pieter-Jan Briers 7c4b1af967 Optimize UserInterfaceSystem and clean up bound user interface API slightly. 2020-04-26 00:51:46 +02:00
Jackson LewisandGitHub 828ada9e22 Split HandleMessage into local and networked variants, add ICommonSession parameter to the latter (#1028) 2020-04-20 09:37:10 +02:00
Víctor Aguilera PuertoandGitHub 3d6a3a6216 Add visibility masks to IPlayerSession, add Visibility componen… (#1026) 2020-04-10 16:38:59 +02:00
Pieter-Jan Briers 8f96c65312 Fix BoundUserInterface not raising close event if player disconnects. 2020-03-30 18:31:09 +02:00
Tyler YoungandGitHub 214f9f0323 Implement client bubble PVS. (#983)
* bubble implementation

include contained entities

fix line edit crash when clipboard contents are null somehow

use CVar for update bubble range

remove seenMovers that get NaN'd out of MaxUpdateRange - huge reduction in network traffic from bullets

cut default of MaxUpdateRange down to 12.5 for now

maybe handle teleported things

handle removing player state on disconnect

fixed positional audio errors

make UpdateEntityTree also update player's last seen ents

make net.maxupdaterange cvar tunable at runtime w/o impacting performance

back to position nan as means to hide from client

revert work pooling as the wrong player was getting the wrong game state

ffs needed to think less about *if* something is *seen* and more about *when* it must be *unseen*

clean up usings

handle parenting and sequencing issues that arise on the client

gather needed ents to update recursively

applied suggestions from code review

fix missing recursively contained ents

make assumption that client last saw things on first tick instead of tick zero, as zero would be the "from tick" and first would be he "to tick"

add First tick as constant to GameTick due to relevance above

renamed includedEnts to checkedEnts to make usage more clear

added comments

inverted some conditions to flatten parts of the pvs logic

fixed sending states when already seen (lastChange < lastSeen to lastChange <= lastSeen)

fix sending states when no actual changes (other bugs?)

local caching of currentTick, remove priorTick

* make TransformComponent's Parent setter call Dirty() to handle replicating network state if AttachParent isn't invoked

* fixed parent changed by setting Parent on Transform not updating parent's Children collection and other stuff

rotating parent entities now are visible with their orbiting children if one of their children moves into view

* break out duplicated code as GetLastSeen

* remove unused net.parallelstates

introduce net.pvs to configure enabling/disabling PVS
2020-02-23 14:42:54 +01:00
AcruidandGitHub 728f58465d EntitySystem Event Refactor (#989)
* Removed the EntitySystem event implementation, it now uses the more advanced EventBus.
Removed EntitySystem.RegisterMessageTypes() function.
Removed EntitySystem.SubscribeEvents() function.
Added EntitySystemMessage.NetChannel field. This holds the remote net channel the event originated from.

* Removed the Sender object from events. If you needed this field, add it to the event class.

* Removed unused event proxy methods from Entity.
SubscribeEvent() has been split into SubscribeNetworkEvent() and SubscribeLocalEvent() methods on EntitySystem.
Most methods on EntityEventBus now require callers to specify the source (Local or Network) of the events.
2020-02-22 17:59:43 +01:00
Acruid df9be436c4 Removed the StateType property from every component. This field was completely unused except for a debug assertion. 2020-01-24 14:07:46 -08:00
Acruid 78a33076f9 Merged client and server CollidableComponent into a shared version. Now shared code can add collidable components to entities. 2020-01-11 14:10:25 -08:00
Acruid 7a77fa59e2 Switched physics collision broadphase from spatial partition to Naive.
Grid->Grid collision works.
2020-01-10 15:39:34 -08:00