Commit Graph
596 Commits
Author SHA1 Message Date
ad8b0b3c83 Add bytes or sbytes to enum where available (#1430)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-12-08 12:46:30 +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
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
Víctor Aguilera PuertoandGitHub 04277feba6 AlignWithClosestGridTile extension for EntityCoordinates (#1386)
* AlignWithClosestGridTile extension for EntityCoordinates
- Fixes component exception when adding a timer component to a deleted entity.

* Address review

* actually...
2020-11-05 17:48:57 +01:00
178e2cbd76 Make icons great again (#1349)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-04 02:33:15 +01:00
71033099e4 Fix initialized entity physics (#1377)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-03 21:45:53 +11:00
ad3932b213 Guards for physics state updates (#1373)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-01 23:25:17 +01:00
2f21a2551e Fix grid parenting (#1347)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-30 01:02:14 +01:00
DrSmugleafandGitHub abe7d679a3 Add timer component (#1358) 2020-10-30 01:01:27 +01:00
deeda5cfa5 Grid-tree occluders (#1362)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-30 00:59:52 +01:00
DrSmugleafandGitHub 2296699651 Add shared and server eye components (#1356) 2020-10-30 00:55:56 +01:00
1e723eae92 Make transformstate actuall check equals (#1361)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-29 13:05:38 +01:00
ac5ad96117 Make lockers pushable again (#1353)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-29 20:38:12 +11:00
DrSmugleafandGitHub dc62ac6560 Fix map deserialized entities not being included in OccluderSystem (#1357)
* Fix map deserialized entities not being included in OccluderSystem

* Revert "Fix map deserialized entities not being included in OccluderSystem"

This reverts commit 0af8b50231.

* Make it do it in occluder startup instead
2020-10-29 20:34:30 +11:00
4fd1084946 Rotation rounding (#1352)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-27 00:34:50 +01:00
4bc53ebfe8 Fix (some) physics stuttering (#1327)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-25 15:37:03 +01:00
Víctor Aguilera Puerto 4b709ebb44 Fix SnapGridComponent for entities without grid. 2020-10-21 16:04:58 +02:00
Víctor Aguilera PuertoandGitHub 47593307b6 Remove default grids (#1322)
* Remove default grids

* Fix test. Invalid grids don't "exist" anymore in map manager.

* Fix crashes

* Fix placement modes.

* Remove warning.
2020-10-21 15:12:02 +02:00
9cc3c2ccd5 Don't wake immovable objects (#1343)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-21 10:24:42 +02:00
Pieter-Jan Briers 62b60fc426 Add GetOffset() helper to SnapGridComponent. 2020-10-20 12:04:46 +02:00
DrSmugleafandGitHub 6eb3301904 Add debug assert for transform self parenting (#1340) 2020-10-19 22:20:42 +02:00
4a8c84d948 Fix even more physics jank (#1338)
* Fix even more physics jank

* Minor tweaks

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-10-17 17:42:22 +02:00
Víctor Aguilera Puerto b41bd56dce Serialize mass correctly in PhysicsComponent. 2020-10-16 13:22:52 +02:00
DrSmugleafandGitHub 3176d4c06e Rename last usages of Collidable to Physics (#1333) 2020-10-14 22:42:01 +02:00
DrSmugleafandGitHub 75238b183b Fix chunk to string test and PhysicsComponent file name (#1321)
* Fix chunk to string test and PhysicsComponent file name

* AAAAAAAAA

* Fix accidentally deanchoring everything
2020-10-12 01:01:27 +02:00
DrSmugleafandGitHub f8d5fa5319 Rename CollidableComponent to PhysicsComponent (#1320) 2020-10-11 15:32:50 +02:00
DrSmugleafandGitHub b1a09db07b Remove obsolete physics component (#1317) 2020-10-11 14:39:22 +02:00
DrSmugleafandGitHub da76788751 Replace MapIndices to Vector2i (#1318) 2020-10-11 14:33:09 +02:00
5f1251a813 LocalPosition value check (#1312)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-10 12:05:06 +02:00
00fbefa4e5 Physics caching go brrt (#1307)
* Physics caching go brrt

* Minor optimisation

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-09 11:40:02 +02:00
Pieter-Jan Briers e87520bea5 Occluder tree for server. 2020-09-24 18:14:24 +02:00
Víctor Aguilera Puerto ab0c135fbf ViewVariables for grids 2020-09-11 13:03:57 +02:00
Víctor Aguilera Puerto 1181464829 Add RotateEvent raised when a Transform's LocalRotation changes. 2020-09-07 13:56:34 +02:00
0a67cecfa5 Replace every usage of GridCoordinates with EntityCoordinates (#1280)
* Added struct skeleton for EntityCoordinates.

* Polish EntityCoordinates, add tests, add EntityCoordinates to Transforms

* Doc cleanup

* Remove useless code

* Return offset 0 when you don't have a parent

* Test for making sure EntityCoordinates for entities without parents have offset 0

* Use parent transform's GridId for GetGridId.

* Adds various methods, checks and tests

* Replace GridCoordinates with EntityCoordinates

* EyeManager.WorldToScreen fix

* Address reviews

* Fix za buildo

* Fix one transform test

* Fix the remaining tests

* Remove duplicate

* Remove another merge duplicate

* Fix property

* Rename most usages of GridCoordinates to EntityCoordinates.

* Add WithEntityId method to EntityCoordinates.

* Fix EntityCoordinates usage in GetEntitiesInRange

* Remove cursed IMapGrid method, change naming.

* Makes GridTileLookupSystem use EntityCoordinates

Co-authored-by: Acruid <shatter66@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <zddm@outlook.es>
2020-09-06 16:09:19 +02:00
0701b040ee EntityCoordinates (#1277)
* Added struct skeleton for EntityCoordinates.

* Polish EntityCoordinates, add tests, add EntityCoordinates to Transforms

* Doc cleanup

* Remove useless code

* Return offset 0 when you don't have a parent

* Test for making sure EntityCoordinates for entities without parents have offset 0

* Use parent transform's GridId for GetGridId.

* Adds various methods, checks and tests

* Adds new constructor to EntityCoordinates and add WithPosition method

Co-authored-by: Acruid <shatter66@gmail.com>
2020-09-04 23:08:18 +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
Pieter-Jan Briers d4fc0517c4 Fix IEntity.TryGetComponent nullability signatures.
This means all invocations of TryGetComponent now need a nullable parameter because, well, the result can be null. that's the point.
2020-08-20 15:31:18 +02:00
VinceandGitHub 6a546dadf1 Fixes most warnings (#1233) 2020-08-16 14:04:15 +02:00
Acruid c7f5521d2e Removed IsEntityPaused from the server component query, it was bugged and only about 1/5 of the entities on the map were actually processed in the collision system. This change causes a noticeable perf impact when starting the server and lasting until everything on the map goes to sleep.
BodyType is now serializable, fixes bug with VV.
Moved both velocity properties from ICollidableComponent to IPhysBody, added default methods to IPhysBody to get the word transform.
Added DebugTools.Break() method, calling it breaks execution in the attacked debugger.
Added VV attributes to various CollidableComponent properties.
2020-08-13 21:52:53 -07:00
Acruid c4899069c6 Added sleep culling to physics bodies, noticeable perf gains.
Bodies without velocity are considered for collision, lockers are fixed.
Added force/torque integration to physics bodies.
Friction is now tickrate agnostic.
2020-08-09 01:16:55 -07:00
44bcbfa8e5 Misc changed needed for atmos (#1186)
* Add needed changes for atmos

* Get delays for RSI state

* Placement hijack can handle deletion on gridcoordinates

* Array serialization

* MapIndices to GridCoordinates

* CollidableComponent creates VirtualControllers using IDynamicTypeFactory

* Probability assert now prints chance

* Remove unused stuff, fix build

* Update documentation for map indices

* readability

* Removed unused using statements

* Remove ToAngle

* Fix messed up merge

* Fix MapIndices/GridCoordinates conversion

* Add "invalid" direction.

* Update Robust.Shared/Serialization/YamlObjectSerializer.cs

* Nullable fix

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-08-02 18:39:23 +02:00
DrSmugleafandGitHub 1de41531ce Fix casing on physics and collidable data fields (#1197) 2020-07-29 14:43:18 +02:00
Acruid 876d528578 Had to optimize the physics so that the client runs on my laptop. 2020-07-29 00:47:47 -07:00
708e546446 CollidableComponent Anchored serialization (#1196)
Co-authored-by: py01 <pyronetics01@gmail.com>
2020-07-28 18:43:09 -07: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
40a8dae236 Allow one VirtualController in CollidableComponent per individual type (#1189)
* Replace single controller with a dictionary

* Actually initialize the controller dictionary

* Fix not upgrading old physics controllers

* Return controller when adding it in CollidableComponent

* Make GetOrCreate name consistent

* Add updating linear velocity depending on controllers

* Address reviews

* Update Robust.Shared/Physics/VirtualController.cs

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

* Add missing physics component methods

* Make method names consistent with the rest of the project

* Add documentation to controller manipulation methods

* Add another method for controller manipulation

* Add SetController method

* Add stop method

* Add stop method to controllers

* Add bool return type to controller stopping and GetControllers method

* Fix physics stop return type not being bool

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-23 18:32:45 +02:00
Acruid 8475c1ae4b Moves all of the PhysicsComponent data to the CollidableComponent, and marks the PhysicsComponent as obsolete. 2020-07-21 23:36:42 -07:00
Pieter-Jan Briers 0297464af5 Fix MapID assignment in transform init. 2020-07-22 01:51:17 +02:00