Commit Graph
29 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
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
DTanxxxGitHubDavid Tan <>
791fcfd65e Updated ContainerHelpers to use new extensions (#1396)
Co-authored-by: David Tan <>
2020-11-09 09:22:31 +01:00
Víctor Aguilera Puerto 7aaeac81b0 Use EnsureComponent in ContainerManagerComponent
Just a small change.
2020-09-29 17:34:42 +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
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
Pieter-Jan BriersandGitHub 0d3cd41382 Enable NRTs on Robust.Server (#1118) 2020-06-09 14:18:29 +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 8d30bcb041 Added a ShowContents flag to containers so that the contents can be rendered.
Added `bool TryGetContainer(IEntity, out IContainer)` to containers.
Changed the API of ContainerHelpers.
2020-01-03 15:16:07 -08:00
Pieter-Jan Briers 2f94beb4b5 Fix ContainerManagerComponent.ContainsEntity not returning correct results for multiple containers. 2019-12-24 15:16:14 +01:00
Pieter-Jan Briers 2b037c3bf2 Synchronize containers to the client. 2019-12-22 21:43:03 +01:00
Pieter-Jan Briers 2b8645b60f Fix some Robust.Server namespaces in Robust.Shared. 2019-12-22 13:40:43 +01:00
AcruidandPieter-Jan Briers f5c0dba194 Map & Grid Entities (#916)
* Adds Map components to the ECS system.

* Grid entities are now created along with map grids.
Grid components are now properly reused from map deserialization when a grid is created through the MapManager.

* Make MapGridComponent shared.
Don't send Nullspace default grid to client, they have their own.
Properly link the new grid with the entity sent from the server.

* Fixes nullRefException when ToString() is called on an Entity with no Prototype.

* Adds logging debug info about binding a map/grid to an entity.
Nightly Commit.

* Client map networking now properly pivots a grid from the client entity to the shared entity.
Added IMapGridComponent.ClearGridId() to properly dissociate the component from a grid before deleting it.
WorldPosition of a default grid is always 0,0 regardless of the entity transform (if any).
Nullspace map and default grid are not bound to an entity.
Nullspace map and default grid cannot be deleted.

* Map Entities are now created along with new maps.

* Client & Server load with new scene hierarchy.

* Fix rebase damage.

* Added ContainerHelpers helper class.

* Fix Container checks.

* Fixed clothes.

* Fixing unit tests.

* Removed disabled code.

* Actually initialize and startup the Map and Grid entities.
2019-12-21 22:11:17 +01:00
AcruidandGitHub ea8e5e9fe7 EventBus Refactor (#909)
* Extracts the ECS event system out of EntityManager, and into a new class called EventBus.
XML Docs and full test coverage for EventBus.
2019-12-08 19:36:52 -08:00
Acruid fd47179d79 The intention was to delete the key, not set it to null. Previously if ContainerManagerComponent.ForceRemove was called multiple times with a Deleted container, it would throw a NullRefException. 2019-09-16 16:24:47 -07:00
Acruid 7239e70294 When an item is inserted into a container, it's LocalPosition is set to (0,0). This causes the position of the contained entity to == the container's position. Entities are now spatially inside their containers. Previously, the local position was not set, so contained entities could be tens of meters away from their containers, preventing things like FindInSphere from working intuitively. 2019-09-15 14:47:09 -07:00
Acruid e2c60871e9 ContainerManagerComponent now checks if the container is deleted before trying to remove an entity from it. Previously it would blindly call ForceRemove on a deleted container, causing a NullRefException.
Added some debug assertions to Container. These should help verify that a deleted container is not being accessed.
2019-09-09 12:22:32 -07:00
Acruid c8ff91bf72 Entity Containers now raise a ContainerContentsModifiedMessage Component Message when their set of entities is modified.
Code cleanup in Container.cs
2019-09-09 10:37:10 -07:00
Pieter-Jan Briers 4cc30823a6 Fix build on .NET Framework. 2019-08-29 20:29:36 +02:00
Pieter-Jan Briers 62f25669c7 Make it possible to VV containers. 2019-08-29 14:36:07 +02:00
Pieter-Jan BriersandGitHub bb4a1eda8e Project file refactor (#819)
* Project file refactor

Move all the .csproj files to the new .NET Core style.
This doesn't make any difference for compiling for Framework,
but it does reduce a ton of useless boilerplate.

As an extension of this, killed a bunch of uncompiled & unmaintained .cs files.

Compiling for release (to profile) works now.
Removed AnyCPU targets from the solution file.

* Fix compiler warnings.
2019-05-28 00:16:01 +02:00
Pieter-Jan Briers afc2a747c8 Fix deleting entities that have containers. 2019-05-06 19:30:51 +02:00
Pieter-Jan Briers 4979620486 Container improvements.
Make containers actually handle automatic removal of entities,
like say on unpartenting.
This was because a lot of content code was doing this manually,
and it broke, really badly.

They also emit events now that said content code can use instead.
2019-05-05 13:07:59 +02:00
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00