Kratka demonstracija :
Code:
For i = 1 To MaxChars
If char(i).Health > 0 Then
For x = Int(char(i).IntX / TLX) - 1 To Int(char(i).IntX / TLX) + 1
For y = Int(char(i).IntY / TLY) - 1 To Int(char(i).IntY / TLY) + 1
For j = 1 To BSP_Char(x, y, 0)
c2 = BSP_Char(x, y, j)
If i <> c2 And c2 <> PC Then
dist = GetDistInt(char(i).IntX, char(i).IntY, char(c2).IntX, char(c2).IntY)
rdist = char(i).Size + char(c2).Size
If dist < rdist Then
ang = GetAng(CLng(char(i).IntX), CLng(char(i).IntY), CLng(char(c2).IntX), CLng(char(c2).IntY))
char(c2).x = char(c2).x + Cos(ang) * (rdist - dist) * 100
char(c2).y = char(c2).y + Sin(ang) * (rdist - dist) * 100
End If
End If
Next
Next
Next
End If
Next
Ko će biti pametan da kaže šta ovaj kod radi?