Don't collide with powerups
This commit is contained in:
parent
16bd4daac7
commit
6e6c64caed
1 changed files with 2 additions and 0 deletions
|
@ -135,9 +135,11 @@ function begin_contact(a, b, coll)
|
||||||
if aObj:isinstance(Plane) and bObj:isinstance(ChaingunPowerUp) then
|
if aObj:isinstance(Plane) and bObj:isinstance(ChaingunPowerUp) then
|
||||||
bObj.deleteLater = true
|
bObj.deleteLater = true
|
||||||
aObj:setPowerUpMode(ChaingunMode())
|
aObj:setPowerUpMode(ChaingunMode())
|
||||||
|
coll:setEnabled(false)
|
||||||
elseif bObj:isinstance(Plane) and aObj:isinstance(ChaingunPowerUp) then
|
elseif bObj:isinstance(Plane) and aObj:isinstance(ChaingunPowerUp) then
|
||||||
aObj.deleteLater = true
|
aObj.deleteLater = true
|
||||||
bObj:setPowerUpMode(ChaingunMode())
|
bObj:setPowerUpMode(ChaingunMode())
|
||||||
|
coll:setEnabled(false)
|
||||||
else
|
else
|
||||||
if aObj:isinstance(Plane) and (bObj:getOwner() == nil or bObj:getOwner().id ~= aObj.id) then
|
if aObj:isinstance(Plane) and (bObj:getOwner() == nil or bObj:getOwner().id ~= aObj.id) then
|
||||||
aObj:receiveDamage(1000);
|
aObj:receiveDamage(1000);
|
||||||
|
|
Loading…
Reference in a new issue