ratalaika / angel-engine

Automatically exported from code.google.com/p/angel-engine
0 stars 0 forks source link

World::bufferContactPoint sending CollisionWith is wrong i think #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create some physics objects ,  
2. add relevant theSwitchboard.SubscribeTo(this, "CollisionWith" + GetName()
3. make them collide

What is the expected output? What do you see instead?

I should be getting CollisionWith Messages broadcast, but I'm not

I'm using  Angel-v2.2

In void 

World::bufferContactPoint(const b2ContactPoint* point)
{
...

    if (theSwitchboard.GetSubscribersTo("CollisionWith" + pa1->GetName()).size() > 0)
    {
        if (_currentTouches[pa1].find(pa2) != _currentTouches[pa1].end())
        {

            TypedMessage<b2ContactPoint*>* coll = new TypedMessage<b2ContactPoint*>("CollisionWith" + pa1->GetName(), cp, pa2);
            theSwitchboard.Broadcast(coll);
        }
        _currentTouches[pa1].insert(pa2);
    }

should have
if (_currentTouches[pa1].find(pa2) == _currentTouches[pa1].end())

and similarly for the reciprecal check after.

Original issue reported on code.google.com by kingsley...@gmail.com on 5 Nov 2011 at 4:18

GoogleCodeExporter commented 9 years ago
Does this happen with trunk? 

Original comment by lieseg...@gmail.com on 24 Feb 2012 at 12:43

GoogleCodeExporter commented 9 years ago
not entirely sure how I'm meant to tell if it was trunk.

I downloaded it from the downloads link at the top of the page 
http://code.google.com/p/angel-engine/downloads/detail?name=Angel-v2.2.zip&can=2
&q=
- so most probably yes

Original comment by kingsley...@gmail.com on 24 Feb 2012 at 11:20

GoogleCodeExporter commented 9 years ago
If you can give it a try with a download from the Subversion repository (you 
can use the instructions here: 
https://code.google.com/p/angel-engine/source/checkout ), that would be 
helpful, as the 2.2 build is pretty old at this point. 

The 3.0 release is imminent, so any older bugs won't be addressed. 

If the bug is still occurring from the trunk build, please add another comment 
here! 

Original comment by lieseg...@gmail.com on 24 Feb 2012 at 2:36

GoogleCodeExporter commented 9 years ago
Sorry to keep commenting here, but I'm not sure I understand your proposed fix, 
either. Could you attach a patch file? 

Original comment by lieseg...@gmail.com on 24 Feb 2012 at 3:24

GoogleCodeExporter commented 9 years ago
Related to old build; no follow-up response. Closing for now. 

Original comment by lieseg...@gmail.com on 20 Mar 2012 at 10:39