summaryrefslogtreecommitdiffstats
path: root/servers/physics_2d/body_2d_sw.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-10-03 08:58:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-10-03 08:58:41 -0300
commitaf4a97bef9bfb06e2737ad709dde157688a94daf (patch)
treed3c6471da30a8d6c20d10858e78907edd9c886e8 /servers/physics_2d/body_2d_sw.h
parent1b3a10891ebdc6e76a81c8915ba08065311e17d3 (diff)
downloadredot-engine-af4a97bef9bfb06e2737ad709dde157688a94daf.tar.gz
missing fils from yesterday comit.
must have made some mistake with git, not sure why they were not sent..
Diffstat (limited to 'servers/physics_2d/body_2d_sw.h')
-rw-r--r--servers/physics_2d/body_2d_sw.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index ffe47e0267..cf4d5c92f2 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -134,7 +134,8 @@ public:
_FORCE_INLINE_ void add_area(Area2DSW *p_area) { areas.insert(AreaCMP(p_area)); }
_FORCE_INLINE_ void remove_area(Area2DSW *p_area) { areas.erase(AreaCMP(p_area)); }
- _FORCE_INLINE_ void set_max_contacts_reported(int p_size) { contacts.resize(p_size); contact_count=0; }
+ _FORCE_INLINE_ void set_max_contacts_reported(int p_size) { contacts.resize(p_size); contact_count=0; if (mode==Physics2DServer::BODY_MODE_KINEMATIC && p_size) set_active(true);}
+
_FORCE_INLINE_ int get_max_contacts_reported() const { return contacts.size(); }
_FORCE_INLINE_ bool can_report_contacts() const { return !contacts.empty(); }