浏览代码

*** empty log message ***

Dave Schuyler 22 年之前
父节点
当前提交
ce403f4066
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      direct/src/level/DistributedLevelAI.py

+ 1 - 3
direct/src/level/DistributedLevelAI.py

@@ -89,9 +89,7 @@ class DistributedLevelAI(DistributedObjectAI.DistributedObjectAI,
         self.notify.debug("setOuch %s" % penalty)
         self.notify.debug("setOuch %s" % penalty)
         # make sure penalty is > 0
         # make sure penalty is > 0
         if av and (penalty > 0):
         if av and (penalty > 0):
-            curHp = av.getHp()
-            newHp = max(0, curHp-penalty)
-            av.b_setHp(newHp)
+            av.takeDamage(penalty)
         
         
     if __debug__:
     if __debug__:
         # level editors should call this func to tweak attributes of level
         # level editors should call this func to tweak attributes of level