com.springrts.ai.command
Class InitPathAICommand

java.lang.Object
  extended by Structure
      extended by com.springrts.ai.AICommand
          extended by com.springrts.ai.command.InitPathAICommand

public final class InitPathAICommand
extends AICommand

The following functions allow the AI to use the built-in path-finder. - call InitPath and you get a pathid back - use this to call GetNextWaypoint to get subsequent waypoints, the waypoints are centered on 8*8 squares - note that the pathfinder calculates the waypoints as needed, so do not retrieve them until they are needed - the waypoint's x and z coordinates are returned in x and z, while y is used for error codes: y >= 0: worked ok y = -2: still thinking, call again y = -1: end of path reached or path is invalid


Nested Class Summary
 
Nested classes/interfaces inherited from class com.springrts.ai.AICommand
AICommand.Option
 
Field Summary
 AIFloat3 end
           
 int pathType
           
 int ret_pathId
           
 AIFloat3 start
           
static int TOPIC
           
 
Constructor Summary
InitPathAICommand()
           
InitPathAICommand(AIFloat3 start, AIFloat3 end, int pathType, int ret_pathId)
           
InitPathAICommand(Pointer memory)
           
 
Method Summary
 int getTopic()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOPIC

public static final int TOPIC
See Also:
Constant Field Values

start

public AIFloat3 start

end

public AIFloat3 end

pathType

public int pathType

ret_pathId

public int ret_pathId
Constructor Detail

InitPathAICommand

public InitPathAICommand()

InitPathAICommand

public InitPathAICommand(Pointer memory)

InitPathAICommand

public InitPathAICommand(AIFloat3 start,
                         AIFloat3 end,
                         int pathType,
                         int ret_pathId)
Method Detail

getTopic

public int getTopic()
Specified by:
getTopic in class AICommand