Don't collide with powerups

This commit is contained in:
Mikko Ahlroth 2014-10-19 02:37:41 +03:00
parent 16bd4daac7
commit 6e6c64caed

View file

@ -135,9 +135,11 @@ function begin_contact(a, b, coll)
if aObj:isinstance(Plane) and bObj:isinstance(ChaingunPowerUp) then
bObj.deleteLater = true
aObj:setPowerUpMode(ChaingunMode())
coll:setEnabled(false)
elseif bObj:isinstance(Plane) and aObj:isinstance(ChaingunPowerUp) then
aObj.deleteLater = true
bObj:setPowerUpMode(ChaingunMode())
coll:setEnabled(false)
else
if aObj:isinstance(Plane) and (bObj:getOwner() == nil or bObj:getOwner().id ~= aObj.id) then
aObj:receiveDamage(1000);