瀏覽代碼

Merge pull request #1012 from eightyeight/singleshot-fix

Fix APlayer::singleShot
Daniel Buckmaster 10 年之前
父節點
當前提交
2dd23e459a
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Templates/Full/game/scripts/server/aiPlayer.cs

+ 4 - 1
Templates/Full/game/scripts/server/aiPlayer.cs

@@ -212,7 +212,10 @@ function AIPlayer::singleShot(%this)
    // The shooting delay is used to pulse the trigger
    %this.setImageTrigger(0, true);
    %this.setImageTrigger(0, false);
-   %this.trigger = %this.schedule(%this.shootingDelay, singleShot);
+   %delay = %this.getDataBlock().shootingDelay;
+   if (%delay $= "")
+      %delay = 1000;
+   %this.trigger = %this.schedule(%delay, singleShot);
 }
 
 //-----------------------------------------------------------------------------