Ticket #4276: 1910_splash_strengths.diff

File 1910_splash_strengths.diff, 1.9 KB (added by fatherbushido, 8 years ago)
  • binaries/data/mods/public/simulation/components/Attack.js

    Attack.prototype.PerformAttack = functio  
    547547        {
    548548            data.friendlyFire = this.template.Ranged.Splash.FriendlyFire != "false";
    549549            data.radius = +this.template.Ranged.Splash.Range;
    550550            data.shape = this.template.Ranged.Splash.Shape;
    551551            data.isSplash = true;
     552            data.splashStrengths = this.GetAttackStrengths(type+".Splash");
    552553        }
    553554        cmpTimer.SetTimeout(SYSTEM_ENTITY, IID_Damage, "MissileHit", timeToTarget * 1000, data);
    554555    }
    555556    else if (type == "Capture")
    556557    {
  • binaries/data/mods/public/simulation/components/Damage.js

    Damage.prototype.MissileHit = function(d  
    103103        this.CauseSplashDamage({
    104104            "attacker": data.attacker,
    105105            "origin": Vector2D.from3D(data.position),
    106106            "radius": data.radius,
    107107            "shape": data.shape,
    108             "strengths": data.strengths,
     108            "strengths": data.splashStrengths,
    109109            "direction": data.direction,
    110110            "playersToDamage": playersToDamage,
    111111            "type": data.type,
    112112            "attackerOwner": data.attackerOwner
    113113        });
    Damage.prototype.MissileHit = function(d  
    128128        return;
    129129
    130130    // If we didn't hit the main target look for nearby units
    131131    let cmpPlayer = QueryPlayerIDInterface(data.attackerOwner);
    132132    let ents = this.EntitiesNearPoint(Vector2D.from3D(data.position), targetPosition.horizDistanceTo(data.position) * 2, cmpPlayer.GetEnemies());
    133    
    134133    for (let ent of ents)
    135134        if (!this.TestCollision(ent, data.position, lateness))
    136135        {
    137136            this.CauseDamage({
    138137                "strengths": data.strengths,