Explorar o código

Look for datablock property, and provide a default.

Daniel Buckmaster %!s(int64=10) %!d(string=hai) anos
pai
achega
ac58fa96b0
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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);
 }
 
 //-----------------------------------------------------------------------------