Ticket #4276: 1910_splash_strengths.diff
File 1910_splash_strengths.diff, 1.9 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/simulation/components/Attack.js
Attack.prototype.PerformAttack = functio 547 547 { 548 548 data.friendlyFire = this.template.Ranged.Splash.FriendlyFire != "false"; 549 549 data.radius = +this.template.Ranged.Splash.Range; 550 550 data.shape = this.template.Ranged.Splash.Shape; 551 551 data.isSplash = true; 552 data.splashStrengths = this.GetAttackStrengths(type+".Splash"); 552 553 } 553 554 cmpTimer.SetTimeout(SYSTEM_ENTITY, IID_Damage, "MissileHit", timeToTarget * 1000, data); 554 555 } 555 556 else if (type == "Capture") 556 557 { -
binaries/data/mods/public/simulation/components/Damage.js
Damage.prototype.MissileHit = function(d 103 103 this.CauseSplashDamage({ 104 104 "attacker": data.attacker, 105 105 "origin": Vector2D.from3D(data.position), 106 106 "radius": data.radius, 107 107 "shape": data.shape, 108 "strengths": data.s trengths,108 "strengths": data.splashStrengths, 109 109 "direction": data.direction, 110 110 "playersToDamage": playersToDamage, 111 111 "type": data.type, 112 112 "attackerOwner": data.attackerOwner 113 113 }); … … Damage.prototype.MissileHit = function(d 128 128 return; 129 129 130 130 // If we didn't hit the main target look for nearby units 131 131 let cmpPlayer = QueryPlayerIDInterface(data.attackerOwner); 132 132 let ents = this.EntitiesNearPoint(Vector2D.from3D(data.position), targetPosition.horizDistanceTo(data.position) * 2, cmpPlayer.GetEnemies()); 133 134 133 for (let ent of ents) 135 134 if (!this.TestCollision(ent, data.position, lateness)) 136 135 { 137 136 this.CauseDamage({ 138 137 "strengths": data.strengths,