Commit graph

15 commits

Author SHA1 Message Date
Erik Ogenvik
d7bf27d180 Take plantable adjustment into account.
When an entity which is "planted" is adjusted, we also look
for if there's any offset specified for the height adjustment.
2016-06-26 19:08:54 +02:00
Erik Ogenvik
760f92f707 Alter how visibility is determined.
When checking visibility, we now use the Domains more extensively.
The base rules are:
* If an entity is a child of a domain-less entity, visiblity for the
  child is the same as for the parent.
* If an entity is a child of a domain-holding entity, visibility is
  determined by the Domain.
* Entities cannot observe things above a Domain.
* Entities can observe things below a Domain, if the Domain allows it.

These rules are not yet set in stone. We need some more time figuring out
exactly how we want visibility implemented. We're striving for a balance
between a powerful but not too complex system, with good performance.
2016-06-22 17:29:27 +02:00
Erik Ogenvik
3b1a2cb566 Make Domain an interface and provide two versions.
The "physical" world behaves like a standard world. The "void" world
however doesn't allow for neither movement nor sights.
2014-09-24 22:00:54 +02:00
Erik Ogenvik
99ce6b900c Expanded comments. 2014-09-22 20:18:04 +02:00
Erik Ogenvik
bb7d004e64 Send Disappear when moving out of domain.
It would be better to use a Broadcast of the Disappear op though, but
that would require a change so that the location is encoded in the op
which will be broadcasted. Otherwise the WorldRouter will just use the
location of the entity as it is when the op is processed, which will be
wrong for this case.
2014-09-22 20:14:41 +02:00
Erik Ogenvik
d02ddca0d0 Moved collision detection to the Domain.
Collision detection should fully be handled by the domain, as should
sight checking.
The plan is to let the domain keep a separate structure of all collision
geometry, optimized in something like a quad or oct tree. Since the vast
majority of geometry is static, in the sense that it very seldom moves,
the Domain should keep a flat representation of all geometry, with
precomputer meshes for fast lookup.
Similarily it should keep a separate structure, or structures, for sight
checks.
And it should of course also use Bullet for collision detection.
2014-09-18 21:45:35 +02:00
Erik Ogenvik
23b2b71986 Moved visibility change calculations to the domain.
Currently it just iterates over all child entities, but this should of
course be done more efficient, with spacial trees.
2014-09-15 21:11:36 +02:00
Erik Ogenvik
dbf1a9e345 Let the Domain determine broadcast visibility. 2014-09-15 21:11:36 +02:00
Erik Ogenvik
2f3ab1da18 Let the Domain handle sights.
As any world can contain multiple domains, we let the domain handle the
sights calculations.
This is a change from how this previously was done, as previously
sight checks were only done for the top level World entity. This has
changes however, so that sights checks now are done for all entities.

When determining whether an entity can be seen, the system first checks
the size of the entity against the distance from the observer. If this
check fails, the system makes exceptions if the entity in case is
outfitted or wielded.
2014-09-15 21:11:36 +02:00
Erik Ogenvik
b171410b05 Let the domain be specified by a property.
This means that we only attach domains to entities that have the
"domain" property. The "land" entity type for example.
2014-09-15 21:11:35 +02:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Alistair Riddoch
035f25e5dd Start work on a test movement domain class for handling collisions with bullet. 2010-08-10 00:54:25 +01:00
Alistair Riddoch
f7b062219a Make Domain a singleton, and add method to constrain height 2009-05-12 23:26:42 +01:00
Alistair Riddoch
e35a9d6873 Fill out the basics of the class 2009-05-08 15:48:19 +01:00
Alistair Riddoch
0cca7eae11 Start work on interface for movement domain code 2009-05-08 15:26:19 +01:00