Erik Ogenvik
c299b60603
Added flag to avoid enqueing multiple Update broadcast ops.
2021-07-26 21:52:38 +02:00
Erik Ogenvik
a40cad95ea
Removed Location from LocatedEntity.
...
Since not all entities have physical location, which is more and more true
now that we have domains. Entities that are placed in non-physical domains don't have
any location data.
This also makes it easier to streamline the sending of properties, since we only need
to send the properties that actually have changed.
In addition, this helps with removing circular references, since the "m_parent" field no longer
is a Ref.
2021-06-18 22:44:30 +02:00
Erik Ogenvik
ed7e43dfed
Prefer references over pointers where possible.
2021-06-02 00:26:41 +02:00
Erik Ogenvik
8da335d14b
Use reference when possible instead of pointers.
2021-05-31 00:05:25 +02:00
Erik Ogenvik
5ebbe26e38
Handle args coming in different order.
2021-05-30 22:38:07 +02:00
Erik Ogenvik
690afccf41
Fixed various memory leaks and test failures.
2021-05-30 12:13:27 +02:00
Erik Ogenvik
458b6f8536
Fixed various memory leak issues throughout the code.
2021-05-27 17:38:58 +02:00
Erik Ogenvik
b580a84ced
Send disappear before deleting entity.
2020-08-29 01:19:18 +02:00
Erik Ogenvik
375a154f12
Use thresholds for visibility distances.
...
In order to make it more efficient we'll only use a certain set of visibility distances
for the visibility spheres. This prevents us from having to do visibility recalculations
every time an entity changes in size.
2020-07-25 23:43:48 +02:00
Erik Ogenvik
24e0f9b994
Added extra appear/disappear checks.
2020-07-22 08:30:32 +02:00
Erik Ogenvik
b2ee7df640
Be more efficient when doing visibility calculations.
...
Instead of going through the whole collision world we optimize
for our specific use case of only wanting to check distance between spheres.
2020-07-20 01:01:43 +02:00
Erik Ogenvik
fb42678f8e
Handle observations in inventory and contain domains.
2020-05-21 23:43:01 +02:00
Erik Ogenvik
d9eb653bbe
Added "close_container" op for closing containers.
...
This is made into a core C++ feature, mainly because we don't want gameplay where
the user is unable to close containers they have opened.
Preferably it should have been in the rules part, but I consider it too
important to not leave opened containers without ability to close them.
2020-05-21 17:12:45 +02:00
Erik Ogenvik
64f899d6d7
Handle that observations might be deleted while iterating over them.
2020-05-20 23:39:14 +02:00
Erik Ogenvik
2c344e1f8d
Handle callbacks more safely.
...
We need to handle callbacks being called in random order.
2020-05-20 22:38:59 +02:00
Erik Ogenvik
1cc4f4e806
Remove obsolete classes.
2020-05-17 19:40:56 +02:00
Erik Ogenvik
2eefd901c1
Handle observers through multiple domains.
2020-05-17 01:35:12 +02:00
Erik Ogenvik
06e0a9127f
Moved observer storage to ContainerDomain.
2020-05-16 00:34:36 +02:00
Erik Ogenvik
0472d434b1
Added property "_containers_active" to inform clients.
2020-05-12 23:05:29 +02:00
Erik Ogenvik
fd04bcf94a
Handle entities added to container.
2020-05-09 23:21:51 +02:00
Erik Ogenvik
998d7d59d9
Added property for allowing container access.
...
Containers won't allow access to their content unless the prop
__container_access is set to include the actor.
2020-05-09 22:09:59 +02:00
Erik Ogenvik
10cbe1340f
Upon destruction, move child entities to parent's location.
...
Although this behaviour needs to be expanded for various scenarios; we don't always want this.
2020-05-03 16:12:45 +02:00
Erik Ogenvik
3bc16a8845
Place children at parent's position when deleted.
2020-05-03 14:43:00 +02:00
Erik Ogenvik
d32139dacc
Make PhysicalDomain honour visibility rules.
...
This means that private and protected entities will be hidden from non-admin entities.
2020-04-26 16:47:13 +02:00
Erik Ogenvik
64bc02da20
Added "visibility" rules to entities.
...
A "private" entity can only be seen by the simulation, and admins.
A "protected" entity can only be seen by its children, or its immediate parent.
2020-04-25 16:36:43 +02:00
Erik Ogenvik
418b6e5c78
Allow resulting ops to be sent from other entity.
...
By setting "from" to be from another entity the WorldRouter code will do a lookup
and send it from the other entity. This achieves the same thing as LocatedEntity::sendWorld(...)
2020-04-14 23:34:48 +02:00
Erik Ogenvik
84045b6dba
Make sure deleted entities have Disappearance sent.
2020-04-14 23:34:48 +02:00
Erik Ogenvik
a5eac03bc2
Added test for disappear and appear.
...
This is a rather high level integration test which runs most of the simulation.
2020-04-14 23:34:48 +02:00