Ticket #3606: Health.js.patch
File Health.js.patch, 573 bytes (added by , 8 years ago) |
---|
-
Health.js
114 114 115 115 Health.prototype.ExecuteRegeneration = function() 116 116 { 117 var regen = this.GetRegenRate(); 118 if (regen > 0) 119 this.Increase(regen); 120 else 121 this.Reduce(-regen); 117 let regen = this.GetRegenRate(); 118 let cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI); 119 if (cmpUnitAI && cmpUnitAI.IsIdle()) 120 { 121 if (regen > 0) 122 this.Increase(regen); 123 else 124 this.Reduce(-regen); 125 } 122 126 }; 123 127 124 128 /*