Commit graph

40 commits

Author SHA1 Message Date
Erik Ogenvik
2eeab96efa Separate BBox property from Density property. 2018-12-16 20:40:48 +01:00
Erik Ogenvik
164816f646 Adapt tests to changed structure. 2018-11-03 17:17:50 +01:00
Erik Ogenvik
e85f0831b2 Restructure rule classes.
Classes under "rulesets" have been moved to "rules", and split up into
futher subdirectories matching their library. As a result we can now
better separate the python bindings, so that things that belongs to the
simulation are separeted from things that belongs to the ai.
2018-10-31 21:38:35 +01:00
Erik Ogenvik
e0b45800ef Fix broken tests. 2018-10-29 21:11:23 +01:00
Erik Ogenvik
c84f5fe926 Don't implicitly convert from Ref to ptr.
Since it's too easy to introduce subtle bugs.
2018-08-05 20:47:09 +02:00
Erik Ogenvik
a12b1a00a3 Delete when refs go to zero.
This changes how entities are dereferenced to work more like you would
expect.
2018-08-05 14:36:21 +02:00
Erik Ogenvik
04fe84821e Use proper singletons everywhere.
I.e. ones where the lifespan is fully controlled.
The only exception is Options, since it's accessed during static
initialization.
2018-08-04 18:01:20 +02:00
Erik Ogenvik
3b19555fd7 Don't use hyphens in property names. 2018-07-30 13:35:51 +02:00
Erik Ogenvik
33dfbb3425 Added tests. 2018-07-24 21:18:50 +02:00
Erik Ogenvik
80d347993d Rename EntityRef to WeakEntityRef.
To mark that it's a weak ref.
2018-07-22 23:51:33 +02:00
Erik Ogenvik
008490331b Made planted_on behaviour more sane. 2018-05-23 22:54:40 +02:00
Erik Ogenvik
56ac4c47be Fixed issues with planted_on.
The property "planted_on_desired" can be used to tell an entity that it
should try to plant itself on a specific entity before it performs the
general planting tests.
This can be used to for example force planted entities to share a space
(such as multiple rocks being clustered when planted on the ground).
2018-05-20 23:26:08 +02:00
Erik Ogenvik
664988645e Make all properties define type and optional name. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
cecee29236 Fixed issue with bbox scaling.
We can't use setLocalScaling since it doesn't seem to work well with
some shapes (such as mesh). We should use uniform scaling anyway.
2018-04-27 23:12:15 +02:00
Erik Ogenvik
c23b322ead Use "add" and "remove" for flags.
Since it's more descriptive.
2018-04-25 20:15:28 +02:00
Erik Ogenvik
dec9e5a36e Cleaned up memory leaks.
Which prevented the physical domain integration tests from running on
build servers with constrained memory.
2018-04-19 10:19:35 +02:00
Erik Ogenvik
d119d2f617 Move planted entities along. 2018-03-25 21:53:12 +02:00
Erik Ogenvik
f09675cec6 Use "planted" for floating entities.
Entities that are "planted" on bodies of water are floating.
This does away with the "floating" mode.

To mark that entities should by default be floating when placed in
water the boolean property "floats" has been added.
2018-03-24 17:06:02 +01:00
Erik Ogenvik
070b0a6c85 Check for where to plant entities.
If an entity is in mode "planted" we should check for any existing
planted entities below it, to see if we should add it on top of them, or
on top of the terrain.
2018-03-23 23:07:09 +01:00
Erik Ogenvik
166a5aaba3 Initial work on planting entities. 2018-03-23 19:22:35 +01:00
Erik Ogenvik
72e7a5e0c2 Move resting entities along.
I.e. when an entity is moved, and there are other entities resting on
top of it, move them along too.
2018-03-09 14:37:11 +01:00
Erik Ogenvik
63d36617ed Fixed issues with terrain mods and moving entities. 2018-03-05 22:14:58 +01:00
Erik Ogenvik
d0585e9eb8 Enabled oceans and lakes.
Through the "water_body" property. An entity which has this is a water
body. If there's a bbox the entity is a lake (bounded), otherwise it's
an ocean (infinite bounds).
2018-02-28 09:34:05 +01:00
Erik Ogenvik
7f1c956b77 Fixed tests with friction. 2018-02-15 12:39:34 +01:00
Erik Ogenvik
0bc9450cff Standarize on double precision. 2018-02-12 09:46:30 +01:00
Erik Ogenvik
fe36774f5b Use "type" instead of "shape" for geometry.
Since we now support "asset".
2018-02-06 13:45:11 +01:00
Erik Ogenvik
99640d26aa Use a left hand coord system. 2018-02-06 13:45:10 +01:00
Erik Ogenvik
0acdd29674 Properly take offset into account when placing.
Fixes an issue with unsynced bullet representations when an entity was
moved.
2018-01-11 17:07:05 +01:00
Erik Ogenvik
191d8ef7ea Added test for bullet terrain sync with Mercator. 2017-09-01 13:19:27 +02:00
Erik Ogenvik
d788f1c7d4 Fixed tests. 2017-06-20 22:28:51 +02:00
Erik Ogenvik
737005b624 Added step-factor to control stepping.
It's a float property which determines how high the entity can step,
relative to its height.
2017-03-24 17:19:10 +01:00
Erik Ogenvik
77d6607880 Relax test for 32 bit archs. 2017-03-20 00:13:12 +01:00
Erik Ogenvik
e905de7729 Disable checking for exact location for now.
Since this differs between versions of Bullet.
Either we lock down the Bullet version, or we live with it being a bit
different.
2017-03-19 22:55:30 +01:00
Erik Ogenvik
df77523d16 Properly handle mesh geometry. 2017-03-19 14:36:35 +01:00
Erik Ogenvik
561f5cd07a Moved benchmarks into separate test.
Benchmarks are run by "make benchmark".
2017-02-18 23:04:47 +01:00
Erik Ogenvik
cb5457756e Added visibility performance test. 2017-02-15 21:48:43 +01:00
Erik Ogenvik
13c563fcc1 Added visibility test. 2017-02-14 21:41:01 +01:00
Erik Ogenvik
8f1373d18c Apply z-offset correctly. 2017-02-14 17:57:40 +01:00
Erik Ogenvik
69f99f3302 Improve performance for static entities.
We do this by deactivating automatic aabb updates for static entities.
And also by using the COLLISION_MASK_STATIC mask for static entities.
2017-01-29 23:07:51 +01:00
Erik Ogenvik
a0097a82e8 Added integration test for Physical Domain. 2017-01-29 17:13:01 +01:00