Tweaked collision to make missiles not collide with one another.

This commit is contained in:
Scott Erickson 2014-02-08 12:27:56 -08:00
parent ab2bae6bc2
commit 74ddb1135a

View file

@ -32,6 +32,9 @@ module.exports.CollisionCategory = class CollisionCategory
# "ground_and_air_<team>" units don't hit ground or air units on their team (so missiles don't hit same team)
sameTeam = @superteamIndex and cat.superteamIndex is @superteamIndex
return false if sameTeam and @ground and @air
# actually, "ground_and_air<team>" units don't hit any ground_and_air units (temp missile collision fix)
return false if @ground and @air and cat.ground and cat.air
# "ground" collides with "ground"
return true if cat.ground and @ground