OpenClonk
SumPathLength Struct Reference

Public Member Functions

 SumPathLength (PathInfo *info)
 
bool operator() (int32_t iX, int32_t iY, C4Object *TransferTarget)
 

Detailed Description

Definition at line 2068 of file C4GameScript.cpp.

Constructor & Destructor Documentation

◆ SumPathLength()

SumPathLength::SumPathLength ( PathInfo info)
inlineexplicit

Definition at line 2070 of file C4GameScript.cpp.

2070 : pPathInfo(info) {}

Member Function Documentation

◆ operator()()

bool SumPathLength::operator() ( int32_t  iX,
int32_t  iY,
C4Object TransferTarget 
)
inline

Definition at line 2071 of file C4GameScript.cpp.

References Distance().

2072  {
2073  pPathInfo->ilen += Distance(pPathInfo->ilx, pPathInfo->ily, iX, iY);
2074  pPathInfo->ilx = iX;
2075  pPathInfo->ily = iY;
2076  return true;
2077  }
int32_t Distance(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2)
Definition: Standard.cpp:25
Here is the call graph for this function:

The documentation for this struct was generated from the following file: