CheckMeleeCapsule return args
<div class="IPBDescription">inconsistent use or ....</div>i'm not getting it...
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Find all "CheckMeleeCapsule"
Weapons\Alien\Gore.lua:62: local didHit, target, direction = CheckMeleeCapsule(self, player, 0, kAttackRange)
NS2Utility.lua:1656: function CheckMeleeCapsule(weapon, player, damage, range, optionalCoords, traceRealAttack)
NS2Utility.lua:1721: local didHit, target, endPoint, direction, surface = CheckMeleeCapsule(weapon, player, damage, range, optionalCoords, true)
Weapons\Alien\SwipeBlink.lua:89: local didHit, trace = CheckMeleeCapsule(self, player, SwipeBlink.kDamage, SwipeBlink.kRange)
Weapons\Marine\Welder.lua:228: local didHit, target, endPoint, direction, surface = CheckMeleeCapsule(self, player, 0, self:GetRange(), nil, true)<!--c2--></div><!--ec2-->
Welder.lua matches what is in NS2Utility. Gore & SwipeBlink ??
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Find all "CheckMeleeCapsule"
Weapons\Alien\Gore.lua:62: local didHit, target, direction = CheckMeleeCapsule(self, player, 0, kAttackRange)
NS2Utility.lua:1656: function CheckMeleeCapsule(weapon, player, damage, range, optionalCoords, traceRealAttack)
NS2Utility.lua:1721: local didHit, target, endPoint, direction, surface = CheckMeleeCapsule(weapon, player, damage, range, optionalCoords, true)
Weapons\Alien\SwipeBlink.lua:89: local didHit, trace = CheckMeleeCapsule(self, player, SwipeBlink.kDamage, SwipeBlink.kRange)
Weapons\Marine\Welder.lua:228: local didHit, target, endPoint, direction, surface = CheckMeleeCapsule(self, player, 0, self:GetRange(), nil, true)<!--c2--></div><!--ec2-->
Welder.lua matches what is in NS2Utility. Gore & SwipeBlink ??
Comments
true doesn't need to be passed.
Although it does look as if Gore is specifying a damage of 0, I guess that is overridden elsewhere in the code because of the different damage to structures and players.
I can't see any problem :P
in terms of logic, looks like only swipeblink is impacted by this inconsistency - wouldnt set an effect parameter for swipes on entities that take struct damage.
gore doesnt used the mismapped return arg 'direction'.
would be nice if there was a way to audit that & keep the source self consistent though. minor bugs could easily go unnoticed.