aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ephysics/src/lib
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-12-05 19:27:53 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-12-05 19:27:53 +0000
commitf9293909d9565071a08f3b52f4ed81789d49dd76 (patch)
tree3f0c9ada678fe5fadc795eb9efdf7878e7ab2c8a /legacy/ephysics/src/lib
parent1a2daa057d5872d3c587791fe2f7c6bb86bbc202 (diff)
downloadefl-f9293909d9565071a08f3b52f4ed81789d49dd76.tar.gz
efl-f9293909d9565071a08f3b52f4ed81789d49dd76.tar.xz
efl-f9293909d9565071a08f3b52f4ed81789d49dd76.zip
ephysics: add event WORLD_UPDATE
SVN revision: 80274
Diffstat (limited to 'legacy/ephysics/src/lib')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h1
-rw-r--r--legacy/ephysics/src/lib/ephysics_world.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 564713498..072f40974 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -893,6 +893,7 @@ typedef enum _EPhysics_Callback_World_Type
EPHYSICS_CALLBACK_WORLD_DEL, /**< World being deleted (called before free) */
EPHYSICS_CALLBACK_WORLD_STOPPED, /**< no objects are moving any more */
EPHYSICS_CALLBACK_WORLD_CAMERA_MOVED, /**< camera position changed */
+ EPHYSICS_CALLBACK_WORLD_UPDATE, /**< world being updated */
EPHYSICS_CALLBACK_WORLD_LAST, /**< kept as sentinel, not really an event */
} EPhysics_Callback_World_Type;
diff --git a/legacy/ephysics/src/lib/ephysics_world.cpp b/legacy/ephysics/src/lib/ephysics_world.cpp
index 6c9ca35b7..198e47cf7 100644
--- a/legacy/ephysics/src/lib/ephysics_world.cpp
+++ b/legacy/ephysics/src/lib/ephysics_world.cpp
@@ -266,6 +266,9 @@ _ephysics_world_tick(btDynamicsWorld *dynamics_world)
NULL);
body_del:
+ if (world_active)
+ _ephysics_world_event_callback_call(world, EPHYSICS_CALLBACK_WORLD_UPDATE,
+ NULL);
world->pending_ticks--;
if (!world->pending_ticks)
{