Open ThePredatorBG opened 2 years ago
Uh. Never saw this being abused before. Probably engine bug, no?
Uh. Never saw this being abused before. Probably engine bug, no?
There should be a way to tackle it via .ini modifications because some projectiles, e.g. tomahawk missile collide with allied structures normally. It should be a matter of finding what's responsible for it and apply the changes to all projectiles unless that change comes with unintended behaviors.
Another issue here is that the Crusader shoots through the building in the first place. Ideally tanks would only start shooting when they have clear sight. That may be Engine issue.
Seems it is not (solely) related to Projectile. I copied everything from Object TomahawkMissile
into Object GenericTankShell
and it still flies through structure.
There is a ProjectileCollidesWith
parameter with the following inputs:
;-------------------------------------------- ProjectileCollidesWith parameters [Weapon Collide Masks]: ;--------------------------------------------
ALLIES ENEMIES STRUCTURES SHRUBBERY PROJECTILES WALLS SMALL_MISSILES BALLISTIC_MISSILES CONTROLLED_STRUCTURES
In Weapon CrusaderTankGun
I changed
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
to
RadiusDamageAffects = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
like Tomahawk, but it did not change it either.
That does not determine collision, only damage. The ProjectileCollidesWith
parameter determines what overall types of objects a projectile may collide with.
In Weapon CrusaderTankGun
I changed
ProjectileCollidesWith = STRUCTURES WALLS
to
ProjectileCollidesWith = ALLIES ENEMIES STRUCTURES WALLS
And now projectile collides with friendly structure.
https://user-images.githubusercontent.com/4720891/183123044-89033d25-2363-409e-a20e-c365f04d90d4.mp4
https://user-images.githubusercontent.com/4720891/183123092-f9fcfc97-e5af-4d53-a169-69ac77a2d5b3.mp4
Fixing this with collision could be risky. The real fix is to not have them shoot until clear sight.
Same how Tanks can fire over Supply Docks, this is used in matches to harass workers with Nuke Battle Masters for example.
Most projectiles such as Crusader tank weapon collide with neutral and enemy structures but not allied ones. This can be abused by players by force-firing through their own buildings and hitting enemies on the other side of the building. However, Tomahawk missile, for example, collides with any structure owned by anyone.