function bool GetNearestShop()
{
local KFGameType KFGT;
local int i,l;
local float Dist,BDist;
local ShopVolume Sp;
KFGT = KFGameType(Level.Game);
if( KFGT==None )
return false;
l = KFGT.ShopList.Length;
for( i=0; i<l; i++ )[COLOR="Lime"]// this part mainly... what does it mean?[/COLOR]
{
if( !KFGT.ShopList[i].bCurrentlyOpen || KFGT.ShopList[i].BotPoint==None )
continue;
Dist = VSize(KFGT.ShopList[i].Location-Pawn.Location);
if( Dist<BDist || Sp==None )
{
Sp = KFGT.ShopList[i];
BDist = Dist;
}
}
if( Sp==None )
return false;
ShoppingPath = Sp.BotPoint;
return true;
}