SDLPP: don't colide with self
This commit is contained in:
parent
c453c2fe9a
commit
fd96a1c2cc
@ -119,6 +119,9 @@ Scene::getCollisions( RenderObject &r ) {
|
||||
return {};
|
||||
std::vector< std::pair< uint64_t, std::shared_ptr< RenderObject > > > ret{};
|
||||
for ( const auto &x : collision_objects ) {
|
||||
if(x.get() == &r) {
|
||||
continue;
|
||||
}
|
||||
for ( auto id : r.colidesWith( *x ) ) {
|
||||
ret.emplace_back( id, x );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user