Ticket #3257: capturing_alert.patch
File capturing_alert.patch, 1.5 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/simulation/components/Armour.js
49 49 */ 50 50 Armour.prototype.TakeDamage = function(hack, pierce, crush, source) 51 51 { 52 // Alert target owner of attack53 var cmpAttackDetection = QueryOwnerInterface(this.entity, IID_AttackDetection);54 if (cmpAttackDetection)55 {56 var now = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer).GetTime();57 if (now > this.nextAlertTime)58 {59 this.nextAlertTime = now + cmpAttackDetection.GetSuppressionTime();60 cmpAttackDetection.AttackAlert(this.entity, source);61 }62 }63 64 52 if (this.invulnerable) 65 53 return { "killed": false, "change": 0 }; 66 54 -
binaries/data/mods/public/simulation/components/AttackDetection.js
47 47 var cmpOwnership = Engine.QueryInterface(msg.target, IID_Ownership); 48 48 if (cmpOwnership.GetOwner() == cmpPlayer.GetPlayerID()) 49 49 Engine.PostMessage(msg.target, MT_MinimapPing); 50 51 // Alert target owner of attack 52 this.AttackAlert(msg.target, msg.attacker); 50 53 }; 51 54 52 55 //// External interface ////