home *** CD-ROM | disk | FTP | other *** search
Unknown | 1999-11-02 | 20.4 KB |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 6d c6 02 2f 2f 3d 3d 3d |........|m..//===|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0a 2f 2f 20 4d |========|==..// M|
|00000060| 6f 76 65 6d 65 6e 74 50 | 61 74 74 65 72 6e 2e 75 |ovementP|attern.u|
|00000070| 63 0d 0a 2f 2f 20 24 41 | 75 74 68 6f 72 3a 20 4d |c..// $A|uthor: M|
|00000080| 66 6f 78 20 24 0d 0a 2f | 2f 20 24 44 61 74 65 3a |fox $../|/ $Date:|
|00000090| 20 31 30 2f 32 36 2f 39 | 39 20 35 3a 33 38 70 20 | 10/26/9|9 5:38p |
|000000a0| 24 0d 0a 2f 2f 20 24 52 | 65 76 69 73 69 6f 6e 3a |$..// $R|evision:|
|000000b0| 20 31 20 24 0d 0a 2f 2f | 3d 3d 3d 3d 3d 3d 3d 3d | 1 $..//|========|
|000000c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000100| 3d 3d 3d 3d 3d 0d 0a 0d | 0a 63 6c 61 73 73 20 4d |=====...|.class M|
|00000110| 6f 76 65 6d 65 6e 74 50 | 61 74 74 65 72 6e 20 65 |ovementP|attern e|
|00000120| 78 70 61 6e 64 73 20 41 | 69 43 6f 6d 70 6f 6e 65 |xpands A|iCompone|
|00000130| 6e 74 3b 0d 0a 0d 0a 65 | 6e 75 6d 20 45 52 65 6c |nt;....e|num ERel|
|00000140| 61 74 69 6f 6e 61 6c 52 | 65 71 75 69 72 65 6d 65 |ationalR|equireme|
|00000150| 6e 74 0d 0a 7b 0d 0a 09 | 52 52 5f 4e 6f 6e 65 2c |nt..{...|RR_None,|
|00000160| 0d 0a 09 52 52 5f 45 71 | 75 61 6c 2c 0d 0a 09 52 |...RR_Eq|ual,...R|
|00000170| 52 5f 4c 65 73 73 2c 0d | 0a 09 52 52 5f 4c 65 73 |R_Less,.|..RR_Les|
|00000180| 73 4f 72 45 71 75 61 6c | 2c 0d 0a 09 52 52 5f 47 |sOrEqual|,...RR_G|
|00000190| 72 65 61 74 65 72 4f 72 | 45 71 75 61 6c 2c 0d 0a |reaterOr|Equal,..|
|000001a0| 09 52 52 5f 47 72 65 61 | 74 65 72 0d 0a 7d 3b 0d |.RR_Grea|ter..};.|
|000001b0| 0a 0d 0a 73 74 72 75 63 | 74 20 54 45 6c 65 6d 65 |...struc|t TEleme|
|000001c0| 6e 74 46 6f 63 75 73 50 | 61 72 61 6d 73 0d 0a 7b |ntFocusP|arams..{|
|000001d0| 0d 0a 09 76 61 72 20 28 | 29 20 62 6f 6f 6c 09 09 |...var (|) bool..|
|000001e0| 09 09 09 09 09 46 50 5f | 62 53 65 6c 65 63 74 46 |.....FP_|bSelectF|
|000001f0| 6f 63 75 73 3b 0d 0a 09 | 76 61 72 20 28 29 20 63 |ocus;...|var () c|
|00000200| 6c 61 73 73 3c 46 6f 63 | 75 73 53 65 6c 65 63 74 |lass<Foc|usSelect|
|00000210| 6f 72 49 6e 74 65 72 66 | 3e 09 46 50 5f 41 6c 74 |orInterf|>.FP_Alt|
|00000220| 65 72 6e 61 74 65 53 65 | 6c 65 63 74 6f 72 46 63 |ernateSe|lectorFc|
|00000230| 73 3b 0d 0a 09 2f 2f 72 | 6c 6f 66 75 74 75 72 65 |s;...//r|lofuture|
|00000240| 20 76 61 72 20 28 29 20 | 56 65 63 74 6f 72 09 09 | var () |Vector..|
|00000250| 09 46 50 5f 46 6f 63 75 | 73 4c 6f 63 61 74 69 6f |.FP_Focu|sLocatio|
|00000260| 6e 3b 0d 0a 09 2f 2f 72 | 6c 6f 66 75 74 75 72 65 |n;...//r|lofuture|
|00000270| 20 76 61 72 20 28 29 20 | 4e 61 6d 65 09 09 09 09 | var () |Name....|
|00000280| 46 50 5f 46 6f 63 75 73 | 41 63 74 6f 72 54 61 67 |FP_Focus|ActorTag|
|00000290| 3b 0d 0a 09 2f 2f 72 6c | 6f 66 75 74 75 72 65 20 |;...//rl|ofuture |
|000002a0| 76 61 72 20 28 29 20 4e | 61 6d 65 09 09 09 09 46 |var () N|ame....F|
|000002b0| 50 5f 46 6f 63 75 73 41 | 63 74 6f 72 4e 61 6d 65 |P_FocusA|ctorName|
|000002c0| 3b 0d 0a 7d 3b 0d 0a 0d | 0a 73 74 72 75 63 74 20 |;..};...|.struct |
|000002d0| 54 45 6c 65 6d 65 6e 74 | 57 61 79 70 6f 69 6e 74 |TElement|Waypoint|
|000002e0| 50 61 72 61 6d 73 0d 0a | 7b 0d 0a 09 76 61 72 20 |Params..|{...var |
|000002f0| 28 29 20 62 6f 6f 6c 09 | 09 09 09 09 09 09 09 57 |() bool.|.......W|
|00000300| 50 5f 62 53 65 6c 65 63 | 74 57 61 79 70 6f 69 6e |P_bSelec|tWaypoin|
|00000310| 74 3b 09 09 2f 2f 0d 0a | 09 76 61 72 20 28 29 20 |t;..//..|.var () |
|00000320| 62 6f 6f 6c 09 09 09 09 | 09 09 09 09 57 50 5f 62 |bool....|....WP_b|
|00000330| 41 70 70 6c 79 4f 66 66 | 73 65 74 44 69 72 65 63 |ApplyOff|setDirec|
|00000340| 74 69 6f 6e 3b 09 2f 2f | 69 66 20 74 72 75 65 20 |tion;.//|if true |
|00000350| 61 70 70 6c 79 20 74 68 | 65 20 70 61 74 74 65 72 |apply th|e patter|
|00000360| 6e 27 73 20 64 69 72 65 | 63 74 69 6f 6e 20 6f 74 |n's dire|ction ot|
|00000370| 68 65 72 77 69 73 65 20 | 75 73 65 20 74 68 65 20 |herwise |use the |
|00000380| 64 69 72 65 63 74 69 6f | 6e 20 6f 66 20 74 68 65 |directio|n of the|
|00000390| 20 73 65 6c 65 63 74 65 | 64 20 77 61 79 70 6f 69 | selecte|d waypoi|
|000003a0| 6e 74 0d 0a 09 76 61 72 | 20 28 29 20 56 65 63 74 |nt...var| () Vect|
|000003b0| 6f 72 09 09 09 09 09 09 | 09 57 50 5f 4f 66 66 73 |or......|.WP_Offs|
|000003c0| 65 74 44 69 72 65 63 74 | 69 6f 6e 3b 09 09 2f 2f |etDirect|ion;..//|
|000003d0| 74 68 65 20 64 69 72 65 | 63 74 69 6f 6e 20 69 6e |the dire|ction in|
|000003e0| 20 77 68 69 63 68 20 74 | 6f 20 6d 6f 76 65 20 69 | which t|o move i|
|000003f0| 66 20 62 41 70 70 6c 61 | 79 44 69 72 65 63 74 69 |f bAppla|yDirecti|
|00000400| 6f 6e 20 69 73 20 74 72 | 75 65 0d 0a 09 76 61 72 |on is tr|ue...var|
|00000410| 20 28 29 20 62 6f 6f 6c | 09 09 09 09 09 09 09 09 | () bool|........|
|00000420| 57 50 5f 62 41 70 70 6c | 79 4f 66 66 73 65 74 44 |WP_bAppl|yOffsetD|
|00000430| 69 73 74 61 6e 63 65 3b | 09 09 2f 2f 69 66 20 74 |istance;|..//if t|
|00000440| 72 75 65 20 61 70 70 6c | 79 20 74 68 65 20 70 61 |rue appl|y the pa|
|00000450| 74 74 65 72 6e 27 73 20 | 64 69 73 74 61 6e 63 65 |ttern's |distance|
|00000460| 20 6f 74 68 65 72 77 69 | 73 65 20 75 73 65 20 74 | otherwi|se use t|
|00000470| 68 65 20 64 69 73 74 61 | 6e 63 65 20 6f 66 20 74 |he dista|nce of t|
|00000480| 68 65 20 73 65 6c 65 63 | 74 65 64 20 77 61 79 70 |he selec|ted wayp|
|00000490| 6f 69 6e 74 0d 0a 09 76 | 61 72 20 28 29 20 66 6c |oint...v|ar () fl|
|000004a0| 6f 61 74 09 09 09 09 09 | 09 09 57 50 5f 4f 66 66 |oat.....|..WP_Off|
|000004b0| 73 65 74 44 69 73 74 61 | 6e 63 65 3b 09 09 2f 2f |setDista|nce;..//|
|000004c0| 68 6f 77 20 66 61 72 20 | 74 6f 20 67 6f 20 69 6e |how far |to go in|
|000004d0| 20 74 68 65 20 67 69 76 | 65 6e 20 64 69 72 65 63 | the giv|en direc|
|000004e0| 74 69 6f 6e 20 69 66 20 | 62 41 70 70 6c 79 4f 66 |tion if |bApplyOf|
|000004f0| 66 73 65 74 44 69 73 74 | 61 6e 63 65 20 69 73 20 |fsetDist|ance is |
|00000500| 74 72 75 65 0d 0a 09 76 | 61 72 20 28 29 20 45 52 |true...v|ar () ER|
|00000510| 65 6c 61 74 69 6f 6e 61 | 6c 52 65 71 75 69 72 65 |elationa|lRequire|
|00000520| 6d 65 6e 74 09 09 09 57 | 50 5f 52 65 71 54 72 61 |ment...W|P_ReqTra|
|00000530| 76 65 6c 44 69 73 74 61 | 6e 63 65 52 65 6c 3b 09 |velDista|nceRel;.|
|00000540| 0d 0a 09 76 61 72 20 28 | 29 20 66 6c 6f 61 74 20 |...var (|) float |
|00000550| 09 09 09 09 09 09 09 57 | 50 5f 52 65 71 54 72 61 |.......W|P_ReqTra|
|00000560| 76 65 6c 44 69 73 74 61 | 6e 63 65 3b 0d 0a 09 76 |velDista|nce;...v|
|00000570| 61 72 20 28 29 20 45 52 | 65 6c 61 74 69 6f 6e 61 |ar () ER|elationa|
|00000580| 6c 52 65 71 75 69 72 65 | 6d 65 6e 74 09 09 09 57 |lRequire|ment...W|
|00000590| 50 5f 52 65 71 47 6f 61 | 6c 44 69 73 74 61 6e 63 |P_ReqGoa|lDistanc|
|000005a0| 65 52 65 6c 3b 09 2f 2f | 74 68 65 20 72 65 6c 61 |eRel;.//|the rela|
|000005b0| 74 69 6f 6e 61 6c 20 72 | 65 71 75 69 72 65 6d 65 |tional r|equireme|
|000005c0| 6e 74 20 6f 66 20 74 68 | 65 20 64 69 73 74 61 6e |nt of th|e distan|
|000005d0| 63 65 20 74 6f 20 74 68 | 65 20 67 6f 61 6c 20 66 |ce to th|e goal f|
|000005e0| 72 6f 6d 20 74 68 65 20 | 72 65 73 75 6c 74 69 6e |rom the |resultin|
|000005f0| 67 20 77 61 79 70 6f 69 | 6e 74 0d 0a 09 76 61 72 |g waypoi|nt...var|
|00000600| 20 28 29 20 66 6c 6f 61 | 74 20 09 09 09 09 09 09 | () floa|t ......|
|00000610| 09 57 50 5f 52 65 71 47 | 6f 61 6c 44 69 73 74 61 |.WP_ReqG|oalDista|
|00000620| 6e 63 65 3b 09 2f 2f 74 | 68 65 20 64 69 73 74 61 |nce;.//t|he dista|
|00000630| 6e 63 65 20 74 6f 20 75 | 73 65 20 62 61 73 65 64 |nce to u|se based|
|00000640| 20 6f 6e 20 74 68 65 20 | 72 65 73 75 6c 74 61 6e | on the |resultan|
|00000650| 74 20 72 65 71 75 69 72 | 65 6d 65 6e 74 0d 0a 09 |t requir|ement...|
|00000660| 76 61 72 20 28 29 20 62 | 6f 6f 6c 09 09 09 09 09 |var () b|ool.....|
|00000670| 09 09 09 57 50 5f 62 52 | 65 71 75 69 72 65 52 65 |...WP_bR|equireRe|
|00000680| 61 63 68 61 62 6c 65 3b | 0d 0a 09 2f 2f 72 6c 6f |achable;|...//rlo|
|00000690| 66 75 74 75 72 65 20 76 | 61 72 20 28 29 20 63 6c |future v|ar () cl|
|000006a0| 61 73 73 3c 57 61 79 70 | 6f 69 6e 74 53 65 6c 65 |ass<Wayp|ointSele|
|000006b0| 63 74 6f 72 49 6e 74 65 | 72 66 3e 09 57 50 5f 41 |ctorInte|rf>.WP_A|
|000006c0| 6c 74 65 72 6e 61 74 65 | 53 65 6c 65 63 74 6f 72 |lternate|Selector|
|000006d0| 57 70 74 3b 0d 0a 09 2f | 2f 72 6c 6f 66 75 74 75 |Wpt;.../|/rlofutu|
|000006e0| 72 65 20 76 61 72 20 28 | 29 20 56 65 63 74 6f 72 |re var (|) Vector|
|000006f0| 09 09 09 09 09 09 09 57 | 50 5f 57 61 79 70 6f 69 |.......W|P_Waypoi|
|00000700| 6e 74 4c 6f 63 61 74 69 | 6f 6e 3b 0d 0a 09 2f 2f |ntLocati|on;...//|
|00000710| 72 6c 6f 66 75 74 75 72 | 65 20 76 61 72 20 28 29 |rlofutur|e var ()|
|00000720| 20 4e 61 6d 65 09 09 09 | 09 09 09 09 09 57 50 5f | Name...|.....WP_|
|00000730| 57 61 79 70 6f 69 6e 74 | 41 63 74 6f 72 54 61 67 |Waypoint|ActorTag|
|00000740| 3b 0d 0a 09 2f 2f 72 6c | 6f 66 75 74 75 72 65 20 |;...//rl|ofuture |
|00000750| 76 61 72 20 28 29 20 4e | 61 6d 65 09 09 09 09 09 |var () N|ame.....|
|00000760| 09 09 09 57 50 5f 57 61 | 79 70 6f 69 6e 74 41 63 |...WP_Wa|ypointAc|
|00000770| 74 6f 72 4e 61 6d 65 3b | 0d 0a 7d 3b 0d 0a 0d 0a |torName;|..};....|
|00000780| 73 74 72 75 63 74 20 54 | 4d 6f 76 65 6d 65 6e 74 |struct T|Movement|
|00000790| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 0d 0a |PatternE|lement..|
|000007a0| 7b 0d 0a 09 76 61 72 20 | 28 29 20 62 6f 6f 6c 09 |{...var |() bool.|
|000007b0| 09 09 09 09 09 4d 50 45 | 5f 62 45 6e 61 62 6c 65 |.....MPE|_bEnable|
|000007c0| 64 3b 09 09 09 09 09 2f | 2f 0d 0a 09 76 61 72 20 |d;...../|/...var |
|000007d0| 28 29 20 45 52 65 6c 61 | 74 69 6f 6e 61 6c 52 65 |() ERela|tionalRe|
|000007e0| 71 75 69 72 65 6d 65 6e | 74 09 4d 50 45 5f 41 70 |quiremen|t.MPE_Ap|
|000007f0| 70 6c 69 63 61 74 69 6f | 6e 52 65 6c 3b 09 09 09 |plicatio|nRel;...|
|00000800| 09 2f 2f 74 68 65 20 72 | 65 6c 61 74 69 6f 6e 61 |.//the r|elationa|
|00000810| 6c 20 72 65 71 75 69 72 | 65 6d 65 6e 74 20 6f 66 |l requir|ement of|
|00000820| 20 74 68 65 20 64 69 73 | 74 61 6e 63 65 20 74 6f | the dis|tance to|
|00000830| 20 74 68 65 20 67 6f 61 | 6c 20 66 72 6f 6d 20 74 | the goa|l from t|
|00000840| 68 65 20 63 75 72 72 65 | 6e 74 20 6c 6f 63 61 74 |he curre|nt locat|
|00000850| 69 6f 6e 0d 0a 09 76 61 | 72 20 28 29 20 66 6c 6f |ion...va|r () flo|
|00000860| 61 74 20 09 09 09 09 09 | 4d 50 45 5f 41 70 70 6c |at .....|MPE_Appl|
|00000870| 69 63 61 74 69 6f 6e 47 | 6f 61 6c 44 69 73 74 61 |icationG|oalDista|
|00000880| 6e 63 65 3b 09 2f 2f 74 | 68 65 20 64 69 73 74 61 |nce;.//t|he dista|
|00000890| 6e 63 65 20 74 6f 20 75 | 73 65 20 62 61 73 65 64 |nce to u|se based|
|000008a0| 20 6f 6e 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 | on the |applicat|
|000008b0| 69 6f 6e 20 72 65 71 75 | 69 72 65 6d 65 6e 74 0d |ion requ|irement.|
|000008c0| 0a 09 0d 0a 09 76 61 72 | 20 28 29 20 45 52 65 6c |.....var| () ERel|
|000008d0| 61 74 69 6f 6e 61 6c 52 | 65 71 75 69 72 65 6d 65 |ationalR|equireme|
|000008e0| 6e 74 09 4d 50 45 5f 53 | 65 6c 65 63 74 69 6f 6e |nt.MPE_S|election|
|000008f0| 49 6e 74 65 72 76 61 6c | 52 65 6c 3b 0d 0a 09 76 |Interval|Rel;...v|
|00000900| 61 72 20 28 29 20 66 6c | 6f 61 74 20 09 09 09 09 |ar () fl|oat ....|
|00000910| 09 4d 50 45 5f 53 65 6c | 65 63 74 69 6f 6e 49 6e |.MPE_Sel|ectionIn|
|00000920| 74 65 72 76 61 6c 3b 0d | 0a 09 76 61 72 20 20 20 |terval;.|..var |
|00000930| 20 66 6c 6f 61 74 20 09 | 09 09 09 09 4d 50 45 5f | float .|....MPE_|
|00000940| 4c 61 73 74 53 65 6c 65 | 63 74 69 6f 6e 54 69 6d |LastSele|ctionTim|
|00000950| 65 3b 0d 0a 0d 0a 09 76 | 61 72 20 28 29 20 45 52 |e;.....v|ar () ER|
|00000960| 65 6c 61 74 69 6f 6e 61 | 6c 52 65 71 75 69 72 65 |elationa|lRequire|
|00000970| 6d 65 6e 74 09 4d 50 45 | 5f 47 6f 61 6c 56 65 6c |ment.MPE|_GoalVel|
|00000980| 6f 63 69 74 79 53 69 7a | 65 52 65 6c 3b 0d 0a 09 |ocitySiz|eRel;...|
|00000990| 76 61 72 20 28 29 20 66 | 6c 6f 61 74 20 09 09 09 |var () f|loat ...|
|000009a0| 09 09 4d 50 45 5f 47 6f | 61 6c 56 65 6c 6f 63 69 |..MPE_Go|alVeloci|
|000009b0| 74 79 53 69 7a 65 3b 0d | 0a 0d 0a 09 76 61 72 20 |tySize;.|....var |
|000009c0| 28 29 20 62 6f 6f 6c 09 | 09 09 09 09 09 4d 50 45 |() bool.|.....MPE|
|000009d0| 5f 62 41 70 70 6c 79 53 | 70 65 65 64 3b 09 09 09 |_bApplyS|peed;...|
|000009e0| 09 2f 2f 69 66 20 74 72 | 75 65 20 61 70 70 6c 79 |.//if tr|ue apply|
|000009f0| 20 74 68 65 20 70 61 74 | 74 65 72 6e 27 73 20 73 | the pat|tern's s|
|00000a00| 70 65 65 64 20 6f 74 68 | 65 72 77 69 73 65 20 75 |peed oth|erwise u|
|00000a10| 73 65 20 75 73 65 20 74 | 68 65 20 73 75 67 67 65 |se use t|he sugge|
|00000a20| 73 74 65 64 20 73 70 65 | 65 64 20 6f 66 20 74 68 |sted spe|ed of th|
|00000a30| 65 20 67 6f 61 6c 0d 0a | 09 76 61 72 20 28 29 20 |e goal..|.var () |
|00000a40| 66 6c 6f 61 74 20 09 09 | 09 09 09 4d 50 45 5f 53 |float ..|...MPE_S|
|00000a50| 70 65 65 64 3b 09 09 09 | 09 09 09 2f 2f 68 6f 77 |peed;...|...//how|
|00000a60| 20 66 61 73 74 20 74 6f | 20 67 6f 20 69 66 20 62 | fast to| go if b|
|00000a70| 41 70 70 6c 79 53 70 65 | 65 64 20 69 73 20 74 72 |ApplySpe|ed is tr|
|00000a80| 75 65 0d 0a 2f 2f 78 78 | 78 72 6c 6f 66 75 74 75 |ue..//xx|xrlofutu|
|00000a90| 72 65 20 76 61 72 20 28 | 29 20 62 6f 6f 6c 09 09 |re var (|) bool..|
|00000aa0| 09 4d 50 45 5f 62 41 70 | 70 6c 79 50 61 75 73 65 |.MPE_bAp|plyPause|
|00000ab0| 54 69 6d 65 3b 09 09 09 | 2f 2f 69 66 20 74 72 75 |Time;...|//if tru|
|00000ac0| 65 20 61 70 70 6c 79 20 | 74 68 65 20 70 61 74 74 |e apply |the patt|
|00000ad0| 65 72 6e 27 73 20 70 61 | 75 73 65 20 74 69 6d 65 |ern's pa|use time|
|00000ae0| 20 6f 74 68 65 72 77 69 | 73 65 20 74 68 65 20 70 | otherwi|se the p|
|00000af0| 61 75 73 65 20 74 69 6d | 65 20 69 73 20 69 6e 69 |ause tim|e is ini|
|00000b00| 74 69 61 6c 69 7a 65 64 | 20 74 6f 20 30 0d 0a 2f |tialized| to 0../|
|00000b10| 2f 78 78 78 72 6c 6f 66 | 75 74 75 72 65 20 76 61 |/xxxrlof|uture va|
|00000b20| 72 20 28 29 20 66 6c 6f | 61 74 09 09 09 4d 50 45 |r () flo|at...MPE|
|00000b30| 5f 50 61 75 73 65 54 69 | 6d 65 3b 09 09 09 09 09 |_PauseTi|me;.....|
|00000b40| 2f 2f 0d 0a 09 76 61 72 | 20 28 29 20 4e 61 6d 65 |//...var| () Name|
|00000b50| 20 09 09 09 09 09 4d 50 | 45 5f 4e 61 6d 65 3b 0d | .....MP|E_Name;.|
|00000b60| 0a 09 76 61 72 20 28 29 | 20 4e 61 6d 65 20 09 09 |..var ()| Name ..|
|00000b70| 09 09 09 4d 50 45 5f 50 | 72 65 48 69 6e 74 3b 0d |...MPE_P|reHint;.|
|00000b80| 0a 09 76 61 72 20 28 29 | 20 4e 61 6d 65 20 09 09 |..var ()| Name ..|
|00000b90| 09 09 09 4d 50 45 5f 50 | 6f 73 74 48 69 6e 74 3b |...MPE_P|ostHint;|
|00000ba0| 0d 0a 09 0d 0a 09 76 61 | 72 20 28 29 20 54 45 6c |......va|r () TEl|
|00000bb0| 65 6d 65 6e 74 46 6f 63 | 75 73 50 61 72 61 6d 73 |ementFoc|usParams|
|00000bc0| 09 09 4d 50 45 5f 46 6f | 63 75 73 50 61 72 61 6d |..MPE_Fo|cusParam|
|00000bd0| 73 3b 0d 0a 09 76 61 72 | 20 28 29 20 54 45 6c 65 |s;...var| () TEle|
|00000be0| 6d 65 6e 74 57 61 79 70 | 6f 69 6e 74 50 61 72 61 |mentWayp|ointPara|
|00000bf0| 6d 73 09 4d 50 45 5f 57 | 61 79 70 6f 69 6e 74 50 |ms.MPE_W|aypointP|
|00000c00| 61 72 61 6d 73 3b 0d 0a | 09 0d 0a 7d 3b 0d 0a 0d |arams;..|...};...|
|00000c10| 0a 2f 2f 77 68 61 74 20 | 61 62 6f 75 74 20 74 68 |.//what |about th|
|00000c20| 65 20 73 69 74 75 61 74 | 69 6f 6e 20 77 68 65 72 |e situat|ion wher|
|00000c30| 65 20 6e 6f 6e 65 20 6f | 66 20 74 68 65 20 6d 6f |e none o|f the mo|
|00000c40| 76 65 6d 65 6e 74 20 6d | 65 74 68 6f 64 73 20 63 |vement m|ethods c|
|00000c50| 61 6e 20 67 69 76 65 20 | 75 73 20 61 20 72 65 61 |an give |us a rea|
|00000c60| 63 68 61 62 6c 65 20 64 | 65 73 74 69 6e 61 74 69 |chable d|estinati|
|00000c70| 6f 6e 3f 0d 0a 76 61 72 | 20 28 29 20 4e 61 6d 65 |on?..var| () Name|
|00000c80| 20 09 09 09 09 09 09 50 | 61 74 74 65 72 6e 4e 61 | ......P|atternNa|
|00000c90| 6d 65 3b 0d 0a 0d 0a 2f | 2f 78 78 72 6c 6f 20 6d |me;..../|/xxrlo m|
|00000ca0| 61 6b 65 20 74 68 69 73 | 20 65 78 74 65 72 6e 61 |ake this| externa|
|00000cb0| 6c 20 74 6f 20 74 68 65 | 20 6d 6f 76 65 6d 65 6e |l to the| movemen|
|00000cc0| 74 20 70 61 74 74 65 72 | 6e 0d 0a 76 61 72 20 28 |t patter|n..var (|
|00000cd0| 29 20 43 6c 61 73 73 3c | 49 74 65 72 61 74 6f 72 |) Class<|Iterator|
|00000ce0| 49 6e 74 65 72 66 3e 09 | 09 50 61 74 74 65 72 6e |Interf>.|.Pattern|
|00000cf0| 45 6c 65 6d 65 6e 74 49 | 74 65 72 43 6c 61 73 73 |ElementI|terClass|
|00000d00| 3b 0d 0a 76 61 72 20 49 | 74 65 72 61 74 6f 72 49 |;..var I|teratorI|
|00000d10| 6e 74 65 72 66 20 09 09 | 09 09 09 50 61 74 74 65 |nterf ..|...Patte|
|00000d20| 72 6e 45 6c 65 6d 65 6e | 74 49 74 65 72 3b 0d 0a |rnElemen|tIter;..|
|00000d30| 0d 0a 76 61 72 20 28 29 | 20 66 6c 6f 61 74 20 09 |..var ()| float .|
|00000d40| 09 09 09 09 09 47 6f 61 | 6c 44 69 73 74 61 6e 63 |.....Goa|lDistanc|
|00000d50| 65 54 6f 6c 65 72 61 6e | 63 65 3b 09 09 09 2f 2f |eToleran|ce;...//|
|00000d60| 74 68 65 20 74 6f 6c 65 | 72 61 6e 63 65 20 62 79 |the tole|rance by|
|00000d70| 20 77 68 69 63 68 20 67 | 6f 61 6c 20 64 69 73 74 | which g|oal dist|
|00000d80| 61 6e 63 65 20 72 65 71 | 75 69 72 65 6d 65 6e 74 |ance req|uirement|
|00000d90| 20 69 73 20 6a 75 64 67 | 65 64 20 0d 0a 76 61 72 | is judg|ed ..var|
|00000da0| 20 28 29 20 54 4d 6f 76 | 65 6d 65 6e 74 50 61 74 | () TMov|ementPat|
|00000db0| 74 65 72 6e 45 6c 65 6d | 65 6e 74 09 09 4d 6f 76 |ternElem|ent..Mov|
|00000dc0| 65 6d 65 6e 74 50 61 74 | 74 65 72 6e 45 6c 65 6d |ementPat|ternElem|
|00000dd0| 65 6e 74 73 5b 20 31 36 | 20 5d 3b 0d 0a 0d 0a 2f |ents[ 16| ];..../|
|00000de0| 2f 78 78 78 72 6c 6f 20 | 76 61 72 20 28 29 20 45 |/xxxrlo |var () E|
|00000df0| 52 65 6c 61 74 69 6f 6e | 61 6c 52 65 71 75 69 72 |Relation|alRequir|
|00000e00| 65 6d 65 6e 74 09 09 50 | 6f 73 74 52 65 71 44 69 |ement..P|ostReqDi|
|00000e10| 73 74 61 6e 63 65 52 65 | 6c 61 74 69 6f 6e 3b 09 |stanceRe|lation;.|
|00000e20| 2f 2f 74 68 65 20 72 65 | 6c 61 74 69 6f 6e 61 6c |//the re|lational|
|00000e30| 20 72 65 71 75 69 72 65 | 6d 65 6e 74 20 6f 66 20 | require|ment of |
|00000e40| 74 68 65 20 64 69 73 74 | 61 6e 63 65 20 74 6f 20 |the dist|ance to |
|00000e50| 74 68 65 20 67 6f 61 6c | 20 66 72 6f 6d 20 74 68 |the goal| from th|
|00000e60| 65 20 73 65 6c 65 63 74 | 65 64 20 77 61 79 70 6f |e select|ed waypo|
|00000e70| 69 6e 74 0d 0a 2f 2f 78 | 78 78 72 6c 6f 20 76 61 |int..//x|xxrlo va|
|00000e80| 72 20 28 29 20 66 6c 6f | 61 74 20 09 09 09 09 09 |r () flo|at .....|
|00000e90| 09 50 6f 73 74 52 65 71 | 47 6f 61 6c 44 69 73 74 |.PostReq|GoalDist|
|00000ea0| 61 6e 63 65 3b 09 09 2f | 2f 74 68 65 20 64 69 73 |ance;../|/the dis|
|00000eb0| 74 61 6e 63 65 20 74 6f | 20 75 73 65 20 62 61 73 |tance to| use bas|
|00000ec0| 65 64 20 6f 6e 20 74 68 | 65 20 72 65 73 75 6c 74 |ed on th|e result|
|00000ed0| 61 6e 74 20 72 65 71 75 | 69 72 65 6d 65 6e 74 0d |ant requ|irement.|
|00000ee0| 0a 76 61 72 20 28 29 20 | 45 52 65 6c 61 74 69 6f |.var () |ERelatio|
|00000ef0| 6e 61 6c 52 65 71 75 69 | 72 65 6d 65 6e 74 09 09 |nalRequi|rement..|
|00000f00| 50 72 65 52 65 71 44 69 | 73 74 61 6e 63 65 52 65 |PreReqDi|stanceRe|
|00000f10| 6c 61 74 69 6f 6e 3b 09 | 09 2f 2f 74 68 65 20 72 |lation;.|.//the r|
|00000f20| 65 6c 61 74 69 6f 6e 61 | 6c 20 72 65 71 75 69 72 |elationa|l requir|
|00000f30| 65 6d 65 6e 74 20 6f 66 | 20 74 68 65 20 64 69 73 |ement of| the dis|
|00000f40| 74 61 6e 63 65 20 74 6f | 20 74 68 65 20 67 6f 61 |tance to| the goa|
|00000f50| 6c 20 66 72 6f 6d 20 74 | 68 65 20 73 65 6c 65 63 |l from t|he selec|
|00000f60| 74 65 64 20 77 61 79 70 | 6f 69 6e 74 0d 0a 76 61 |ted wayp|oint..va|
|00000f70| 72 20 28 29 20 66 6c 6f | 61 74 20 09 09 09 09 09 |r () flo|at .....|
|00000f80| 09 50 72 65 52 65 71 47 | 6f 61 6c 44 69 73 74 61 |.PreReqG|oalDista|
|00000f90| 6e 63 65 3b 09 09 09 2f | 2f 74 68 65 20 64 69 73 |nce;.../|/the dis|
|00000fa0| 74 61 6e 63 65 20 74 6f | 20 75 73 65 20 62 61 73 |tance to| use bas|
|00000fb0| 65 64 20 6f 6e 20 74 68 | 65 20 72 65 73 75 6c 74 |ed on th|e result|
|00000fc0| 61 6e 74 20 72 65 71 75 | 69 72 65 6d 65 6e 74 0d |ant requ|irement.|
|00000fd0| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |........|.functio|
|00000fe0| 6e 20 43 6f 6e 73 74 72 | 75 63 74 65 64 28 29 0d |n Constr|ucted().|
|00000ff0| 0a 7b 0d 0a 09 53 75 70 | 65 72 2e 43 6f 6e 73 74 |.{...Sup|er.Const|
|00001000| 72 75 63 74 65 64 28 29 | 3b 0d 0a 09 50 61 74 74 |ructed()|;...Patt|
|00001010| 65 72 6e 45 6c 65 6d 65 | 6e 74 49 74 65 72 20 3d |ernEleme|ntIter =|
|00001020| 20 6e 65 77 28 20 53 65 | 6c 66 20 29 50 61 74 74 | new( Se|lf )Patt|
|00001030| 65 72 6e 45 6c 65 6d 65 | 6e 74 49 74 65 72 43 6c |ernEleme|ntIterCl|
|00001040| 61 73 73 3b 0d 0a 09 50 | 61 74 74 65 72 6e 45 6c |ass;...P|atternEl|
|00001050| 65 6d 65 6e 74 49 74 65 | 72 2e 42 69 6e 64 43 6f |ementIte|r.BindCo|
|00001060| 6c 6c 65 63 74 69 6f 6e | 28 20 2c 20 41 72 72 61 |llection|( , Arra|
|00001070| 79 43 6f 75 6e 74 28 20 | 4d 6f 76 65 6d 65 6e 74 |yCount( |Movement|
|00001080| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 73 20 |PatternE|lements |
|00001090| 29 20 29 3b 0d 0a 7d 0d | 0a 0d 0a 0d 0a 0d 0a 66 |) );..}.|.......f|
|000010a0| 75 6e 63 74 69 6f 6e 20 | 44 65 73 74 72 75 63 74 |unction |Destruct|
|000010b0| 65 64 28 29 0d 0a 7b 0d | 0a 09 50 61 74 74 65 72 |ed()..{.|..Patter|
|000010c0| 6e 45 6c 65 6d 65 6e 74 | 49 74 65 72 2e 44 65 6c |nElement|Iter.Del|
|000010d0| 65 74 65 28 29 3b 0d 0a | 09 50 61 74 74 65 72 6e |ete();..|.Pattern|
|000010e0| 45 6c 65 6d 65 6e 74 49 | 74 65 72 20 3d 20 4e 6f |ElementI|ter = No|
|000010f0| 6e 65 3b 0d 0a 09 53 75 | 70 65 72 2e 44 65 73 74 |ne;...Su|per.Dest|
|00001100| 72 75 63 74 65 64 28 29 | 3b 0d 0a 7d 0d 0a 0d 0a |ructed()|;..}....|
|00001110| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 54 4d 6f |....func|tion TMo|
|00001120| 76 65 6d 65 6e 74 50 61 | 74 74 65 72 6e 45 6c 65 |vementPa|tternEle|
|00001130| 6d 65 6e 74 20 47 65 74 | 4d 6f 76 6d 65 6e 74 50 |ment Get|MovmentP|
|00001140| 61 74 74 65 72 6e 45 6c | 65 6d 65 6e 74 28 20 49 |atternEl|ement( I|
|00001150| 74 65 72 61 74 6f 72 49 | 6e 74 65 72 66 20 50 61 |teratorI|nterf Pa|
|00001160| 74 74 65 72 6e 45 6c 65 | 6d 65 6e 74 49 74 65 72 |tternEle|mentIter|
|00001170| 20 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e | )..{...|local in|
|00001180| 74 20 43 75 72 72 65 6e | 74 45 6c 65 6d 65 6e 74 |t Curren|tElement|
|00001190| 49 6e 64 65 78 3b 0d 0a | 09 50 61 74 74 65 72 6e |Index;..|.Pattern|
|000011a0| 45 6c 65 6d 65 6e 74 49 | 74 65 72 2e 47 65 74 43 |ElementI|ter.GetC|
|000011b0| 75 72 72 65 6e 74 49 6e | 64 65 78 28 20 43 75 72 |urrentIn|dex( Cur|
|000011c0| 72 65 6e 74 45 6c 65 6d | 65 6e 74 49 6e 64 65 78 |rentElem|entIndex|
|000011d0| 20 29 3b 0d 0a 09 72 65 | 74 75 72 6e 20 4d 6f 76 | );...re|turn Mov|
|000011e0| 65 6d 65 6e 74 50 61 74 | 74 65 72 6e 45 6c 65 6d |ementPat|ternElem|
|000011f0| 65 6e 74 73 5b 20 43 75 | 72 72 65 6e 74 45 6c 65 |ents[ Cu|rrentEle|
|00001200| 6d 65 6e 74 49 6e 64 65 | 78 20 5d 3b 0d 0a 7d 0d |mentInde|x ];..}.|
|00001210| 0a 0d 0a 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |.......f|unction |
|00001220| 62 6f 6f 6c 20 53 65 6c | 65 63 74 50 61 74 74 65 |bool Sel|ectPatte|
|00001230| 72 6e 45 6c 65 6d 65 6e | 74 28 20 41 63 74 6f 72 |rnElemen|t( Actor|
|00001240| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 47 6f | MovingA|ctor, Go|
|00001250| 61 6c 41 62 73 74 72 61 | 63 74 65 72 49 6e 74 65 |alAbstra|cterInte|
|00001260| 72 66 20 47 6f 61 6c 2c | 20 49 74 65 72 61 74 6f |rf Goal,| Iterato|
|00001270| 72 49 6e 74 65 72 66 20 | 50 61 74 74 65 72 6e 45 |rInterf |PatternE|
|00001280| 6c 65 6d 65 6e 74 49 74 | 65 72 20 29 0d 0a 7b 0d |lementIt|er )..{.|
|00001290| 0a 09 6c 6f 63 61 6c 20 | 66 6c 6f 61 74 20 47 6f |..local |float Go|
|000012a0| 61 6c 44 69 73 74 61 6e | 63 65 2c 20 44 69 73 74 |alDistan|ce, Dist|
|000012b0| 61 6e 63 65 44 69 66 66 | 65 72 65 6e 63 65 2c 20 |anceDiff|erence, |
|000012c0| 54 69 6d 65 44 69 66 66 | 65 72 65 6e 63 65 2c 20 |TimeDiff|erence, |
|000012d0| 56 65 6c 6f 63 69 74 79 | 44 69 66 66 65 72 65 6e |Velocity|Differen|
|000012e0| 63 65 3b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |ce;...lo|cal int |
|000012f0| 43 75 72 72 65 6e 74 45 | 6c 65 6d 65 6e 74 49 6e |CurrentE|lementIn|
|00001300| 64 65 78 2c 20 45 6c 65 | 6d 65 6e 74 43 6f 75 6e |dex, Ele|mentCoun|
|00001310| 74 2c 20 54 65 73 74 65 | 64 45 6c 65 6d 65 6e 74 |t, Teste|dElement|
|00001320| 43 6f 75 6e 74 3b 0d 0a | 09 6c 6f 63 61 6c 20 62 |Count;..|.local b|
|00001330| 6f 6f 6c 20 62 53 75 63 | 63 65 73 73 3b 0d 0a 09 |ool bSuc|cess;...|
|00001340| 0d 0a 09 63 6c 61 73 73 | 27 44 65 62 75 67 27 2e |...class|'Debug'.|
|00001350| 73 74 61 74 69 63 2e 44 | 65 62 75 67 4c 6f 67 28 |static.D|ebugLog(|
|00001360| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 22 53 | MovingA|ctor, "S|
|00001370| 65 6c 65 63 74 50 61 74 | 74 65 72 6e 45 6c 65 6d |electPat|ternElem|
|00001380| 65 6e 74 22 2c 20 44 65 | 62 75 67 43 61 74 65 67 |ent", De|bugCateg|
|00001390| 6f 72 79 4e 61 6d 65 20 | 29 3b 0d 0a 09 69 66 28 |oryName |);...if(|
|000013a0| 20 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 49 | Pattern|ElementI|
|000013b0| 74 65 72 2e 47 65 74 49 | 74 65 6d 43 6f 75 6e 74 |ter.GetI|temCount|
|000013c0| 28 20 45 6c 65 6d 65 6e | 74 43 6f 75 6e 74 20 29 |( Elemen|tCount )|
|000013d0| 20 26 26 0d 0a 09 09 09 | 28 20 50 61 74 74 65 72 | &&.....|( Patter|
|000013e0| 6e 45 6c 65 6d 65 6e 74 | 49 74 65 72 2e 47 65 74 |nElement|Iter.Get|
|000013f0| 43 75 72 72 65 6e 74 49 | 6e 64 65 78 28 20 43 75 |CurrentI|ndex( Cu|
|00001400| 72 72 65 6e 74 45 6c 65 | 6d 65 6e 74 49 6e 64 65 |rrentEle|mentInde|
|00001410| 78 20 29 20 7c 7c 0d 0a | 09 09 09 50 61 74 74 65 |x ) ||..|...Patte|
|00001420| 72 6e 45 6c 65 6d 65 6e | 74 49 74 65 72 2e 47 65 |rnElemen|tIter.Ge|
|00001430| 74 46 69 72 73 74 49 6e | 64 65 78 28 20 43 75 72 |tFirstIn|dex( Cur|
|00001440| 72 65 6e 74 45 6c 65 6d | 65 6e 74 49 6e 64 65 78 |rentElem|entIndex|
|00001450| 20 29 20 29 20 29 0d 0a | 09 7b 0d 0a 09 09 63 6c | ) ) )..|.{....cl|
|00001460| 61 73 73 27 44 65 62 75 | 67 27 2e 73 74 61 74 69 |ass'Debu|g'.stati|
|00001470| 63 2e 44 65 62 75 67 4c | 6f 67 28 20 4d 6f 76 69 |c.DebugL|og( Movi|
|00001480| 6e 67 41 63 74 6f 72 2c | 20 22 53 65 6c 65 63 74 |ngActor,| "Select|
|00001490| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 20 45 |PatternE|lement E|
|000014a0| 6c 65 6d 65 6e 74 43 6f | 75 6e 74 20 22 20 24 20 |lementCo|unt " $ |
|000014b0| 45 6c 65 6d 65 6e 74 43 | 6f 75 6e 74 2c 20 44 65 |ElementC|ount, De|
|000014c0| 62 75 67 43 61 74 65 67 | 6f 72 79 4e 61 6d 65 20 |bugCateg|oryName |
|000014d0| 29 3b 0d 0a 0d 0a 09 09 | 47 6f 61 6c 2e 47 65 74 |);......|Goal.Get|
|000014e0| 47 6f 61 6c 44 69 73 74 | 61 6e 63 65 28 20 4d 6f |GoalDist|ance( Mo|
|000014f0| 76 69 6e 67 41 63 74 6f | 72 2c 20 47 6f 61 6c 44 |vingActo|r, GoalD|
|00001500| 69 73 74 61 6e 63 65 2c | 20 4d 6f 76 69 6e 67 41 |istance,| MovingA|
|00001510| 63 74 6f 72 20 29 3b 0d | 0a 09 09 66 6f 72 28 20 |ctor );.|...for( |
|00001520| 54 65 73 74 65 64 45 6c | 65 6d 65 6e 74 43 6f 75 |TestedEl|ementCou|
|00001530| 6e 74 20 3d 20 31 3b 20 | 54 65 73 74 65 64 45 6c |nt = 1; |TestedEl|
|00001540| 65 6d 65 6e 74 43 6f 75 | 6e 74 20 3c 3d 20 45 6c |ementCou|nt <= El|
|00001550| 65 6d 65 6e 74 43 6f 75 | 6e 74 3b 20 54 65 73 74 |ementCou|nt; Test|
|00001560| 65 64 45 6c 65 6d 65 6e | 74 43 6f 75 6e 74 2b 2b |edElemen|tCount++|
|00001570| 20 29 0d 0a 09 09 7b 0d | 0a 09 09 09 63 6c 61 73 | )....{.|....clas|
|00001580| 73 27 44 65 62 75 67 27 | 2e 73 74 61 74 69 63 2e |s'Debug'|.static.|
|00001590| 44 65 62 75 67 4c 6f 67 | 28 20 4d 6f 76 69 6e 67 |DebugLog|( Moving|
|000015a0| 41 63 74 6f 72 2c 20 22 | 53 65 6c 65 63 74 50 61 |Actor, "|SelectPa|
|000015b0| 74 74 65 72 6e 45 6c 65 | 6d 65 6e 74 20 43 75 72 |tternEle|ment Cur|
|000015c0| 72 65 6e 74 45 6c 65 6d | 65 6e 74 49 6e 64 65 78 |rentElem|entIndex|
|000015d0| 20 22 20 24 20 43 75 72 | 72 65 6e 74 45 6c 65 6d | " $ Cur|rentElem|
|000015e0| 65 6e 74 49 6e 64 65 78 | 2c 20 44 65 62 75 67 43 |entIndex|, DebugC|
|000015f0| 61 74 65 67 6f 72 79 4e | 61 6d 65 20 29 3b 0d 0a |ategoryN|ame );..|
|00001600| 09 09 09 69 66 28 20 4d | 6f 76 65 6d 65 6e 74 50 |...if( M|ovementP|
|00001610| 61 74 74 65 72 6e 45 6c | 65 6d 65 6e 74 73 5b 20 |atternEl|ements[ |
|00001620| 43 75 72 72 65 6e 74 45 | 6c 65 6d 65 6e 74 49 6e |CurrentE|lementIn|
|00001630| 64 65 78 20 5d 2e 4d 50 | 45 5f 62 45 6e 61 62 6c |dex ].MP|E_bEnabl|
|00001640| 65 64 20 29 0d 0a 09 09 | 09 7b 0d 0a 09 09 09 09 |ed )....|.{......|
|00001650| 44 69 73 74 61 6e 63 65 | 44 69 66 66 65 72 65 6e |Distance|Differen|
|00001660| 63 65 20 3d 20 47 6f 61 | 6c 44 69 73 74 61 6e 63 |ce = Goa|lDistanc|
|00001670| 65 20 2d 20 4d 6f 76 65 | 6d 65 6e 74 50 61 74 74 |e - Move|mentPatt|
|00001680| 65 72 6e 45 6c 65 6d 65 | 6e 74 73 5b 20 43 75 72 |ernEleme|nts[ Cur|
|00001690| 72 65 6e 74 45 6c 65 6d | 65 6e 74 49 6e 64 65 78 |rentElem|entIndex|
|000016a0| 20 5d 2e 4d 50 45 5f 41 | 70 70 6c 69 63 61 74 69 | ].MPE_A|pplicati|
|000016b0| 6f 6e 47 6f 61 6c 44 69 | 73 74 61 6e 63 65 3b 0d |onGoalDi|stance;.|
|000016c0| 0a 09 09 09 09 69 66 28 | 20 45 76 61 6c 75 61 74 |.....if(| Evaluat|
|000016d0| 65 52 65 71 75 69 73 69 | 74 65 47 6f 61 6c 44 69 |eRequisi|teGoalDi|
|000016e0| 73 74 61 6e 63 65 28 20 | 44 69 73 74 61 6e 63 65 |stance( |Distance|
|000016f0| 44 69 66 66 65 72 65 6e | 63 65 2c 20 4d 6f 76 65 |Differen|ce, Move|
|00001700| 6d 65 6e 74 50 61 74 74 | 65 72 6e 45 6c 65 6d 65 |mentPatt|ernEleme|
|00001710| 6e 74 73 5b 20 43 75 72 | 72 65 6e 74 45 6c 65 6d |nts[ Cur|rentElem|
|00001720| 65 6e 74 49 6e 64 65 78 | 20 5d 2e 4d 50 45 5f 41 |entIndex| ].MPE_A|
|00001730| 70 70 6c 69 63 61 74 69 | 6f 6e 52 65 6c 20 29 20 |pplicati|onRel ) |
|00001740| 29 0d 0a 09 09 09 09 7b | 0d 0a 09 09 09 09 09 54 |)......{|.......T|
|00001750| 69 6d 65 44 69 66 66 65 | 72 65 6e 63 65 20 3d 20 |imeDiffe|rence = |
|00001760| 4d 6f 76 69 6e 67 41 63 | 74 6f 72 2e 4c 65 76 65 |MovingAc|tor.Leve|
|00001770| 6c 2e 54 69 6d 65 53 65 | 63 6f 6e 64 73 20 2d 20 |l.TimeSe|conds - |
|00001780| 4d 6f 76 65 6d 65 6e 74 | 50 61 74 74 65 72 6e 45 |Movement|PatternE|
|00001790| 6c 65 6d 65 6e 74 73 5b | 20 43 75 72 72 65 6e 74 |lements[| Current|
|000017a0| 45 6c 65 6d 65 6e 74 49 | 6e 64 65 78 20 5d 2e 4d |ElementI|ndex ].M|
|000017b0| 50 45 5f 4c 61 73 74 53 | 65 6c 65 63 74 69 6f 6e |PE_LastS|election|
|000017c0| 54 69 6d 65 3b 0d 0a 09 | 09 09 09 09 69 66 28 20 |Time;...|....if( |
|000017d0| 45 76 61 6c 75 61 74 65 | 52 65 71 75 69 73 69 74 |Evaluate|Requisit|
|000017e0| 65 56 61 6c 75 65 28 20 | 54 69 6d 65 44 69 66 66 |eValue( |TimeDiff|
|000017f0| 65 72 65 6e 63 65 2c 20 | 4d 6f 76 65 6d 65 6e 74 |erence, |Movement|
|00001800| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 73 5b |PatternE|lements[|
|00001810| 20 43 75 72 72 65 6e 74 | 45 6c 65 6d 65 6e 74 49 | Current|ElementI|
|00001820| 6e 64 65 78 20 5d 2e 4d | 50 45 5f 53 65 6c 65 63 |ndex ].M|PE_Selec|
|00001830| 74 69 6f 6e 49 6e 74 65 | 72 76 61 6c 52 65 6c 2c |tionInte|rvalRel,|
|00001840| 0d 0a 09 09 09 09 09 09 | 20 09 4d 6f 76 65 6d 65 |........| .Moveme|
|00001850| 6e 74 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |ntPatter|nElement|
|00001860| 73 5b 20 43 75 72 72 65 | 6e 74 45 6c 65 6d 65 6e |s[ Curre|ntElemen|
|00001870| 74 49 6e 64 65 78 20 5d | 2e 4d 50 45 5f 53 65 6c |tIndex ]|.MPE_Sel|
|00001880| 65 63 74 69 6f 6e 49 6e | 74 65 72 76 61 6c 20 29 |ectionIn|terval )|
|00001890| 20 29 0d 0a 09 09 09 09 | 09 7b 0d 0a 09 09 09 09 | )......|.{......|
|000018a0| 09 09 56 65 6c 6f 63 69 | 74 79 44 69 66 66 65 72 |..Veloci|tyDiffer|
|000018b0| 65 6e 63 65 20 3d 20 56 | 53 69 7a 65 28 20 4d 6f |ence = V|Size( Mo|
|000018c0| 76 69 6e 67 41 63 74 6f | 72 2e 56 65 6c 6f 63 69 |vingActo|r.Veloci|
|000018d0| 74 79 20 29 20 2d 20 4d | 6f 76 65 6d 65 6e 74 50 |ty ) - M|ovementP|
|000018e0| 61 74 74 65 72 6e 45 6c | 65 6d 65 6e 74 73 5b 20 |atternEl|ements[ |
|000018f0| 43 75 72 72 65 6e 74 45 | 6c 65 6d 65 6e 74 49 6e |CurrentE|lementIn|
|00001900| 64 65 78 20 5d 2e 4d 50 | 45 5f 47 6f 61 6c 56 65 |dex ].MP|E_GoalVe|
|00001910| 6c 6f 63 69 74 79 53 69 | 7a 65 3b 0d 0a 09 09 09 |locitySi|ze;.....|
|00001920| 09 09 09 69 66 28 20 45 | 76 61 6c 75 61 74 65 52 |...if( E|valuateR|
|00001930| 65 71 75 69 73 69 74 65 | 56 61 6c 75 65 28 20 56 |equisite|Value( V|
|00001940| 65 6c 6f 63 69 74 79 44 | 69 66 66 65 72 65 6e 63 |elocityD|ifferenc|
|00001950| 65 2c 20 4d 6f 76 65 6d | 65 6e 74 50 61 74 74 65 |e, Movem|entPatte|
|00001960| 72 6e 45 6c 65 6d 65 6e | 74 73 5b 20 43 75 72 72 |rnElemen|ts[ Curr|
|00001970| 65 6e 74 45 6c 65 6d 65 | 6e 74 49 6e 64 65 78 20 |entEleme|ntIndex |
|00001980| 5d 2e 4d 50 45 5f 47 6f | 61 6c 56 65 6c 6f 63 69 |].MPE_Go|alVeloci|
|00001990| 74 79 53 69 7a 65 52 65 | 6c 2c 0d 0a 09 09 09 09 |tySizeRe|l,......|
|000019a0| 09 09 20 09 4d 6f 76 65 | 6d 65 6e 74 50 61 74 74 |.. .Move|mentPatt|
|000019b0| 65 72 6e 45 6c 65 6d 65 | 6e 74 73 5b 20 43 75 72 |ernEleme|nts[ Cur|
|000019c0| 72 65 6e 74 45 6c 65 6d | 65 6e 74 49 6e 64 65 78 |rentElem|entIndex|
|000019d0| 20 5d 2e 4d 50 45 5f 47 | 6f 61 6c 56 65 6c 6f 63 | ].MPE_G|oalVeloc|
|000019e0| 69 74 79 53 69 7a 65 20 | 29 20 29 0d 0a 09 09 09 |itySize |) ).....|
|000019f0| 09 09 09 7b 0d 0a 09 09 | 09 09 09 09 09 4d 6f 76 |...{....|.....Mov|
|00001a00| 65 6d 65 6e 74 50 61 74 | 74 65 72 6e 45 6c 65 6d |ementPat|ternElem|
|00001a10| 65 6e 74 73 5b 20 43 75 | 72 72 65 6e 74 45 6c 65 |ents[ Cu|rrentEle|
|00001a20| 6d 65 6e 74 49 6e 64 65 | 78 20 5d 2e 4d 50 45 5f |mentInde|x ].MPE_|
|00001a30| 4c 61 73 74 53 65 6c 65 | 63 74 69 6f 6e 54 69 6d |LastSele|ctionTim|
|00001a40| 65 20 3d 20 4d 6f 76 69 | 6e 67 41 63 74 6f 72 2e |e = Movi|ngActor.|
|00001a50| 4c 65 76 65 6c 2e 54 69 | 6d 65 53 65 63 6f 6e 64 |Level.Ti|meSecond|
|00001a60| 73 3b 0d 0a 09 09 09 09 | 09 09 09 62 53 75 63 63 |s;......|...bSucc|
|00001a70| 65 73 73 20 3d 20 74 72 | 75 65 3b 0d 0a 09 09 09 |ess = tr|ue;.....|
|00001a80| 09 09 09 09 62 72 65 61 | 6b 3b 0d 0a 09 09 09 09 |....brea|k;......|
|00001a90| 09 09 7d 0d 0a 09 09 09 | 09 09 7d 0d 0a 09 09 09 |..}.....|..}.....|
|00001aa0| 09 7d 0d 0a 09 09 09 7d | 0d 0a 09 09 09 50 61 74 |.}.....}|.....Pat|
|00001ab0| 74 65 72 6e 45 6c 65 6d | 65 6e 74 49 74 65 72 2e |ternElem|entIter.|
|00001ac0| 47 65 74 4e 65 78 74 49 | 6e 64 65 78 28 20 43 75 |GetNextI|ndex( Cu|
|00001ad0| 72 72 65 6e 74 45 6c 65 | 6d 65 6e 74 49 6e 64 65 |rrentEle|mentInde|
|00001ae0| 78 20 29 3b 0d 0a 09 09 | 7d 0d 0a 09 7d 0d 0a 09 |x );....|}...}...|
|00001af0| 63 6c 61 73 73 27 44 65 | 62 75 67 27 2e 73 74 61 |class'De|bug'.sta|
|00001b00| 74 69 63 2e 44 65 62 75 | 67 4c 6f 67 28 20 4d 6f |tic.Debu|gLog( Mo|
|00001b10| 76 69 6e 67 41 63 74 6f | 72 2c 20 22 53 65 6c 65 |vingActo|r, "Sele|
|00001b20| 63 74 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |ctPatter|nElement|
|00001b30| 20 72 65 74 75 72 6e 69 | 6e 67 20 22 20 24 20 62 | returni|ng " $ b|
|00001b40| 53 75 63 63 65 73 73 2c | 20 44 65 62 75 67 43 61 |Success,| DebugCa|
|00001b50| 74 65 67 6f 72 79 4e 61 | 6d 65 20 29 3b 0d 0a 09 |tegoryNa|me );...|
|00001b60| 72 65 74 75 72 6e 20 62 | 53 75 63 63 65 73 73 3b |return b|Success;|
|00001b70| 0d 0a 7d 0d 0a 0d 0a 0d | 0a 0d 0a 66 75 6e 63 74 |..}.....|...funct|
|00001b80| 69 6f 6e 20 53 65 6c 65 | 63 74 47 6f 61 6c 73 46 |ion Sele|ctGoalsF|
|00001b90| 72 6f 6d 50 61 74 74 65 | 72 6e 45 6c 65 6d 65 6e |romPatte|rnElemen|
|00001ba0| 74 28 20 47 6f 61 6c 41 | 62 73 74 72 61 63 74 65 |t( GoalA|bstracte|
|00001bb0| 72 49 6e 74 65 72 66 20 | 4d 6f 76 65 6d 65 6e 74 |rInterf |Movement|
|00001bc0| 47 6f 61 6c 2c 0d 0a 09 | 09 47 6f 61 6c 41 62 73 |Goal,...|.GoalAbs|
|00001bd0| 74 72 61 63 74 65 72 49 | 6e 74 65 72 66 20 46 6f |tracterI|nterf Fo|
|00001be0| 63 75 73 47 6f 61 6c 2c | 0d 0a 09 09 41 63 74 6f |cusGoal,|....Acto|
|00001bf0| 72 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 2c 0d 0a |r Moving|Actor,..|
|00001c00| 09 09 63 6c 61 73 73 3c | 57 61 79 70 6f 69 6e 74 |..class<|Waypoint|
|00001c10| 53 65 6c 65 63 74 6f 72 | 49 6e 74 65 72 66 3e 20 |Selector|Interf> |
|00001c20| 57 70 74 53 65 6c 65 63 | 74 6f 72 43 6c 61 73 73 |WptSelec|torClass|
|00001c30| 2c 0d 0a 09 09 63 6c 61 | 73 73 3c 46 6f 63 75 73 |,....cla|ss<Focus|
|00001c40| 53 65 6c 65 63 74 6f 72 | 49 6e 74 65 72 66 3e 20 |Selector|Interf> |
|00001c50| 46 63 73 53 65 6c 65 63 | 74 6f 72 43 6c 61 73 73 |FcsSelec|torClass|
|00001c60| 2c 0d 0a 09 09 42 65 68 | 61 76 69 6f 72 43 6f 6e |,....Beh|aviorCon|
|00001c70| 73 74 72 61 69 6e 65 72 | 20 43 6f 6e 73 74 72 61 |strainer| Constra|
|00001c80| 69 6e 65 72 2c 0d 0a 09 | 09 47 6f 61 6c 41 62 73 |iner,...|.GoalAbs|
|00001c90| 74 72 61 63 74 65 72 49 | 6e 74 65 72 66 20 47 6f |tracterI|nterf Go|
|00001ca0| 61 6c 2c 0d 0a 09 09 49 | 74 65 72 61 74 6f 72 49 |al,....I|teratorI|
|00001cb0| 6e 74 65 72 66 20 50 61 | 74 74 65 72 6e 45 6c 65 |nterf Pa|tternEle|
|00001cc0| 6d 65 6e 74 49 74 65 72 | 20 29 0d 0a 7b 0d 0a 09 |mentIter| )..{...|
|00001cd0| 53 65 6c 65 63 74 57 61 | 79 70 6f 69 6e 74 46 72 |SelectWa|ypointFr|
|00001ce0| 6f 6d 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |omPatter|nElement|
|00001cf0| 28 20 4d 6f 76 65 6d 65 | 6e 74 47 6f 61 6c 2c 20 |( Moveme|ntGoal, |
|00001d00| 4d 6f 76 69 6e 67 41 63 | 74 6f 72 2c 20 57 70 74 |MovingAc|tor, Wpt|
|00001d10| 53 65 6c 65 63 74 6f 72 | 43 6c 61 73 73 2c 20 43 |Selector|Class, C|
|00001d20| 6f 6e 73 74 72 61 69 6e | 65 72 2c 20 47 6f 61 6c |onstrain|er, Goal|
|00001d30| 2c 20 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |, Patter|nElement|
|00001d40| 49 74 65 72 20 29 3b 0d | 0a 09 53 65 6c 65 63 74 |Iter );.|..Select|
|00001d50| 46 6f 63 75 73 46 72 6f | 6d 50 61 74 74 65 72 6e |FocusFro|mPattern|
|00001d60| 45 6c 65 6d 65 6e 74 28 | 20 46 6f 63 75 73 47 6f |Element(| FocusGo|
|00001d70| 61 6c 2c 20 4d 6f 76 69 | 6e 67 41 63 74 6f 72 2c |al, Movi|ngActor,|
|00001d80| 20 46 63 73 53 65 6c 65 | 63 74 6f 72 43 6c 61 73 | FcsSele|ctorClas|
|00001d90| 73 2c 20 43 6f 6e 73 74 | 72 61 69 6e 65 72 2c 20 |s, Const|rainer, |
|00001da0| 47 6f 61 6c 2c 20 50 61 | 74 74 65 72 6e 45 6c 65 |Goal, Pa|tternEle|
|00001db0| 6d 65 6e 74 49 74 65 72 | 20 29 3b 0d 0a 7d 0d 0a |mentIter| );..}..|
|00001dc0| 0d 0a 0d 0a 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 62 |......fu|nction b|
|00001dd0| 6f 6f 6c 20 53 65 6c 65 | 63 74 57 61 79 70 6f 69 |ool Sele|ctWaypoi|
|00001de0| 6e 74 46 72 6f 6d 50 61 | 74 74 65 72 6e 45 6c 65 |ntFromPa|tternEle|
|00001df0| 6d 65 6e 74 28 20 47 6f | 61 6c 41 62 73 74 72 61 |ment( Go|alAbstra|
|00001e00| 63 74 65 72 49 6e 74 65 | 72 66 20 52 61 77 4d 6f |cterInte|rf RawMo|
|00001e10| 76 65 6d 65 6e 74 47 6f | 61 6c 2c 0d 0a 09 09 41 |vementGo|al,....A|
|00001e20| 63 74 6f 72 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |ctor Mov|ingActor|
|00001e30| 2c 0d 0a 09 09 63 6c 61 | 73 73 3c 57 61 79 70 6f |,....cla|ss<Waypo|
|00001e40| 69 6e 74 53 65 6c 65 63 | 74 6f 72 49 6e 74 65 72 |intSelec|torInter|
|00001e50| 66 3e 20 57 70 74 53 65 | 6c 65 63 74 6f 72 43 6c |f> WptSe|lectorCl|
|00001e60| 61 73 73 2c 0d 0a 09 09 | 42 65 68 61 76 69 6f 72 |ass,....|Behavior|
|00001e70| 43 6f 6e 73 74 72 61 69 | 6e 65 72 20 43 6f 6e 73 |Constrai|ner Cons|
|00001e80| 74 72 61 69 6e 65 72 2c | 0d 0a 09 09 47 6f 61 6c |trainer,|....Goal|
|00001e90| 41 62 73 74 72 61 63 74 | 65 72 49 6e 74 65 72 66 |Abstract|erInterf|
|00001ea0| 20 47 6f 61 6c 2c 0d 0a | 09 09 49 74 65 72 61 74 | Goal,..|..Iterat|
|00001eb0| 6f 72 49 6e 74 65 72 66 | 20 50 61 74 74 65 72 6e |orInterf| Pattern|
|00001ec0| 45 6c 65 6d 65 6e 74 49 | 74 65 72 20 29 0d 0a 7b |ElementI|ter )..{|
|00001ed0| 0d 0a 09 6c 6f 63 61 6c | 20 56 65 63 74 6f 72 20 |...local| Vector |
|00001ee0| 47 6f 61 6c 4c 6f 63 61 | 74 69 6f 6e 2c 20 49 6e |GoalLoca|tion, In|
|00001ef0| 69 74 69 61 6c 57 61 79 | 70 6f 69 6e 74 4c 6f 63 |itialWay|pointLoc|
|00001f00| 61 74 69 6f 6e 2c 20 57 | 61 79 70 6f 69 6e 74 4c |ation, W|aypointL|
|00001f10| 6f 63 61 74 69 6f 6e 2c | 20 57 61 79 70 6f 69 6e |ocation,| Waypoin|
|00001f20| 74 4f 66 66 73 65 74 44 | 69 72 65 63 74 69 6f 6e |tOffsetD|irection|
|00001f30| 2c 20 57 61 79 70 6f 69 | 6e 74 4f 66 66 73 65 74 |, Waypoi|ntOffset|
|00001f40| 3b 0d 0a 09 6c 6f 63 61 | 6c 20 66 6c 6f 61 74 20 |;...loca|l float |
|00001f50| 57 61 79 70 6f 69 6e 74 | 4f 66 66 73 65 74 44 69 |Waypoint|OffsetDi|
|00001f60| 73 74 61 6e 63 65 2c 20 | 57 61 79 70 6f 69 6e 74 |stance, |Waypoint|
|00001f70| 44 69 73 74 61 6e 63 65 | 54 6f 47 6f 61 6c 3b 0d |Distance|ToGoal;.|
|00001f80| 0a 09 6c 6f 63 61 6c 20 | 62 6f 6f 6c 20 62 53 75 |..local |bool bSu|
|00001f90| 63 63 65 73 73 3b 0d 0a | 09 6c 6f 63 61 6c 20 69 |ccess;..|.local i|
|00001fa0| 6e 74 20 50 61 74 74 65 | 72 6e 45 6c 65 6d 65 6e |nt Patte|rnElemen|
|00001fb0| 74 49 64 78 3b 0d 0a 09 | 0d 0a 09 69 66 28 20 50 |tIdx;...|...if( P|
|00001fc0| 61 74 74 65 72 6e 45 6c | 65 6d 65 6e 74 49 74 65 |atternEl|ementIte|
|00001fd0| 72 2e 47 65 74 43 75 72 | 72 65 6e 74 49 6e 64 65 |r.GetCur|rentInde|
|00001fe0| 78 28 20 50 61 74 74 65 | 72 6e 45 6c 65 6d 65 6e |x( Patte|rnElemen|
|00001ff0| 74 49 64 78 20 29 20 29 | 0d 0a 09 7b 0d 0a 09 09 |tIdx ) )|...{....|
|00002000| 63 6c 61 73 73 27 44 65 | 62 75 67 27 2e 73 74 61 |class'De|bug'.sta|
|00002010| 74 69 63 2e 44 65 62 75 | 67 4c 6f 67 28 20 4d 6f |tic.Debu|gLog( Mo|
|00002020| 76 69 6e 67 41 63 74 6f | 72 2c 20 22 53 65 6c 65 |vingActo|r, "Sele|
|00002030| 63 74 57 61 79 70 6f 69 | 6e 74 46 72 6f 6d 50 61 |ctWaypoi|ntFromPa|
|00002040| 74 74 65 72 6e 45 6c 65 | 6d 65 6e 74 20 50 61 74 |tternEle|ment Pat|
|00002050| 74 65 72 6e 45 6c 65 6d | 65 6e 74 49 64 78 20 22 |ternElem|entIdx "|
|00002060| 20 24 20 50 61 74 74 65 | 72 6e 45 6c 65 6d 65 6e | $ Patte|rnElemen|
|00002070| 74 49 64 78 2c 20 44 65 | 62 75 67 43 61 74 65 67 |tIdx, De|bugCateg|
|00002080| 6f 72 79 4e 61 6d 65 20 | 29 3b 0d 0a 09 09 63 6c |oryName |);....cl|
|00002090| 61 73 73 27 44 65 62 75 | 67 27 2e 73 74 61 74 69 |ass'Debu|g'.stati|
|000020a0| 63 2e 44 65 62 75 67 4c | 6f 67 28 20 4d 6f 76 69 |c.DebugL|og( Movi|
|000020b0| 6e 67 41 63 74 6f 72 2c | 20 22 53 65 6c 65 63 74 |ngActor,| "Select|
|000020c0| 57 61 79 70 6f 69 6e 74 | 46 72 6f 6d 50 61 74 74 |Waypoint|FromPatt|
|000020d0| 65 72 6e 45 6c 65 6d 65 | 6e 74 20 50 61 74 74 65 |ernEleme|nt Patte|
|000020e0| 72 6e 45 6c 65 6d 65 6e | 74 4e 61 6d 65 20 22 20 |rnElemen|tName " |
|000020f0| 24 20 4d 6f 76 65 6d 65 | 6e 74 50 61 74 74 65 72 |$ Moveme|ntPatter|
|00002100| 6e 45 6c 65 6d 65 6e 74 | 73 5b 20 50 61 74 74 65 |nElement|s[ Patte|
|00002110| 72 6e 45 6c 65 6d 65 6e | 74 49 64 78 20 5d 2e 4d |rnElemen|tIdx ].M|
|00002120| 50 45 5f 4e 61 6d 65 2c | 20 44 65 62 75 67 43 61 |PE_Name,| DebugCa|
|00002130| 74 65 67 6f 72 79 4e 61 | 6d 65 20 29 3b 0d 0a 09 |tegoryNa|me );...|
|00002140| 09 0d 0a 09 09 69 66 28 | 20 4d 6f 76 65 6d 65 6e |.....if(| Movemen|
|00002150| 74 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 73 |tPattern|Elements|
|00002160| 5b 20 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |[ Patter|nElement|
|00002170| 49 64 78 20 5d 2e 4d 50 | 45 5f 57 61 79 70 6f 69 |Idx ].MP|E_Waypoi|
|00002180| 6e 74 50 61 72 61 6d 73 | 2e 57 50 5f 62 53 65 6c |ntParams|.WP_bSel|
|00002190| 65 63 74 57 61 79 70 6f | 69 6e 74 20 26 26 0d 0a |ectWaypo|int &&..|
|000021a0| 09 09 09 09 57 70 74 53 | 65 6c 65 63 74 6f 72 43 |....WptS|electorC|
|000021b0| 6c 61 73 73 2e 73 74 61 | 74 69 63 2e 53 65 6c 65 |lass.sta|tic.Sele|
|000021c0| 63 74 57 61 79 70 6f 69 | 6e 74 28 20 52 61 77 4d |ctWaypoi|nt( RawM|
|000021d0| 6f 76 65 6d 65 6e 74 47 | 6f 61 6c 2c 20 4d 6f 76 |ovementG|oal, Mov|
|000021e0| 69 6e 67 41 63 74 6f 72 | 2c 20 43 6f 6e 73 74 72 |ingActor|, Constr|
|000021f0| 61 69 6e 65 72 2c 20 47 | 6f 61 6c 20 29 20 29 0d |ainer, G|oal ) ).|
|00002200| 0a 09 09 7b 0d 0a 09 09 | 09 52 61 77 4d 6f 76 65 |...{....|.RawMove|
|00002210| 6d 65 6e 74 47 6f 61 6c | 2e 47 65 74 47 6f 61 6c |mentGoal|.GetGoal|
|00002220| 4c 6f 63 61 74 69 6f 6e | 28 20 4d 6f 76 69 6e 67 |Location|( Moving|
|00002230| 41 63 74 6f 72 2c 20 49 | 6e 69 74 69 61 6c 57 61 |Actor, I|nitialWa|
|00002240| 79 70 6f 69 6e 74 4c 6f | 63 61 74 69 6f 6e 20 29 |ypointLo|cation )|
|00002250| 3b 0d 0a 09 09 7d 0d 0a | 09 09 65 6c 73 65 0d 0a |;....}..|..else..|
|00002260| 09 09 7b 0d 0a 09 09 09 | 49 6e 69 74 69 61 6c 57 |..{.....|InitialW|
|00002270| 61 79 70 6f 69 6e 74 4c | 6f 63 61 74 69 6f 6e 20 |aypointL|ocation |
|00002280| 3d 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 2e 4c 6f |= Moving|Actor.Lo|
|00002290| 63 61 74 69 6f 6e 3b 0d | 0a 09 09 7d 0d 0a 09 09 |cation;.|...}....|
|000022a0| 0d 0a 09 09 69 66 28 20 | 4d 6f 76 65 6d 65 6e 74 |....if( |Movement|
|000022b0| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 73 5b |PatternE|lements[|
|000022c0| 20 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 49 | Pattern|ElementI|
|000022d0| 64 78 20 5d 2e 4d 50 45 | 5f 57 61 79 70 6f 69 6e |dx ].MPE|_Waypoin|
|000022e0| 74 50 61 72 61 6d 73 2e | 57 50 5f 62 41 70 70 6c |tParams.|WP_bAppl|
|000022f0| 79 4f 66 66 73 65 74 44 | 69 72 65 63 74 69 6f 6e |yOffsetD|irection|
|00002300| 20 29 0d 0a 09 09 7b 0d | 0a 09 09 09 57 61 79 70 | )....{.|....Wayp|
|00002310| 6f 69 6e 74 4f 66 66 73 | 65 74 44 69 72 65 63 74 |ointOffs|etDirect|
|00002320| 69 6f 6e 20 3d 20 4e 6f | 72 6d 61 6c 28 20 4d 6f |ion = No|rmal( Mo|
|00002330| 76 65 6d 65 6e 74 50 61 | 74 74 65 72 6e 45 6c 65 |vementPa|tternEle|
|00002340| 6d 65 6e 74 73 5b 20 50 | 61 74 74 65 72 6e 45 6c |ments[ P|atternEl|
|00002350| 65 6d 65 6e 74 49 64 78 | 20 5d 2e 4d 50 45 5f 57 |ementIdx| ].MPE_W|
|00002360| 61 79 70 6f 69 6e 74 50 | 61 72 61 6d 73 2e 57 50 |aypointP|arams.WP|
|00002370| 5f 4f 66 66 73 65 74 44 | 69 72 65 63 74 69 6f 6e |_OffsetD|irection|
|00002380| 20 29 20 3e 3e 20 4d 6f | 76 69 6e 67 41 63 74 6f | ) >> Mo|vingActo|
|00002390| 72 2e 52 6f 74 61 74 69 | 6f 6e 3b 0d 0a 09 09 7d |r.Rotati|on;....}|
|000023a0| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 7b 0d 0a 09 |....else|....{...|
|000023b0| 09 09 57 61 79 70 6f 69 | 6e 74 4f 66 66 73 65 74 |..Waypoi|ntOffset|
|000023c0| 44 69 72 65 63 74 69 6f | 6e 20 3d 20 4e 6f 72 6d |Directio|n = Norm|
|000023d0| 61 6c 28 20 49 6e 69 74 | 69 61 6c 57 61 79 70 6f |al( Init|ialWaypo|
|000023e0| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 20 2d 20 4d 6f |intLocat|ion - Mo|
|000023f0| 76 69 6e 67 41 63 74 6f | 72 2e 4c 6f 63 61 74 69 |vingActo|r.Locati|
|00002400| 6f 6e 20 29 3b 0d 0a 09 | 09 7d 0d 0a 09 09 0d 0a |on );...|.}......|
|00002410| 09 09 69 66 28 20 56 53 | 69 7a 65 28 20 57 61 79 |..if( VS|ize( Way|
|00002420| 70 6f 69 6e 74 4f 66 66 | 73 65 74 44 69 72 65 63 |pointOff|setDirec|
|00002430| 74 69 6f 6e 20 29 20 7e | 3d 20 30 20 29 0d 0a 09 |tion ) ~|= 0 )...|
|00002440| 09 7b 0d 0a 09 09 09 2f | 2f 74 68 69 73 20 69 73 |.{...../|/this is|
|00002450| 20 68 61 6e 64 6c 69 6e | 67 20 73 6f 6d 65 74 68 | handlin|g someth|
|00002460| 69 6e 67 20 74 68 61 74 | 20 69 74 20 72 65 61 6c |ing that| it real|
|00002470| 6c 79 20 61 6e 20 65 72 | 72 6f 72 20 63 6f 6e 64 |ly an er|ror cond|
|00002480| 69 74 69 6f 6e 3f 0d 0a | 09 09 09 57 61 79 70 6f |ition?..|...Waypo|
|00002490| 69 6e 74 4f 66 66 73 65 | 74 44 69 72 65 63 74 69 |intOffse|tDirecti|
|000024a0| 6f 6e 20 3d 20 56 65 63 | 74 6f 72 28 20 4d 6f 76 |on = Vec|tor( Mov|
|000024b0| 69 6e 67 41 63 74 6f 72 | 2e 52 6f 74 61 74 69 6f |ingActor|.Rotatio|
|000024c0| 6e 20 29 3b 0d 0a 09 09 | 7d 0d 0a 09 09 0d 0a 09 |n );....|}.......|
|000024d0| 09 69 66 28 20 4d 6f 76 | 65 6d 65 6e 74 50 61 74 |.if( Mov|ementPat|
|000024e0| 74 65 72 6e 45 6c 65 6d | 65 6e 74 73 5b 20 50 61 |ternElem|ents[ Pa|
|000024f0| 74 74 65 72 6e 45 6c 65 | 6d 65 6e 74 49 64 78 20 |tternEle|mentIdx |
|00002500| 5d 2e 4d 50 45 5f 57 61 | 79 70 6f 69 6e 74 50 61 |].MPE_Wa|ypointPa|
|00002510| 72 61 6d 73 2e 57 50 5f | 62 41 70 70 6c 79 4f 66 |rams.WP_|bApplyOf|
|00002520| 66 73 65 74 44 69 73 74 | 61 6e 63 65 20 29 0d 0a |fsetDist|ance )..|
|00002530| 09 09 7b 0d 0a 09 09 09 | 57 61 79 70 6f 69 6e 74 |..{.....|Waypoint|
|00002540| 4f 66 66 73 65 74 44 69 | 73 74 61 6e 63 65 20 3d |OffsetDi|stance =|
|00002550| 20 4d 6f 76 65 6d 65 6e | 74 50 61 74 74 65 72 6e | Movemen|tPattern|
|00002560| 45 6c 65 6d 65 6e 74 73 | 5b 20 50 61 74 74 65 72 |Elements|[ Patter|
|00002570| 6e 45 6c 65 6d 65 6e 74 | 49 64 78 20 5d 2e 4d 50 |nElement|Idx ].MP|
|00002580| 45 5f 57 61 79 70 6f 69 | 6e 74 50 61 72 61 6d 73 |E_Waypoi|ntParams|
|00002590| 2e 57 50 5f 4f 66 66 73 | 65 74 44 69 73 74 61 6e |.WP_Offs|etDistan|
|000025a0| 63 65 20 2b 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |ce + Mov|ingActor|
|000025b0| 2e 43 6f 6c 6c 69 73 69 | 6f 6e 52 61 64 69 75 73 |.Collisi|onRadius|
|000025c0| 3b 0d 0a 09 09 7d 0d 0a | 0d 0a 2f 2a 0d 0a 09 09 |;....}..|../*....|
|000025d0| 65 6c 73 65 0d 0a 09 09 | 7b 0d 0a 09 09 09 2f 2f |else....|{.....//|
|000025e0| 67 65 74 20 61 73 20 63 | 6c 6f 73 65 20 74 6f 20 |get as c|lose to |
|000025f0| 74 68 65 20 67 6f 61 6c | 20 61 73 20 70 6f 73 73 |the goal| as poss|
|00002600| 69 62 6c 65 0d 0a 09 09 | 09 52 61 77 4d 6f 76 65 |ible....|.RawMove|
|00002610| 6d 65 6e 74 47 6f 61 6c | 2e 47 65 74 47 6f 61 6c |mentGoal|.GetGoal|
|00002620| 44 69 73 74 61 6e 63 65 | 28 20 4d 6f 76 69 6e 67 |Distance|( Moving|
|00002630| 41 63 74 6f 72 2c 20 57 | 61 79 70 6f 69 6e 74 4f |Actor, W|aypointO|
|00002640| 66 66 73 65 74 44 69 73 | 74 61 6e 63 65 2c 20 4d |ffsetDis|tance, M|
|00002650| 6f 76 69 6e 67 41 63 74 | 6f 72 20 29 3b 0d 0a 09 |ovingAct|or );...|
|00002660| 09 7d 0d 0a 2a 2f 0d 0a | 09 09 0d 0a 09 09 69 66 |.}..*/..|......if|
|00002670| 28 20 4d 6f 76 65 6d 65 | 6e 74 50 61 74 74 65 72 |( Moveme|ntPatter|
|00002680| 6e 45 6c 65 6d 65 6e 74 | 73 5b 20 50 61 74 74 65 |nElement|s[ Patte|
|00002690| 72 6e 45 6c 65 6d 65 6e | 74 49 64 78 20 5d 2e 4d |rnElemen|tIdx ].M|
|000026a0| 50 45 5f 62 41 70 70 6c | 79 53 70 65 65 64 20 29 |PE_bAppl|ySpeed )|
|000026b0| 0d 0a 09 09 7b 0d 0a 09 | 09 09 2f 2f 73 65 74 20 |....{...|..//set |
|000026c0| 74 68 65 20 73 70 65 65 | 64 20 62 61 73 65 64 20 |the spee|d based |
|000026d0| 6f 6e 20 74 68 65 20 73 | 70 65 65 64 20 6f 66 20 |on the s|peed of |
|000026e0| 74 68 65 20 70 61 74 74 | 65 72 6e 0d 0a 09 09 09 |the patt|ern.....|
|000026f0| 52 61 77 4d 6f 76 65 6d | 65 6e 74 47 6f 61 6c 2e |RawMovem|entGoal.|
|00002700| 53 65 74 53 75 67 67 65 | 73 74 65 64 53 70 65 65 |SetSugge|stedSpee|
|00002710| 64 28 20 4d 6f 76 69 6e | 67 41 63 74 6f 72 2c 20 |d( Movin|gActor, |
|00002720| 4d 6f 76 65 6d 65 6e 74 | 50 61 74 74 65 72 6e 45 |Movement|PatternE|
|00002730| 6c 65 6d 65 6e 74 73 5b | 20 50 61 74 74 65 72 6e |lements[| Pattern|
|00002740| 45 6c 65 6d 65 6e 74 49 | 64 78 20 5d 2e 4d 50 45 |ElementI|dx ].MPE|
|00002750| 5f 53 70 65 65 64 20 29 | 3b 0d 0a 09 09 7d 0d 0a |_Speed )|;....}..|
|00002760| 09 09 65 6c 73 65 0d 0a | 09 09 7b 0d 0a 09 09 09 |..else..|..{.....|
|00002770| 2f 2f 73 65 74 20 74 68 | 65 20 73 70 65 65 64 20 |//set th|e speed |
|00002780| 62 61 73 65 64 20 6f 6e | 20 74 68 65 20 73 75 67 |based on| the sug|
|00002790| 67 65 73 74 65 64 20 73 | 70 65 65 64 20 6f 66 20 |gested s|peed of |
|000027a0| 74 68 65 20 67 6f 61 6c | 0d 0a 09 09 09 52 61 77 |the goal|.....Raw|
|000027b0| 4d 6f 76 65 6d 65 6e 74 | 47 6f 61 6c 2e 53 65 74 |Movement|Goal.Set|
|000027c0| 53 75 67 67 65 73 74 65 | 64 53 70 65 65 64 28 20 |Suggeste|dSpeed( |
|000027d0| 4d 6f 76 69 6e 67 41 63 | 74 6f 72 2c 20 47 6f 61 |MovingAc|tor, Goa|
|000027e0| 6c 2e 47 65 74 53 75 67 | 67 65 73 74 65 64 53 70 |l.GetSug|gestedSp|
|000027f0| 65 65 64 28 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |eed( Mov|ingActor|
|00002800| 20 29 20 29 3b 0d 0a 09 | 09 7d 0d 0a 2f 2a 0d 0a | ) );...|.}../*..|
|00002810| 2f 2f 78 78 78 72 6c 6f | 66 75 74 75 72 65 0d 0a |//xxxrlo|future..|
|00002820| 09 09 69 66 28 20 4d 6f | 76 65 6d 65 6e 74 50 61 |..if( Mo|vementPa|
|00002830| 74 74 65 72 6e 45 6c 65 | 6d 65 6e 74 73 5b 20 50 |tternEle|ments[ P|
|00002840| 61 74 74 65 72 6e 45 6c | 65 6d 65 6e 74 49 64 78 |atternEl|ementIdx|
|00002850| 20 5d 2e 4d 50 45 5f 62 | 41 70 70 6c 79 50 61 75 | ].MPE_b|ApplyPau|
|00002860| 73 65 54 69 6d 65 20 29 | 0d 0a 09 09 7b 0d 0a 09 |seTime )|....{...|
|00002870| 09 09 2f 2f 73 65 74 20 | 74 68 65 20 70 61 75 73 |..//set |the paus|
|00002880| 65 20 74 69 6d 65 20 69 | 6e 20 74 68 65 20 62 65 |e time i|n the be|
|00002890| 68 61 76 69 6f 72 20 63 | 6f 6e 73 74 72 61 69 6e |havior c|onstrain|
|000028a0| 65 72 0d 0a 09 09 7d 0d | 0a 09 09 65 6c 73 65 0d |er....}.|...else.|
|000028b0| 0a 09 09 7b 0d 0a 09 09 | 09 2f 2f 63 6c 65 61 72 |...{....|.//clear|
|000028c0| 20 74 68 65 20 70 61 75 | 73 65 20 74 69 6d 65 20 | the pau|se time |
|000028d0| 69 6e 20 74 68 65 20 62 | 65 68 61 76 69 6f 72 20 |in the b|ehavior |
|000028e0| 63 6f 6e 73 74 72 61 69 | 6e 65 72 0d 0a 09 09 7d |constrai|ner....}|
|000028f0| 0d 0a 2a 2f 09 09 0d 0a | 09 09 63 6c 61 73 73 27 |..*/....|..class'|
|00002900| 44 65 62 75 67 27 2e 73 | 74 61 74 69 63 2e 44 65 |Debug'.s|tatic.De|
|00002910| 62 75 67 4c 6f 67 28 20 | 4d 6f 76 69 6e 67 41 63 |bugLog( |MovingAc|
|00002920| 74 6f 72 2c 20 22 53 65 | 6c 65 63 74 57 61 79 70 |tor, "Se|lectWayp|
|00002930| 6f 69 6e 74 46 72 6f 6d | 50 61 74 74 65 72 6e 45 |ointFrom|PatternE|
|00002940| 6c 65 6d 65 6e 74 20 57 | 50 5f 62 41 70 70 6c 79 |lement W|P_bApply|
|00002950| 4f 66 66 73 65 74 44 69 | 72 65 63 74 69 6f 6e 22 |OffsetDi|rection"|
|00002960| 20 24 20 4d 6f 76 65 6d | 65 6e 74 50 61 74 74 65 | $ Movem|entPatte|
|00002970| 72 6e 45 6c 65 6d 65 6e | 74 73 5b 20 50 61 74 74 |rnElemen|ts[ Patt|
|00002980| 65 72 6e 45 6c 65 6d 65 | 6e 74 49 64 78 20 5d 2e |ernEleme|ntIdx ].|
|00002990| 4d 50 45 5f 57 61 79 70 | 6f 69 6e 74 50 61 72 61 |MPE_Wayp|ointPara|
|000029a0| 6d 73 2e 57 50 5f 62 41 | 70 70 6c 79 4f 66 66 73 |ms.WP_bA|pplyOffs|
|000029b0| 65 74 44 69 72 65 63 74 | 69 6f 6e 2c 20 44 65 62 |etDirect|ion, Deb|
|000029c0| 75 67 43 61 74 65 67 6f | 72 79 4e 61 6d 65 20 29 |ugCatego|ryName )|
|000029d0| 3b 0d 0a 09 09 63 6c 61 | 73 73 27 44 65 62 75 67 |;....cla|ss'Debug|
|000029e0| 27 2e 73 74 61 74 69 63 | 2e 44 65 62 75 67 4c 6f |'.static|.DebugLo|
|000029f0| 67 28 20 4d 6f 76 69 6e | 67 41 63 74 6f 72 2c 20 |g( Movin|gActor, |
|00002a00| 22 53 65 6c 65 63 74 57 | 61 79 70 6f 69 6e 74 46 |"SelectW|aypointF|
|00002a10| 72 6f 6d 50 61 74 74 65 | 72 6e 45 6c 65 6d 65 6e |romPatte|rnElemen|
|00002a20| 74 20 57 61 79 70 6f 69 | 6e 74 4f 66 66 73 65 74 |t Waypoi|ntOffset|
|00002a30| 44 69 72 65 63 74 69 6f | 6e 20 22 20 24 20 57 61 |Directio|n " $ Wa|
|00002a40| 79 70 6f 69 6e 74 4f 66 | 66 73 65 74 44 69 72 65 |ypointOf|fsetDire|
|00002a50| 63 74 69 6f 6e 2c 20 44 | 65 62 75 67 43 61 74 65 |ction, D|ebugCate|
|00002a60| 67 6f 72 79 4e 61 6d 65 | 20 29 3b 0d 0a 09 09 0d |goryName| );.....|
|00002a70| 0a 09 09 63 6c 61 73 73 | 27 44 65 62 75 67 27 2e |...class|'Debug'.|
|00002a80| 73 74 61 74 69 63 2e 44 | 65 62 75 67 4c 6f 67 28 |static.D|ebugLog(|
|00002a90| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 22 53 | MovingA|ctor, "S|
|00002aa0| 65 6c 65 63 74 57 61 79 | 70 6f 69 6e 74 46 72 6f |electWay|pointFro|
|00002ab0| 6d 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 20 |mPattern|Element |
|00002ac0| 57 50 5f 62 41 70 70 6c | 79 4f 66 66 73 65 74 44 |WP_bAppl|yOffsetD|
|00002ad0| 69 73 74 61 6e 63 65 20 | 22 20 24 20 4d 6f 76 65 |istance |" $ Move|
|00002ae0| 6d 65 6e 74 50 61 74 74 | 65 72 6e 45 6c 65 6d 65 |mentPatt|ernEleme|
|00002af0| 6e 74 73 5b 20 50 61 74 | 74 65 72 6e 45 6c 65 6d |nts[ Pat|ternElem|
|00002b00| 65 6e 74 49 64 78 20 5d | 2e 4d 50 45 5f 57 61 79 |entIdx ]|.MPE_Way|
|00002b10| 70 6f 69 6e 74 50 61 72 | 61 6d 73 2e 57 50 5f 62 |pointPar|ams.WP_b|
|00002b20| 41 70 70 6c 79 4f 66 66 | 73 65 74 44 69 73 74 61 |ApplyOff|setDista|
|00002b30| 6e 63 65 2c 20 44 65 62 | 75 67 43 61 74 65 67 6f |nce, Deb|ugCatego|
|00002b40| 72 79 4e 61 6d 65 20 29 | 3b 0d 0a 09 09 63 6c 61 |ryName )|;....cla|
|00002b50| 73 73 27 44 65 62 75 67 | 27 2e 73 74 61 74 69 63 |ss'Debug|'.static|
|00002b60| 2e 44 65 62 75 67 4c 6f | 67 28 20 4d 6f 76 69 6e |.DebugLo|g( Movin|
|00002b70| 67 41 63 74 6f 72 2c 20 | 22 53 65 6c 65 63 74 57 |gActor, |"SelectW|
|00002b80| 61 79 70 6f 69 6e 74 46 | 72 6f 6d 50 61 74 74 65 |aypointF|romPatte|
|00002b90| 72 6e 45 6c 65 6d 65 6e | 74 20 57 61 79 70 6f 69 |rnElemen|t Waypoi|
|00002ba0| 6e 74 4f 66 66 73 65 74 | 44 69 73 74 61 6e 63 65 |ntOffset|Distance|
|00002bb0| 20 22 20 24 20 57 61 79 | 70 6f 69 6e 74 4f 66 66 | " $ Way|pointOff|
|00002bc0| 73 65 74 44 69 73 74 61 | 6e 63 65 2c 20 44 65 62 |setDista|nce, Deb|
|00002bd0| 75 67 43 61 74 65 67 6f | 72 79 4e 61 6d 65 20 29 |ugCatego|ryName )|
|00002be0| 3b 0d 0a 09 09 0d 0a 09 | 09 63 6c 61 73 73 27 44 |;.......|.class'D|
|00002bf0| 65 62 75 67 27 2e 73 74 | 61 74 69 63 2e 44 65 62 |ebug'.st|atic.Deb|
|00002c00| 75 67 4c 6f 67 28 20 4d | 6f 76 69 6e 67 41 63 74 |ugLog( M|ovingAct|
|00002c10| 6f 72 2c 20 22 53 65 6c | 65 63 74 57 61 79 70 6f |or, "Sel|ectWaypo|
|00002c20| 69 6e 74 46 72 6f 6d 50 | 61 74 74 65 72 6e 45 6c |intFromP|atternEl|
|00002c30| 65 6d 65 6e 74 20 57 50 | 5f 62 53 65 6c 65 63 74 |ement WP|_bSelect|
|00002c40| 57 61 79 70 6f 69 6e 74 | 20 22 20 24 20 4d 6f 76 |Waypoint| " $ Mov|
|00002c50| 65 6d 65 6e 74 50 61 74 | 74 65 72 6e 45 6c 65 6d |ementPat|ternElem|
|00002c60| 65 6e 74 73 5b 20 50 61 | 74 74 65 72 6e 45 6c 65 |ents[ Pa|tternEle|
|00002c70| 6d 65 6e 74 49 64 78 20 | 5d 2e 4d 50 45 5f 57 61 |mentIdx |].MPE_Wa|
|00002c80| 79 70 6f 69 6e 74 50 61 | 72 61 6d 73 2e 57 50 5f |ypointPa|rams.WP_|
|00002c90| 62 53 65 6c 65 63 74 57 | 61 79 70 6f 69 6e 74 2c |bSelectW|aypoint,|
|00002ca0| 20 44 65 62 75 67 43 61 | 74 65 67 6f 72 79 4e 61 | DebugCa|tegoryNa|
|00002cb0| 6d 65 20 29 3b 0d 0a 09 | 09 63 6c 61 73 73 27 44 |me );...|.class'D|
|00002cc0| 65 62 75 67 27 2e 73 74 | 61 74 69 63 2e 44 65 62 |ebug'.st|atic.Deb|
|00002cd0| 75 67 4c 6f 67 28 20 4d | 6f 76 69 6e 67 41 63 74 |ugLog( M|ovingAct|
|00002ce0| 6f 72 2c 20 22 53 65 6c | 65 63 74 57 61 79 70 6f |or, "Sel|ectWaypo|
|00002cf0| 69 6e 74 46 72 6f 6d 50 | 61 74 74 65 72 6e 45 6c |intFromP|atternEl|
|00002d00| 65 6d 65 6e 74 20 49 6e | 69 74 69 61 6c 57 61 79 |ement In|itialWay|
|00002d10| 70 6f 69 6e 74 4c 6f 63 | 61 74 69 6f 6e 20 22 20 |pointLoc|ation " |
|00002d20| 24 20 49 6e 69 74 69 61 | 6c 57 61 79 70 6f 69 6e |$ Initia|lWaypoin|
|00002d30| 74 4c 6f 63 61 74 69 6f | 6e 2c 20 44 65 62 75 67 |tLocatio|n, Debug|
|00002d40| 43 61 74 65 67 6f 72 79 | 4e 61 6d 65 20 29 3b 0d |Category|Name );.|
|00002d50| 0a 09 09 63 6c 61 73 73 | 27 44 65 62 75 67 27 2e |...class|'Debug'.|
|00002d60| 73 74 61 74 69 63 2e 44 | 65 62 75 67 4c 6f 67 28 |static.D|ebugLog(|
|00002d70| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 22 53 | MovingA|ctor, "S|
|00002d80| 65 6c 65 63 74 57 61 79 | 70 6f 69 6e 74 46 72 6f |electWay|pointFro|
|00002d90| 6d 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 20 |mPattern|Element |
|00002da0| 49 6e 69 74 69 61 6c 57 | 61 79 70 6f 69 6e 74 20 |InitialW|aypoint |
|00002db0| 64 69 73 74 61 6e 63 65 | 20 22 20 24 20 56 53 69 |distance| " $ VSi|
|00002dc0| 7a 65 28 20 49 6e 69 74 | 69 61 6c 57 61 79 70 6f |ze( Init|ialWaypo|
|00002dd0| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 20 2d 20 4d 6f |intLocat|ion - Mo|
|00002de0| 76 69 6e 67 41 63 74 6f | 72 2e 4c 6f 63 61 74 69 |vingActo|r.Locati|
|00002df0| 6f 6e 20 29 2c 20 44 65 | 62 75 67 43 61 74 65 67 |on ), De|bugCateg|
|00002e00| 6f 72 79 4e 61 6d 65 20 | 29 3b 0d 0a 09 09 0d 0a |oryName |);......|
|00002e10| 09 09 57 61 79 70 6f 69 | 6e 74 4f 66 66 73 65 74 |..Waypoi|ntOffset|
|00002e20| 20 3d 20 57 61 79 70 6f | 69 6e 74 4f 66 66 73 65 | = Waypo|intOffse|
|00002e30| 74 44 69 72 65 63 74 69 | 6f 6e 20 2a 20 57 61 79 |tDirecti|on * Way|
|00002e40| 70 6f 69 6e 74 4f 66 66 | 73 65 74 44 69 73 74 61 |pointOff|setDista|
|00002e50| 6e 63 65 3b 0d 0a 09 09 | 63 6c 61 73 73 27 44 65 |nce;....|class'De|
|00002e60| 62 75 67 27 2e 73 74 61 | 74 69 63 2e 44 65 62 75 |bug'.sta|tic.Debu|
|00002e70| 67 4c 6f 67 28 20 4d 6f | 76 69 6e 67 41 63 74 6f |gLog( Mo|vingActo|
|00002e80| 72 2c 20 22 53 65 6c 65 | 63 74 57 61 79 70 6f 69 |r, "Sele|ctWaypoi|
|00002e90| 6e 74 46 72 6f 6d 50 61 | 74 74 65 72 6e 45 6c 65 |ntFromPa|tternEle|
|00002ea0| 6d 65 6e 74 20 57 61 79 | 70 6f 69 6e 74 4f 66 66 |ment Way|pointOff|
|00002eb0| 73 65 74 20 22 20 24 20 | 57 61 79 70 6f 69 6e 74 |set " $ |Waypoint|
|00002ec0| 4f 66 66 73 65 74 2c 20 | 44 65 62 75 67 43 61 74 |Offset, |DebugCat|
|00002ed0| 65 67 6f 72 79 4e 61 6d | 65 20 29 3b 0d 0a 09 09 |egoryNam|e );....|
|00002ee0| 0d 0a 09 09 57 61 79 70 | 6f 69 6e 74 4c 6f 63 61 |....Wayp|ointLoca|
|00002ef0| 74 69 6f 6e 20 3d 20 49 | 6e 69 74 69 61 6c 57 61 |tion = I|nitialWa|
|00002f00| 79 70 6f 69 6e 74 4c 6f | 63 61 74 69 6f 6e 20 2b |ypointLo|cation +|
|00002f10| 20 57 61 79 70 6f 69 6e | 74 4f 66 66 73 65 74 3b | Waypoin|tOffset;|
|00002f20| 0d 0a 09 09 63 6c 61 73 | 73 27 44 65 62 75 67 27 |....clas|s'Debug'|
|00002f30| 2e 73 74 61 74 69 63 2e | 44 65 62 75 67 4c 6f 67 |.static.|DebugLog|
|00002f40| 28 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 2c 20 22 |( Moving|Actor, "|
|00002f50| 53 65 6c 65 63 74 57 61 | 79 70 6f 69 6e 74 46 72 |SelectWa|ypointFr|
|00002f60| 6f 6d 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |omPatter|nElement|
|00002f70| 20 57 61 79 70 6f 69 6e | 74 4c 6f 63 61 74 69 6f | Waypoin|tLocatio|
|00002f80| 6e 20 28 75 73 69 6e 67 | 20 77 61 79 70 6f 69 6e |n (using| waypoin|
|00002f90| 74 20 6f 66 66 73 65 74 | 29 20 22 20 24 20 57 61 |t offset|) " $ Wa|
|00002fa0| 79 70 6f 69 6e 74 4c 6f | 63 61 74 69 6f 6e 2c 20 |ypointLo|cation, |
|00002fb0| 44 65 62 75 67 43 61 74 | 65 67 6f 72 79 4e 61 6d |DebugCat|egoryNam|
|00002fc0| 65 20 29 3b 0d 0a 09 09 | 63 6c 61 73 73 27 44 65 |e );....|class'De|
|00002fd0| 62 75 67 27 2e 73 74 61 | 74 69 63 2e 44 65 62 75 |bug'.sta|tic.Debu|
|00002fe0| 67 4c 6f 67 28 20 4d 6f | 76 69 6e 67 41 63 74 6f |gLog( Mo|vingActo|
|00002ff0| 72 2c 20 22 53 65 6c 65 | 63 74 57 61 79 70 6f 69 |r, "Sele|ctWaypoi|
|00003000| 6e 74 46 72 6f 6d 50 61 | 74 74 65 72 6e 45 6c 65 |ntFromPa|tternEle|
|00003010| 6d 65 6e 74 20 57 61 79 | 70 6f 69 6e 74 20 64 69 |ment Way|point di|
|00003020| 73 74 61 6e 63 65 20 22 | 20 24 20 56 53 69 7a 65 |stance "| $ VSize|
|00003030| 28 20 57 61 79 70 6f 69 | 6e 74 4c 6f 63 61 74 69 |( Waypoi|ntLocati|
|00003040| 6f 6e 20 2d 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |on - Mov|ingActor|
|00003050| 2e 4c 6f 63 61 74 69 6f | 6e 20 29 2c 20 44 65 62 |.Locatio|n ), Deb|
|00003060| 75 67 43 61 74 65 67 6f | 72 79 4e 61 6d 65 20 29 |ugCatego|ryName )|
|00003070| 3b 0d 0a 09 09 0d 0a 09 | 09 2f 2f 61 64 6a 75 73 |;.......|.//adjus|
|00003080| 74 20 74 68 65 20 77 61 | 79 70 6f 69 6e 74 20 6c |t the wa|ypoint l|
|00003090| 6f 63 61 74 69 6f 6e 20 | 62 61 73 65 64 20 6f 6e |ocation |based on|
|000030a0| 20 74 68 65 20 64 69 73 | 74 61 6e 63 65 20 62 65 | the dis|tance be|
|000030b0| 74 77 65 65 6e 20 74 68 | 65 20 73 65 6c 65 63 74 |tween th|e select|
|000030c0| 65 64 20 77 61 79 70 6f | 69 6e 74 20 6c 6f 63 61 |ed waypo|int loca|
|000030d0| 74 69 6f 6e 20 61 6e 64 | 20 74 68 65 20 6c 6f 63 |tion and| the loc|
|000030e0| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 6d 6f 76 |ation of| the mov|
|000030f0| 69 6e 67 20 61 63 74 6f | 72 0d 0a 09 09 41 64 6a |ing acto|r....Adj|
|00003100| 75 73 74 57 61 79 70 6f | 69 6e 74 4c 6f 63 61 74 |ustWaypo|intLocat|
|00003110| 69 6f 6e 28 20 57 61 79 | 70 6f 69 6e 74 4c 6f 63 |ion( Way|pointLoc|
|00003120| 61 74 69 6f 6e 2c 20 4d | 6f 76 69 6e 67 41 63 74 |ation, M|ovingAct|
|00003130| 6f 72 2c 20 57 61 79 70 | 6f 69 6e 74 4c 6f 63 61 |or, Wayp|ointLoca|
|00003140| 74 69 6f 6e 2c 20 28 20 | 56 53 69 7a 65 28 20 57 |tion, ( |VSize( W|
|00003150| 61 79 70 6f 69 6e 74 4c | 6f 63 61 74 69 6f 6e 20 |aypointL|ocation |
|00003160| 2d 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 2e 4c 6f |- Moving|Actor.Lo|
|00003170| 63 61 74 69 6f 6e 20 29 | 20 2d 20 4d 6f 76 69 6e |cation )| - Movin|
|00003180| 67 41 63 74 6f 72 2e 43 | 6f 6c 6c 69 73 69 6f 6e |gActor.C|ollision|
|00003190| 52 61 64 69 75 73 20 29 | 2c 0d 0a 09 09 09 09 4d |Radius )|,......M|
|000031a0| 6f 76 65 6d 65 6e 74 50 | 61 74 74 65 72 6e 45 6c |ovementP|atternEl|
|000031b0| 65 6d 65 6e 74 73 5b 20 | 50 61 74 74 65 72 6e 45 |ements[ |PatternE|
|000031c0| 6c 65 6d 65 6e 74 49 64 | 78 20 5d 2e 4d 50 45 5f |lementId|x ].MPE_|
|000031d0| 57 61 79 70 6f 69 6e 74 | 50 61 72 61 6d 73 2e 57 |Waypoint|Params.W|
|000031e0| 50 5f 52 65 71 54 72 61 | 76 65 6c 44 69 73 74 61 |P_ReqTra|velDista|
|000031f0| 6e 63 65 20 2b 20 4d 6f | 76 69 6e 67 41 63 74 6f |nce + Mo|vingActo|
|00003200| 72 2e 43 6f 6c 6c 69 73 | 69 6f 6e 52 61 64 69 75 |r.Collis|ionRadiu|
|00003210| 73 2c 0d 0a 09 09 09 09 | 4d 6f 76 65 6d 65 6e 74 |s,......|Movement|
|00003220| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 73 5b |PatternE|lements[|
|00003230| 20 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 49 | Pattern|ElementI|
|00003240| 64 78 20 5d 2e 4d 50 45 | 5f 57 61 79 70 6f 69 6e |dx ].MPE|_Waypoin|
|00003250| 74 50 61 72 61 6d 73 2e | 57 50 5f 52 65 71 54 72 |tParams.|WP_ReqTr|
|00003260| 61 76 65 6c 44 69 73 74 | 61 6e 63 65 52 65 6c 20 |avelDist|anceRel |
|00003270| 29 3b 0d 0a 09 09 63 6c | 61 73 73 27 44 65 62 75 |);....cl|ass'Debu|
|00003280| 67 27 2e 73 74 61 74 69 | 63 2e 44 65 62 75 67 4c |g'.stati|c.DebugL|
|00003290| 6f 67 28 20 4d 6f 76 69 | 6e 67 41 63 74 6f 72 2c |og( Movi|ngActor,|
|000032a0| 20 22 53 65 6c 65 63 74 | 57 61 79 70 6f 69 6e 74 | "Select|Waypoint|
|000032b0| 46 72 6f 6d 50 61 74 74 | 65 72 6e 45 6c 65 6d 65 |FromPatt|ernEleme|
|000032c0| 6e 74 20 57 61 79 70 6f | 69 6e 74 4c 6f 63 61 74 |nt Waypo|intLocat|
|000032d0| 69 6f 6e 20 28 65 6e 66 | 6f 72 63 65 20 64 69 73 |ion (enf|orce dis|
|000032e0| 74 61 6e 63 65 20 66 72 | 6f 6d 20 6d 6f 76 69 6e |tance fr|om movin|
|000032f0| 67 20 61 63 74 6f 72 29 | 20 22 20 24 20 57 61 79 |g actor)| " $ Way|
|00003300| 70 6f 69 6e 74 4c 6f 63 | 61 74 69 6f 6e 2c 20 44 |pointLoc|ation, D|
|00003310| 65 62 75 67 43 61 74 65 | 67 6f 72 79 4e 61 6d 65 |ebugCate|goryName|
|00003320| 20 29 3b 0d 0a 09 09 63 | 6c 61 73 73 27 44 65 62 | );....c|lass'Deb|
|00003330| 75 67 27 2e 73 74 61 74 | 69 63 2e 44 65 62 75 67 |ug'.stat|ic.Debug|
|00003340| 4c 6f 67 28 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |Log( Mov|ingActor|
|00003350| 2c 20 22 53 65 6c 65 63 | 74 57 61 79 70 6f 69 6e |, "Selec|tWaypoin|
|00003360| 74 46 72 6f 6d 50 61 74 | 74 65 72 6e 45 6c 65 6d |tFromPat|ternElem|
|00003370| 65 6e 74 20 57 61 79 70 | 6f 69 6e 74 20 64 69 73 |ent Wayp|oint dis|
|00003380| 74 61 6e 63 65 20 22 20 | 24 20 56 53 69 7a 65 28 |tance " |$ VSize(|
|00003390| 20 57 61 79 70 6f 69 6e | 74 4c 6f 63 61 74 69 6f | Waypoin|tLocatio|
|000033a0| 6e 20 2d 20 4d 6f 76 69 | 6e 67 41 63 74 6f 72 2e |n - Movi|ngActor.|
|000033b0| 4c 6f 63 61 74 69 6f 6e | 20 29 2c 20 44 65 62 75 |Location| ), Debu|
|000033c0| 67 43 61 74 65 67 6f 72 | 79 4e 61 6d 65 20 29 3b |gCategor|yName );|
|000033d0| 0d 0a 09 09 0d 0a 09 09 | 2f 2f 67 65 74 20 74 68 |........|//get th|
|000033e0| 65 20 64 69 73 74 61 6e | 63 65 20 74 68 61 74 20 |e distan|ce that |
|000033f0| 74 68 65 20 61 63 74 6f | 72 20 77 69 6c 6c 20 62 |the acto|r will b|
|00003400| 65 20 61 77 61 79 20 66 | 72 6f 6d 20 74 68 65 20 |e away f|rom the |
|00003410| 67 6f 61 6c 20 69 66 20 | 69 74 20 77 61 73 20 61 |goal if |it was a|
|00003420| 74 20 74 68 65 20 73 65 | 6c 65 63 74 65 64 20 77 |t the se|lected w|
|00003430| 61 79 70 6f 69 6e 74 0d | 0a 09 09 47 6f 61 6c 2e |aypoint.|...Goal.|
|00003440| 47 65 74 47 6f 61 6c 44 | 69 73 74 61 6e 63 65 54 |GetGoalD|istanceT|
|00003450| 6f 43 79 6c 69 6e 64 65 | 72 28 20 4d 6f 76 69 6e |oCylinde|r( Movin|
|00003460| 67 41 63 74 6f 72 2c 20 | 57 61 79 70 6f 69 6e 74 |gActor, |Waypoint|
|00003470| 44 69 73 74 61 6e 63 65 | 54 6f 47 6f 61 6c 2c 20 |Distance|ToGoal, |
|00003480| 57 61 79 70 6f 69 6e 74 | 4c 6f 63 61 74 69 6f 6e |Waypoint|Location|
|00003490| 2c 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 2e 43 6f |, Moving|Actor.Co|
|000034a0| 6c 6c 69 73 69 6f 6e 52 | 61 64 69 75 73 2c 20 4d |llisionR|adius, M|
|000034b0| 6f 76 69 6e 67 41 63 74 | 6f 72 2e 43 6f 6c 6c 69 |ovingAct|or.Colli|
|000034c0| 73 69 6f 6e 48 65 69 67 | 68 74 20 29 3b 0d 0a 09 |sionHeig|ht );...|
|000034d0| 09 47 6f 61 6c 2e 47 65 | 74 47 6f 61 6c 4c 6f 63 |.Goal.Ge|tGoalLoc|
|000034e0| 61 74 69 6f 6e 28 20 4d | 6f 76 69 6e 67 41 63 74 |ation( M|ovingAct|
|000034f0| 6f 72 2c 20 47 6f 61 6c | 4c 6f 63 61 74 69 6f 6e |or, Goal|Location|
|00003500| 20 29 3b 0d 0a 09 09 0d | 0a 09 09 2f 2f 61 64 6a | );.....|...//adj|
|00003510| 75 73 74 20 74 68 65 20 | 77 61 79 70 6f 69 6e 74 |ust the |waypoint|
|00003520| 20 6c 6f 63 61 74 69 6f | 6e 20 62 61 73 65 64 20 | locatio|n based |
|00003530| 6f 6e 20 74 68 65 20 64 | 69 73 74 61 6e 63 65 20 |on the d|istance |
|00003540| 62 65 74 77 65 65 6e 20 | 74 68 65 20 73 65 6c 65 |between |the sele|
|00003550| 63 74 65 64 20 77 61 79 | 70 6f 69 6e 74 20 6c 6f |cted way|point lo|
|00003560| 63 61 74 69 6f 6e 20 61 | 6e 64 20 74 68 65 20 6c |cation a|nd the l|
|00003570| 6f 63 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 67 |ocation |of the g|
|00003580| 6f 61 6c 0d 0a 09 09 41 | 64 6a 75 73 74 57 61 79 |oal....A|djustWay|
|00003590| 70 6f 69 6e 74 4c 6f 63 | 61 74 69 6f 6e 28 20 57 |pointLoc|ation( W|
|000035a0| 61 79 70 6f 69 6e 74 4c | 6f 63 61 74 69 6f 6e 2c |aypointL|ocation,|
|000035b0| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 47 6f | MovingA|ctor, Go|
|000035c0| 61 6c 4c 6f 63 61 74 69 | 6f 6e 2c 20 57 61 79 70 |alLocati|on, Wayp|
|000035d0| 6f 69 6e 74 44 69 73 74 | 61 6e 63 65 54 6f 47 6f |ointDist|anceToGo|
|000035e0| 61 6c 2c 0d 0a 09 09 09 | 09 4d 6f 76 65 6d 65 6e |al,.....|.Movemen|
|000035f0| 74 50 61 74 74 65 72 6e | 45 6c 65 6d 65 6e 74 73 |tPattern|Elements|
|00003600| 5b 20 50 61 74 74 65 72 | 6e 45 6c 65 6d 65 6e 74 |[ Patter|nElement|
|00003610| 49 64 78 20 5d 2e 4d 50 | 45 5f 57 61 79 70 6f 69 |Idx ].MP|E_Waypoi|
|00003620| 6e 74 50 61 72 61 6d 73 | 2e 57 50 5f 52 65 71 47 |ntParams|.WP_ReqG|
|00003630| 6f 61 6c 44 69 73 74 61 | 6e 63 65 2c 0d 0a 09 09 |oalDista|nce,....|
|00003640| 09 09 4d 6f 76 65 6d 65 | 6e 74 50 61 74 74 65 72 |..Moveme|ntPatter|
|00003650| 6e 45 6c 65 6d 65 6e 74 | 73 5b 20 50 61 74 74 65 |nElement|s[ Patte|
|00003660| 72 6e 45 6c 65 6d 65 6e | 74 49 64 78 20 5d 2e 4d |rnElemen|tIdx ].M|
|00003670| 50 45 5f 57 61 79 70 6f | 69 6e 74 50 61 72 61 6d |PE_Waypo|intParam|
|00003680| 73 2e 57 50 5f 52 65 71 | 47 6f 61 6c 44 69 73 74 |s.WP_Req|GoalDist|
|00003690| 61 6e 63 65 52 65 6c 20 | 29 3b 0d 0a 09 09 63 6c |anceRel |);....cl|
|000036a0| 61 73 73 27 44 65 62 75 | 67 27 2e 73 74 61 74 69 |ass'Debu|g'.stati|
|000036b0| 63 2e 44 65 62 75 67 4c | 6f 67 28 20 4d 6f 76 69 |c.DebugL|og( Movi|
|000036c0| 6e 67 41 63 74 6f 72 2c | 20 22 53 65 6c 65 63 74 |ngActor,| "Select|
|000036d0| 57 61 79 70 6f 69 6e 74 | 46 72 6f 6d 50 61 74 74 |Waypoint|FromPatt|
|000036e0| 65 72 6e 45 6c 65 6d 65 | 6e 74 20 57 61 79 70 6f |ernEleme|nt Waypo|
|000036f0| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 20 28 65 6e 66 |intLocat|ion (enf|
|00003700| 6f 72 63 65 20 64 69 73 | 74 61 6e 63 65 20 66 72 |orce dis|tance fr|
|00003710| 6f 6d 20 67 6f 61 6c 29 | 20 22 20 24 20 57 61 79 |om goal)| " $ Way|
|00003720| 70 6f 69 6e 74 4c 6f 63 | 61 74 69 6f 6e 2c 20 44 |pointLoc|ation, D|
|00003730| 65 62 75 67 43 61 74 65 | 67 6f 72 79 4e 61 6d 65 |ebugCate|goryName|
|00003740| 20 29 3b 0d 0a 09 09 63 | 6c 61 73 73 27 44 65 62 | );....c|lass'Deb|
|00003750| 75 67 27 2e 73 74 61 74 | 69 63 2e 44 65 62 75 67 |ug'.stat|ic.Debug|
|00003760| 4c 6f 67 28 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |Log( Mov|ingActor|
|00003770| 2c 20 22 53 65 6c 65 63 | 74 57 61 79 70 6f 69 6e |, "Selec|tWaypoin|
|00003780| 74 46 72 6f 6d 50 61 74 | 74 65 72 6e 45 6c 65 6d |tFromPat|ternElem|
|00003790| 65 6e 74 20 57 61 79 70 | 6f 69 6e 74 20 64 69 73 |ent Wayp|oint dis|
|000037a0| 74 61 6e 63 65 20 22 20 | 24 20 56 53 69 7a 65 28 |tance " |$ VSize(|
|000037b0| 20 57 61 79 70 6f 69 6e | 74 4c 6f 63 61 74 69 6f | Waypoin|tLocatio|
|000037c0| 6e 20 2d 20 4d 6f 76 69 | 6e 67 41 63 74 6f 72 2e |n - Movi|ngActor.|
|000037d0| 4c 6f 63 61 74 69 6f 6e | 20 29 2c 20 44 65 62 75 |Location| ), Debu|
|000037e0| 67 43 61 74 65 67 6f 72 | 79 4e 61 6d 65 20 29 3b |gCategor|yName );|
|000037f0| 0d 0a 09 09 0d 0a 09 09 | 52 61 77 4d 6f 76 65 6d |........|RawMovem|
|00003800| 65 6e 74 47 6f 61 6c 2e | 41 73 73 69 67 6e 56 65 |entGoal.|AssignVe|
|00003810| 63 74 6f 72 28 20 4d 6f | 76 69 6e 67 41 63 74 6f |ctor( Mo|vingActo|
|00003820| 72 2c 20 57 61 79 70 6f | 69 6e 74 4c 6f 63 61 74 |r, Waypo|intLocat|
|00003830| 69 6f 6e 20 29 3b 0d 0a | 09 09 0d 0a 09 09 2f 2f |ion );..|......//|
|00003840| 50 61 74 74 65 72 6e 45 | 6c 65 6d 65 6e 74 49 74 |PatternE|lementIt|
|00003850| 65 72 2e 47 65 74 4e 65 | 78 74 49 6e 64 65 78 28 |er.GetNe|xtIndex(|
|00003860| 29 3b 0d 0a 09 09 62 53 | 75 63 63 65 73 73 20 3d |);....bS|uccess =|
|00003870| 20 28 20 21 4d 6f 76 65 | 6d 65 6e 74 50 61 74 74 | ( !Move|mentPatt|
|00003880| 65 72 6e 45 6c 65 6d 65 | 6e 74 73 5b 20 50 61 74 |ernEleme|nts[ Pat|
|00003890| 74 65 72 6e 45 6c 65 6d | 65 6e 74 49 64 78 20 5d |ternElem|entIdx ]|
|000038a0| 2e 4d 50 45 5f 57 61 79 | 70 6f 69 6e 74 50 61 72 |.MPE_Way|pointPar|
|000038b0| 61 6d 73 2e 57 50 5f 62 | 52 65 71 75 69 72 65 52 |ams.WP_b|RequireR|
|000038c0| 65 61 63 68 61 62 6c 65 | 20 7c 7c 0d 0a 09 09 09 |eachable| ||.....|
|000038d0| 09 52 61 77 4d 6f 76 65 | 6d 65 6e 74 47 6f 61 6c |.RawMove|mentGoal|
|000038e0| 2e 49 73 47 6f 61 6c 52 | 65 61 63 68 61 62 6c 65 |.IsGoalR|eachable|
|000038f0| 28 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 20 29 20 |( Moving|Actor ) |
|00003900| 29 3b 0d 0a 09 7d 0d 0a | 09 63 6c 61 73 73 27 44 |);...}..|.class'D|
|00003910| 65 62 75 67 27 2e 73 74 | 61 74 69 63 2e 44 65 62 |ebug'.st|atic.Deb|
|00003920| 75 67 4c 6f 67 28 20 4d | 6f 76 69 6e 67 41 63 74 |ugLog( M|ovingAct|
|00003930| 6f 72 2c 20 22 53 65 6c | 65 63 74 57 61 79 70 6f |or, "Sel|ectWaypo|
|00003940| 69 6e 74 46 72 6f 6d 50 | 61 74 74 65 72 6e 45 6c |intFromP|atternEl|
|00003950| 65 6d 65 6e 74 20 72 65 | 74 75 72 6e 69 6e 67 20 |ement re|turning |
|00003960| 22 20 24 20 62 53 75 63 | 63 65 73 73 2c 20 44 65 |" $ bSuc|cess, De|
|00003970| 62 75 67 43 61 74 65 67 | 6f 72 79 4e 61 6d 65 20 |bugCateg|oryName |
|00003980| 29 3b 0d 0a 09 72 65 74 | 75 72 6e 20 62 53 75 63 |);...ret|urn bSuc|
|00003990| 63 65 73 73 3b 0d 0a 7d | 0d 0a 0d 0a 0d 0a 0d 0a |cess;..}|........|
|000039a0| 66 75 6e 63 74 69 6f 6e | 20 62 6f 6f 6c 20 53 65 |function| bool Se|
|000039b0| 6c 65 63 74 46 6f 63 75 | 73 46 72 6f 6d 50 61 74 |lectFocu|sFromPat|
|000039c0| 74 65 72 6e 45 6c 65 6d | 65 6e 74 28 20 47 6f 61 |ternElem|ent( Goa|
|000039d0| 6c 41 62 73 74 72 61 63 | 74 65 72 49 6e 74 65 72 |lAbstrac|terInter|
|000039e0| 66 20 46 6f 63 75 73 47 | 6f 61 6c 2c 0d 0a 09 09 |f FocusG|oal,....|
|000039f0| 41 63 74 6f 72 20 4d 6f | 76 69 6e 67 41 63 74 6f |Actor Mo|vingActo|
|00003a00| 72 2c 0d 0a 09 09 63 6c | 61 73 73 3c 46 6f 63 75 |r,....cl|ass<Focu|
|00003a10| 73 53 65 6c 65 63 74 6f | 72 49 6e 74 65 72 66 3e |sSelecto|rInterf>|
|00003a20| 20 46 63 73 53 65 6c 65 | 63 74 6f 72 43 6c 61 73 | FcsSele|ctorClas|
|00003a30| 73 2c 0d 0a 09 09 42 65 | 68 61 76 69 6f 72 43 6f |s,....Be|haviorCo|
|00003a40| 6e 73 74 72 61 69 6e 65 | 72 20 43 6f 6e 73 74 72 |nstraine|r Constr|
|00003a50| 61 69 6e 65 72 2c 0d 0a | 09 09 47 6f 61 6c 41 62 |ainer,..|..GoalAb|
|00003a60| 73 74 72 61 63 74 65 72 | 49 6e 74 65 72 66 20 47 |stracter|Interf G|
|00003a70| 6f 61 6c 2c 0d 0a 09 09 | 49 74 65 72 61 74 6f 72 |oal,....|Iterator|
|00003a80| 49 6e 74 65 72 66 20 50 | 61 74 74 65 72 6e 45 6c |Interf P|atternEl|
|00003a90| 65 6d 65 6e 74 49 74 65 | 72 20 29 0d 0a 7b 0d 0a |ementIte|r )..{..|
|00003aa0| 2f 2f 78 78 78 72 6c 6f | 66 75 74 75 72 65 0d 0a |//xxxrlo|future..|
|00003ab0| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0a |.return |false;..|
|00003ac0| 7d 0d 0a 0d 0a 0d 0a 0d | 0a 2f 2f 72 65 74 75 72 |}.......|.//retur|
|00003ad0| 6e 73 20 74 72 75 65 20 | 69 66 20 74 68 65 20 70 |ns true |if the p|
|00003ae0| 72 65 2d 72 65 71 75 69 | 73 69 74 65 20 67 6f 61 |re-requi|site goa|
|00003af0| 6c 20 64 69 73 74 61 6e | 63 65 20 77 61 73 20 73 |l distan|ce was s|
|00003b00| 61 74 69 73 66 69 65 64 | 20 0d 0a 2f 2f 72 65 74 |atisfied| ..//ret|
|00003b10| 75 72 6e 73 20 66 61 6c | 73 65 20 69 66 20 74 68 |urns fal|se if th|
|00003b20| 65 20 70 72 65 2d 72 65 | 71 75 69 73 69 74 65 20 |e pre-re|quisite |
|00003b30| 67 6f 61 6c 20 64 69 73 | 74 61 6e 63 65 20 77 61 |goal dis|tance wa|
|00003b40| 73 20 6e 6f 74 20 73 61 | 74 69 73 66 69 65 64 0d |s not sa|tisfied.|
|00003b50| 0a 2f 2f 69 66 20 66 61 | 6c 73 65 20 69 73 20 72 |.//if fa|lse is r|
|00003b60| 65 74 75 72 6e 65 64 20 | 74 68 65 20 72 61 77 20 |eturned |the raw |
|00003b70| 6d 6f 76 65 6d 65 6e 74 | 20 67 6f 61 6c 20 77 61 |movement| goal wa|
|00003b80| 73 20 61 64 6a 75 73 74 | 65 64 20 74 6f 20 6d 65 |s adjust|ed to me|
|00003b90| 65 74 20 74 68 65 20 67 | 6f 61 6c 20 64 69 73 74 |et the g|oal dist|
|00003ba0| 61 6e 63 65 20 72 65 71 | 75 69 72 65 6d 65 6e 74 |ance req|uirement|
|00003bb0| 0d 0a 73 74 61 74 69 63 | 20 66 75 6e 63 74 69 6f |..static| functio|
|00003bc0| 6e 20 62 6f 6f 6c 20 45 | 76 61 6c 75 61 74 65 50 |n bool E|valuateP|
|00003bd0| 72 65 72 65 71 75 69 73 | 69 74 65 47 6f 61 6c 44 |rerequis|iteGoalD|
|00003be0| 69 73 74 61 6e 63 65 28 | 20 47 6f 61 6c 41 62 73 |istance(| GoalAbs|
|00003bf0| 74 72 61 63 74 65 72 49 | 6e 74 65 72 66 20 52 61 |tracterI|nterf Ra|
|00003c00| 77 4d 6f 76 65 6d 65 6e | 74 47 6f 61 6c 2c 20 41 |wMovemen|tGoal, A|
|00003c10| 63 74 6f 72 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |ctor Mov|ingActor|
|00003c20| 2c 20 47 6f 61 6c 41 62 | 73 74 72 61 63 74 65 72 |, GoalAb|stracter|
|00003c30| 49 6e 74 65 72 66 20 47 | 6f 61 6c 20 29 0d 0a 7b |Interf G|oal )..{|
|00003c40| 0d 0a 09 6c 6f 63 61 6c | 20 66 6c 6f 61 74 20 47 |...local| float G|
|00003c50| 6f 61 6c 44 69 73 74 61 | 6e 63 65 3b 0d 0a 09 47 |oalDista|nce;...G|
|00003c60| 6f 61 6c 2e 47 65 74 47 | 6f 61 6c 44 69 73 74 61 |oal.GetG|oalDista|
|00003c70| 6e 63 65 28 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |nce( Mov|ingActor|
|00003c80| 2c 20 47 6f 61 6c 44 69 | 73 74 61 6e 63 65 2c 20 |, GoalDi|stance, |
|00003c90| 4d 6f 76 69 6e 67 41 63 | 74 6f 72 20 29 3b 0d 0a |MovingAc|tor );..|
|00003ca0| 09 63 6c 61 73 73 27 44 | 65 62 75 67 27 2e 73 74 |.class'D|ebug'.st|
|00003cb0| 61 74 69 63 2e 44 65 62 | 75 67 4c 6f 67 28 20 4d |atic.Deb|ugLog( M|
|00003cc0| 6f 76 69 6e 67 41 63 74 | 6f 72 2c 20 22 45 76 61 |ovingAct|or, "Eva|
|00003cd0| 6c 75 61 74 65 50 72 65 | 72 65 71 75 69 73 69 74 |luatePre|requisit|
|00003ce0| 65 47 6f 61 6c 44 69 73 | 74 61 6e 63 65 20 4d 6f |eGoalDis|tance Mo|
|00003cf0| 76 69 6e 67 41 63 74 6f | 72 2e 4c 6f 63 61 74 69 |vingActo|r.Locati|
|00003d00| 6f 6e 20 22 20 24 20 4d | 6f 76 69 6e 67 41 63 74 |on " $ M|ovingAct|
|00003d10| 6f 72 2e 4c 6f 63 61 74 | 69 6f 6e 2c 20 64 65 66 |or.Locat|ion, def|
|00003d20| 61 75 6c 74 2e 44 65 62 | 75 67 43 61 74 65 67 6f |ault.Deb|ugCatego|
|00003d30| 72 79 4e 61 6d 65 20 29 | 3b 0d 0a 09 72 65 74 75 |ryName )|;...retu|
|00003d40| 72 6e 20 21 41 64 6a 75 | 73 74 57 61 79 70 6f 69 |rn !Adju|stWaypoi|
|00003d50| 6e 74 28 20 52 61 77 4d | 6f 76 65 6d 65 6e 74 47 |nt( RawM|ovementG|
|00003d60| 6f 61 6c 2c 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |oal, Mov|ingActor|
|00003d70| 2c 20 47 6f 61 6c 2c 20 | 4d 6f 76 69 6e 67 41 63 |, Goal, |MovingAc|
|00003d80| 74 6f 72 2e 4c 6f 63 61 | 74 69 6f 6e 2c 20 47 6f |tor.Loca|tion, Go|
|00003d90| 61 6c 44 69 73 74 61 6e | 63 65 2c 20 64 65 66 61 |alDistan|ce, defa|
|00003da0| 75 6c 74 2e 50 72 65 52 | 65 71 47 6f 61 6c 44 69 |ult.PreR|eqGoalDi|
|00003db0| 73 74 61 6e 63 65 2c 20 | 64 65 66 61 75 6c 74 2e |stance, |default.|
|00003dc0| 50 72 65 52 65 71 44 69 | 73 74 61 6e 63 65 52 65 |PreReqDi|stanceRe|
|00003dd0| 6c 61 74 69 6f 6e 20 29 | 3b 0d 0a 7d 0d 0a 0d 0a |lation )|;..}....|
|00003de0| 0d 0a 0d 0a 2f 2a 0d 0a | 2f 2f 72 65 74 75 72 6e |..../*..|//return|
|00003df0| 73 20 74 72 75 65 20 69 | 66 20 74 68 65 20 70 6f |s true i|f the po|
|00003e00| 73 74 2d 72 65 71 75 69 | 73 69 74 65 20 67 6f 61 |st-requi|site goa|
|00003e10| 6c 20 64 69 73 74 61 6e | 63 65 20 77 61 73 20 73 |l distan|ce was s|
|00003e20| 61 74 69 73 66 69 65 64 | 20 0d 0a 2f 2f 72 65 74 |atisfied| ..//ret|
|00003e30| 75 72 6e 73 20 66 61 6c | 73 65 20 69 66 20 74 68 |urns fal|se if th|
|00003e40| 65 20 70 6f 73 74 2d 72 | 65 71 75 69 73 69 74 65 |e post-r|equisite|
|00003e50| 20 67 6f 61 6c 20 64 69 | 73 74 61 6e 63 65 20 77 | goal di|stance w|
|00003e60| 61 73 20 6e 6f 74 20 73 | 61 74 69 73 66 69 65 64 |as not s|atisfied|
|00003e70| 0d 0a 2f 2f 69 66 20 66 | 61 6c 73 65 20 69 73 20 |..//if f|alse is |
|00003e80| 72 65 74 75 72 6e 65 64 | 20 74 68 65 20 72 61 77 |returned| the raw|
|00003e90| 20 6d 6f 76 65 6d 65 6e | 74 20 67 6f 61 6c 20 77 | movemen|t goal w|
|00003ea0| 61 73 20 61 64 6a 75 73 | 74 65 64 20 74 6f 20 6d |as adjus|ted to m|
|00003eb0| 65 65 74 20 74 68 65 20 | 67 6f 61 6c 20 64 69 73 |eet the |goal dis|
|00003ec0| 74 61 6e 63 65 20 72 65 | 71 75 69 72 65 6d 65 6e |tance re|quiremen|
|00003ed0| 74 0d 0a 73 74 61 74 69 | 63 20 66 75 6e 63 74 69 |t..stati|c functi|
|00003ee0| 6f 6e 20 62 6f 6f 6c 20 | 45 76 61 6c 75 61 74 65 |on bool |Evaluate|
|00003ef0| 50 6f 73 74 72 65 71 75 | 69 73 69 74 65 47 6f 61 |Postrequ|isiteGoa|
|00003f00| 6c 44 69 73 74 61 6e 63 | 65 28 20 47 6f 61 6c 41 |lDistanc|e( GoalA|
|00003f10| 62 73 74 72 61 63 74 65 | 72 49 6e 74 65 72 66 20 |bstracte|rInterf |
|00003f20| 52 61 77 4d 6f 76 65 6d | 65 6e 74 47 6f 61 6c 2c |RawMovem|entGoal,|
|00003f30| 20 41 63 74 6f 72 20 4d | 6f 76 69 6e 67 41 63 74 | Actor M|ovingAct|
|00003f40| 6f 72 2c 20 47 6f 61 6c | 41 62 73 74 72 61 63 74 |or, Goal|Abstract|
|00003f50| 65 72 49 6e 74 65 72 66 | 20 47 6f 61 6c 20 29 0d |erInterf| Goal ).|
|00003f60| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 56 65 63 74 6f |.{...loc|al Vecto|
|00003f70| 72 20 57 61 79 70 6f 69 | 6e 74 4c 6f 63 61 74 69 |r Waypoi|ntLocati|
|00003f80| 6f 6e 3b 0d 0a 09 6c 6f | 63 61 6c 20 66 6c 6f 61 |on;...lo|cal floa|
|00003f90| 74 20 47 6f 61 6c 44 69 | 73 74 61 6e 63 65 3b 0d |t GoalDi|stance;.|
|00003fa0| 0a 09 47 6f 61 6c 2e 47 | 65 74 47 6f 61 6c 44 69 |..Goal.G|etGoalDi|
|00003fb0| 73 74 61 6e 63 65 28 20 | 4d 6f 76 69 6e 67 41 63 |stance( |MovingAc|
|00003fc0| 74 6f 72 2c 20 47 6f 61 | 6c 44 69 73 74 61 6e 63 |tor, Goa|lDistanc|
|00003fd0| 65 2c 20 52 61 77 4d 6f | 76 65 6d 65 6e 74 47 6f |e, RawMo|vementGo|
|00003fe0| 61 6c 20 29 3b 0d 0a 09 | 69 66 28 20 21 52 61 77 |al );...|if( !Raw|
|00003ff0| 4d 6f 76 65 6d 65 6e 74 | 47 6f 61 6c 2e 47 65 74 |Movement|Goal.Get|
|00004000| 47 6f 61 6c 4c 6f 63 61 | 74 69 6f 6e 28 20 4d 6f |GoalLoca|tion( Mo|
|00004010| 76 69 6e 67 41 63 74 6f | 72 2c 20 57 61 79 70 6f |vingActo|r, Waypo|
|00004020| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 20 29 20 29 0d |intLocat|ion ) ).|
|00004030| 0a 09 7b 0d 0a 09 09 57 | 61 79 70 6f 69 6e 74 4c |..{....W|aypointL|
|00004040| 6f 63 61 74 69 6f 6e 20 | 3d 20 4d 6f 76 69 6e 67 |ocation |= Moving|
|00004050| 41 63 74 6f 72 2e 4c 6f | 63 61 74 69 6f 6e 3b 0d |Actor.Lo|cation;.|
|00004060| 0a 09 7d 0d 0a 0d 0a 09 | 63 6c 61 73 73 27 44 65 |..}.....|class'De|
|00004070| 62 75 67 27 2e 73 74 61 | 74 69 63 2e 44 65 62 75 |bug'.sta|tic.Debu|
|00004080| 67 4c 6f 67 28 20 4d 6f | 76 69 6e 67 41 63 74 6f |gLog( Mo|vingActo|
|00004090| 72 2c 20 22 45 76 61 6c | 75 61 74 65 50 6f 73 74 |r, "Eval|uatePost|
|000040a0| 72 65 71 75 69 73 69 74 | 65 47 6f 61 6c 44 69 73 |requisit|eGoalDis|
|000040b0| 74 61 6e 63 65 20 57 61 | 79 70 6f 69 6e 74 4c 6f |tance Wa|ypointLo|
|000040c0| 63 61 74 69 6f 6e 20 22 | 20 24 20 57 61 79 70 6f |cation "| $ Waypo|
|000040d0| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 2c 20 64 65 66 |intLocat|ion, def|
|000040e0| 61 75 6c 74 2e 44 65 62 | 75 67 43 61 74 65 67 6f |ault.Deb|ugCatego|
|000040f0| 72 79 4e 61 6d 65 20 29 | 3b 0d 0a 09 2f 2f 78 78 |ryName )|;...//xx|
|00004100| 78 72 6c 6f 20 21 41 64 | 6a 75 73 74 57 61 79 70 |xrlo !Ad|justWayp|
|00004110| 6f 69 6e 74 28 20 52 61 | 77 4d 6f 76 65 6d 65 6e |oint( Ra|wMovemen|
|00004120| 74 47 6f 61 6c 2c 20 4d | 6f 76 69 6e 67 41 63 74 |tGoal, M|ovingAct|
|00004130| 6f 72 2c 20 47 6f 61 6c | 2c 20 57 61 79 70 6f 69 |or, Goal|, Waypoi|
|00004140| 6e 74 4c 6f 63 61 74 69 | 6f 6e 2c 20 47 6f 61 6c |ntLocati|on, Goal|
|00004150| 44 69 73 74 61 6e 63 65 | 2c 20 64 65 66 61 75 6c |Distance|, defaul|
|00004160| 74 2e 50 6f 73 74 52 65 | 71 47 6f 61 6c 44 69 73 |t.PostRe|qGoalDis|
|00004170| 74 61 6e 63 65 2c 20 64 | 65 66 61 75 6c 74 2e 50 |tance, d|efault.P|
|00004180| 6f 73 74 52 65 71 44 69 | 73 74 61 6e 63 65 52 65 |ostReqDi|stanceRe|
|00004190| 6c 61 74 69 6f 6e 20 29 | 3b 0d 0a 7d 0d 0a 2a 2f |lation )|;..}..*/|
|000041a0| 0d 0a 0d 0a 0d 0a 2f 2f | 72 65 74 75 72 6e 73 20 |......//|returns |
|000041b0| 74 72 75 65 20 69 66 20 | 74 68 65 20 72 61 77 20 |true if |the raw |
|000041c0| 77 61 79 70 6f 69 6e 74 | 20 67 6f 61 6c 20 77 61 |waypoint| goal wa|
|000041d0| 73 20 61 64 6a 75 73 74 | 65 64 0d 0a 73 74 61 74 |s adjust|ed..stat|
|000041e0| 69 63 20 66 75 6e 63 74 | 69 6f 6e 20 62 6f 6f 6c |ic funct|ion bool|
|000041f0| 20 41 64 6a 75 73 74 57 | 61 79 70 6f 69 6e 74 28 | AdjustW|aypoint(|
|00004200| 20 47 6f 61 6c 41 62 73 | 74 72 61 63 74 65 72 49 | GoalAbs|tracterI|
|00004210| 6e 74 65 72 66 20 52 61 | 77 4d 6f 76 65 6d 65 6e |nterf Ra|wMovemen|
|00004220| 74 47 6f 61 6c 2c 0d 0a | 09 09 41 63 74 6f 72 20 |tGoal,..|..Actor |
|00004230| 4d 6f 76 69 6e 67 41 63 | 74 6f 72 2c 0d 0a 09 09 |MovingAc|tor,....|
|00004240| 47 6f 61 6c 41 62 73 74 | 72 61 63 74 65 72 49 6e |GoalAbst|racterIn|
|00004250| 74 65 72 66 20 47 6f 61 | 6c 2c 0d 0a 09 09 56 65 |terf Goa|l,....Ve|
|00004260| 63 74 6f 72 20 44 65 73 | 69 72 65 64 57 61 79 70 |ctor Des|iredWayp|
|00004270| 6f 69 6e 74 4c 6f 63 61 | 74 69 6f 6e 2c 0d 0a 09 |ointLoca|tion,...|
|00004280| 09 66 6c 6f 61 74 20 47 | 6f 61 6c 44 69 73 74 61 |.float G|oalDista|
|00004290| 6e 63 65 2c 0d 0a 09 09 | 66 6c 6f 61 74 20 52 65 |nce,....|float Re|
|000042a0| 71 75 69 72 65 64 47 6f | 61 6c 44 69 73 74 61 6e |quiredGo|alDistan|
|000042b0| 63 65 54 6f 57 61 79 70 | 6f 69 6e 74 2c 0d 0a 09 |ceToWayp|oint,...|
|000042c0| 09 45 52 65 6c 61 74 69 | 6f 6e 61 6c 52 65 71 75 |.ERelati|onalRequ|
|000042d0| 69 72 65 6d 65 6e 74 20 | 52 65 6c 61 74 69 6f 6e |irement |Relation|
|000042e0| 61 6c 52 65 71 20 29 0d | 0a 7b 0d 0a 09 6c 6f 63 |alReq ).|.{...loc|
|000042f0| 61 6c 20 62 6f 6f 6c 20 | 62 50 61 73 73 65 64 50 |al bool |bPassedP|
|00004300| 72 65 72 65 71 75 69 73 | 69 74 65 47 6f 61 6c 44 |rerequis|iteGoalD|
|00004310| 69 73 74 61 6e 63 65 3b | 0d 0a 09 6c 6f 63 61 6c |istance;|...local|
|00004320| 20 56 65 63 74 6f 72 20 | 47 6f 61 6c 4c 6f 63 61 | Vector |GoalLoca|
|00004330| 74 69 6f 6e 3b 0d 0a 09 | 0d 0a 09 47 6f 61 6c 2e |tion;...|...Goal.|
|00004340| 47 65 74 47 6f 61 6c 4c | 6f 63 61 74 69 6f 6e 28 |GetGoalL|ocation(|
|00004350| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 47 6f | MovingA|ctor, Go|
|00004360| 61 6c 4c 6f 63 61 74 69 | 6f 6e 20 29 3b 0d 0a 09 |alLocati|on );...|
|00004370| 62 50 61 73 73 65 64 50 | 72 65 72 65 71 75 69 73 |bPassedP|rerequis|
|00004380| 69 74 65 47 6f 61 6c 44 | 69 73 74 61 6e 63 65 20 |iteGoalD|istance |
|00004390| 3d 20 41 64 6a 75 73 74 | 57 61 79 70 6f 69 6e 74 |= Adjust|Waypoint|
|000043a0| 4c 6f 63 61 74 69 6f 6e | 28 20 44 65 73 69 72 65 |Location|( Desire|
|000043b0| 64 57 61 79 70 6f 69 6e | 74 4c 6f 63 61 74 69 6f |dWaypoin|tLocatio|
|000043c0| 6e 2c 20 4d 6f 76 69 6e | 67 41 63 74 6f 72 2c 20 |n, Movin|gActor, |
|000043d0| 47 6f 61 6c 4c 6f 63 61 | 74 69 6f 6e 2c 20 47 6f |GoalLoca|tion, Go|
|000043e0| 61 6c 44 69 73 74 61 6e | 63 65 2c 20 52 65 71 75 |alDistan|ce, Requ|
|000043f0| 69 72 65 64 47 6f 61 6c | 44 69 73 74 61 6e 63 65 |iredGoal|Distance|
|00004400| 54 6f 57 61 79 70 6f 69 | 6e 74 2c 20 52 65 6c 61 |ToWaypoi|nt, Rela|
|00004410| 74 69 6f 6e 61 6c 52 65 | 71 20 29 3b 0d 0a 09 69 |tionalRe|q );...i|
|00004420| 66 28 20 62 50 61 73 73 | 65 64 50 72 65 72 65 71 |f( bPass|edPrereq|
|00004430| 75 69 73 69 74 65 47 6f | 61 6c 44 69 73 74 61 6e |uisiteGo|alDistan|
|00004440| 63 65 20 29 0d 0a 09 7b | 0d 0a 09 09 52 61 77 4d |ce )...{|....RawM|
|00004450| 6f 76 65 6d 65 6e 74 47 | 6f 61 6c 2e 41 73 73 69 |ovementG|oal.Assi|
|00004460| 67 6e 56 65 63 74 6f 72 | 28 20 4d 6f 76 69 6e 67 |gnVector|( Moving|
|00004470| 41 63 74 6f 72 2c 20 44 | 65 73 69 72 65 64 57 61 |Actor, D|esiredWa|
|00004480| 79 70 6f 69 6e 74 4c 6f | 63 61 74 69 6f 6e 20 29 |ypointLo|cation )|
|00004490| 3b 0d 0a 09 7d 0d 0a 09 | 72 65 74 75 72 6e 20 62 |;...}...|return b|
|000044a0| 50 61 73 73 65 64 50 72 | 65 72 65 71 75 69 73 69 |PassedPr|erequisi|
|000044b0| 74 65 47 6f 61 6c 44 69 | 73 74 61 6e 63 65 3b 0d |teGoalDi|stance;.|
|000044c0| 0a 7d 0d 0a 0d 0a 0d 0a | 0d 0a 2f 2f 72 65 74 75 |.}......|..//retu|
|000044d0| 72 6e 73 20 74 72 75 65 | 20 69 66 20 74 68 65 20 |rns true| if the |
|000044e0| 77 61 79 70 6f 69 6e 74 | 20 6c 6f 63 61 74 69 6f |waypoint| locatio|
|000044f0| 6e 20 77 61 73 20 61 64 | 6a 75 73 74 65 64 0d 0a |n was ad|justed..|
|00004500| 73 74 61 74 69 63 20 66 | 75 6e 63 74 69 6f 6e 20 |static f|unction |
|00004510| 62 6f 6f 6c 20 41 64 6a | 75 73 74 57 61 79 70 6f |bool Adj|ustWaypo|
|00004520| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 28 20 6f 75 74 |intLocat|ion( out|
|00004530| 20 56 65 63 74 6f 72 20 | 57 61 79 70 6f 69 6e 74 | Vector |Waypoint|
|00004540| 4c 6f 63 61 74 69 6f 6e | 2c 0d 0a 09 09 41 63 74 |Location|,....Act|
|00004550| 6f 72 20 4d 6f 76 69 6e | 67 41 63 74 6f 72 2c 0d |or Movin|gActor,.|
|00004560| 0a 09 09 56 65 63 74 6f | 72 20 47 6f 61 6c 4c 6f |...Vecto|r GoalLo|
|00004570| 63 61 74 69 6f 6e 2c 0d | 0a 09 09 66 6c 6f 61 74 |cation,.|...float|
|00004580| 20 47 6f 61 6c 44 69 73 | 74 61 6e 63 65 2c 0d 0a | GoalDis|tance,..|
|00004590| 09 09 66 6c 6f 61 74 20 | 52 65 71 75 69 72 65 64 |..float |Required|
|000045a0| 47 6f 61 6c 44 69 73 74 | 61 6e 63 65 54 6f 57 61 |GoalDist|anceToWa|
|000045b0| 79 70 6f 69 6e 74 2c 0d | 0a 09 09 45 52 65 6c 61 |ypoint,.|...ERela|
|000045c0| 74 69 6f 6e 61 6c 52 65 | 71 75 69 72 65 6d 65 6e |tionalRe|quiremen|
|000045d0| 74 20 52 65 6c 61 74 69 | 6f 6e 61 6c 52 65 71 20 |t Relati|onalReq |
|000045e0| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 66 6c 6f |)..{...l|ocal flo|
|000045f0| 61 74 20 44 69 73 74 61 | 6e 63 65 44 69 66 66 65 |at Dista|nceDiffe|
|00004600| 72 65 6e 63 65 3b 0d 0a | 09 6c 6f 63 61 6c 20 56 |rence;..|.local V|
|00004610| 65 63 74 6f 72 20 57 61 | 79 70 6f 69 6e 74 44 69 |ector Wa|ypointDi|
|00004620| 72 65 63 74 69 6f 6e 3b | 0d 0a 09 6c 6f 63 61 6c |rection;|...local|
|00004630| 20 62 6f 6f 6c 20 62 50 | 61 73 73 65 64 47 6f 61 | bool bP|assedGoa|
|00004640| 6c 44 69 73 74 61 6e 63 | 65 52 65 71 3b 0d 0a 09 |lDistanc|eReq;...|
|00004650| 0d 0a 09 44 69 73 74 61 | 6e 63 65 44 69 66 66 65 |...Dista|nceDiffe|
|00004660| 72 65 6e 63 65 20 3d 20 | 47 6f 61 6c 44 69 73 74 |rence = |GoalDist|
|00004670| 61 6e 63 65 20 2d 20 52 | 65 71 75 69 72 65 64 47 |ance - R|equiredG|
|00004680| 6f 61 6c 44 69 73 74 61 | 6e 63 65 54 6f 57 61 79 |oalDista|nceToWay|
|00004690| 70 6f 69 6e 74 3b 0d 0a | 09 62 50 61 73 73 65 64 |point;..|.bPassed|
|000046a0| 47 6f 61 6c 44 69 73 74 | 61 6e 63 65 52 65 71 20 |GoalDist|anceReq |
|000046b0| 3d 20 45 76 61 6c 75 61 | 74 65 52 65 71 75 69 73 |= Evalua|teRequis|
|000046c0| 69 74 65 47 6f 61 6c 44 | 69 73 74 61 6e 63 65 28 |iteGoalD|istance(|
|000046d0| 20 44 69 73 74 61 6e 63 | 65 44 69 66 66 65 72 65 | Distanc|eDiffere|
|000046e0| 6e 63 65 2c 20 52 65 6c | 61 74 69 6f 6e 61 6c 52 |nce, Rel|ationalR|
|000046f0| 65 71 20 29 3b 0d 0a 09 | 0d 0a 09 63 6c 61 73 73 |eq );...|...class|
|00004700| 27 44 65 62 75 67 27 2e | 73 74 61 74 69 63 2e 44 |'Debug'.|static.D|
|00004710| 65 62 75 67 4c 6f 67 28 | 20 4d 6f 76 69 6e 67 41 |ebugLog(| MovingA|
|00004720| 63 74 6f 72 2c 20 22 41 | 64 6a 75 73 74 57 61 79 |ctor, "A|djustWay|
|00004730| 70 6f 69 6e 74 4c 6f 63 | 61 74 69 6f 6e 20 52 65 |pointLoc|ation Re|
|00004740| 6c 61 74 69 6f 6e 61 6c | 52 65 71 20 22 20 24 20 |lational|Req " $ |
|00004750| 52 65 6c 61 74 69 6f 6e | 61 6c 52 65 71 2c 20 64 |Relation|alReq, d|
|00004760| 65 66 61 75 6c 74 2e 44 | 65 62 75 67 43 61 74 65 |efault.D|ebugCate|
|00004770| 67 6f 72 79 4e 61 6d 65 | 20 29 3b 0d 0a 09 63 6c |goryName| );...cl|
|00004780| 61 73 73 27 44 65 62 75 | 67 27 2e 73 74 61 74 69 |ass'Debu|g'.stati|
|00004790| 63 2e 44 65 62 75 67 4c | 6f 67 28 20 4d 6f 76 69 |c.DebugL|og( Movi|
|000047a0| 6e 67 41 63 74 6f 72 2c | 20 22 41 64 6a 75 73 74 |ngActor,| "Adjust|
|000047b0| 57 61 79 70 6f 69 6e 74 | 4c 6f 63 61 74 69 6f 6e |Waypoint|Location|
|000047c0| 20 62 50 61 73 73 65 64 | 47 6f 61 6c 44 69 73 74 | bPassed|GoalDist|
|000047d0| 61 6e 63 65 52 65 71 20 | 22 20 24 20 62 50 61 73 |anceReq |" $ bPas|
|000047e0| 73 65 64 47 6f 61 6c 44 | 69 73 74 61 6e 63 65 52 |sedGoalD|istanceR|
|000047f0| 65 71 2c 20 64 65 66 61 | 75 6c 74 2e 44 65 62 75 |eq, defa|ult.Debu|
|00004800| 67 43 61 74 65 67 6f 72 | 79 4e 61 6d 65 20 29 3b |gCategor|yName );|
|00004810| 0d 0a 09 63 6c 61 73 73 | 27 44 65 62 75 67 27 2e |...class|'Debug'.|
|00004820| 73 74 61 74 69 63 2e 44 | 65 62 75 67 4c 6f 67 28 |static.D|ebugLog(|
|00004830| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 22 41 | MovingA|ctor, "A|
|00004840| 64 6a 75 73 74 57 61 79 | 70 6f 69 6e 74 4c 6f 63 |djustWay|pointLoc|
|00004850| 61 74 69 6f 6e 20 47 6f | 61 6c 44 69 73 74 61 6e |ation Go|alDistan|
|00004860| 63 65 20 22 20 24 20 47 | 6f 61 6c 44 69 73 74 61 |ce " $ G|oalDista|
|00004870| 6e 63 65 2c 20 64 65 66 | 61 75 6c 74 2e 44 65 62 |nce, def|ault.Deb|
|00004880| 75 67 43 61 74 65 67 6f | 72 79 4e 61 6d 65 20 29 |ugCatego|ryName )|
|00004890| 3b 0d 0a 09 63 6c 61 73 | 73 27 44 65 62 75 67 27 |;...clas|s'Debug'|
|000048a0| 2e 73 74 61 74 69 63 2e | 44 65 62 75 67 4c 6f 67 |.static.|DebugLog|
|000048b0| 28 20 4d 6f 76 69 6e 67 | 41 63 74 6f 72 2c 20 22 |( Moving|Actor, "|
|000048c0| 41 64 6a 75 73 74 57 61 | 79 70 6f 69 6e 74 4c 6f |AdjustWa|ypointLo|
|000048d0| 63 61 74 69 6f 6e 20 52 | 65 71 75 69 72 65 64 47 |cation R|equiredG|
|000048e0| 6f 61 6c 44 69 73 74 61 | 6e 63 65 54 6f 57 61 79 |oalDista|nceToWay|
|000048f0| 70 6f 69 6e 74 20 22 20 | 24 20 52 65 71 75 69 72 |point " |$ Requir|
|00004900| 65 64 47 6f 61 6c 44 69 | 73 74 61 6e 63 65 54 6f |edGoalDi|stanceTo|
|00004910| 57 61 79 70 6f 69 6e 74 | 2c 20 64 65 66 61 75 6c |Waypoint|, defaul|
|00004920| 74 2e 44 65 62 75 67 43 | 61 74 65 67 6f 72 79 4e |t.DebugC|ategoryN|
|00004930| 61 6d 65 20 29 3b 0d 0a | 09 63 6c 61 73 73 27 44 |ame );..|.class'D|
|00004940| 65 62 75 67 27 2e 73 74 | 61 74 69 63 2e 44 65 62 |ebug'.st|atic.Deb|
|00004950| 75 67 4c 6f 67 28 20 4d | 6f 76 69 6e 67 41 63 74 |ugLog( M|ovingAct|
|00004960| 6f 72 2c 20 22 41 64 6a | 75 73 74 57 61 79 70 6f |or, "Adj|ustWaypo|
|00004970| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 20 44 69 73 74 |intLocat|ion Dist|
|00004980| 61 6e 63 65 44 69 66 66 | 65 72 65 6e 63 65 20 22 |anceDiff|erence "|
|00004990| 20 24 20 44 69 73 74 61 | 6e 63 65 44 69 66 66 65 | $ Dista|nceDiffe|
|000049a0| 72 65 6e 63 65 2c 20 64 | 65 66 61 75 6c 74 2e 44 |rence, d|efault.D|
|000049b0| 65 62 75 67 43 61 74 65 | 67 6f 72 79 4e 61 6d 65 |ebugCate|goryName|
|000049c0| 20 29 3b 0d 0a 0d 0a 09 | 69 66 28 20 21 62 50 61 | );.....|if( !bPa|
|000049d0| 73 73 65 64 47 6f 61 6c | 44 69 73 74 61 6e 63 65 |ssedGoal|Distance|
|000049e0| 52 65 71 20 29 0d 0a 09 | 7b 0d 0a 09 09 69 66 28 |Req )...|{....if(|
|000049f0| 20 47 6f 61 6c 4c 6f 63 | 61 74 69 6f 6e 20 3d 3d | GoalLoc|ation ==|
|00004a00| 20 57 61 79 70 6f 69 6e | 74 4c 6f 63 61 74 69 6f | Waypoin|tLocatio|
|00004a10| 6e 20 29 0d 0a 09 09 7b | 0d 0a 09 09 09 57 61 79 |n )....{|.....Way|
|00004a20| 70 6f 69 6e 74 44 69 72 | 65 63 74 69 6f 6e 20 3d |pointDir|ection =|
|00004a30| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2e 4c 6f 63 | MovingA|ctor.Loc|
|00004a40| 61 74 69 6f 6e 20 2d 20 | 57 61 79 70 6f 69 6e 74 |ation - |Waypoint|
|00004a50| 4c 6f 63 61 74 69 6f 6e | 3b 0d 0a 09 09 7d 0d 0a |Location|;....}..|
|00004a60| 09 09 65 6c 73 65 0d 0a | 09 09 7b 0d 0a 09 09 09 |..else..|..{.....|
|00004a70| 57 61 79 70 6f 69 6e 74 | 44 69 72 65 63 74 69 6f |Waypoint|Directio|
|00004a80| 6e 20 3d 20 47 6f 61 6c | 4c 6f 63 61 74 69 6f 6e |n = Goal|Location|
|00004a90| 20 2d 20 57 61 79 70 6f | 69 6e 74 4c 6f 63 61 74 | - Waypo|intLocat|
|00004aa0| 69 6f 6e 3b 0d 0a 09 09 | 7d 0d 0a 09 09 57 61 79 |ion;....|}....Way|
|00004ab0| 70 6f 69 6e 74 44 69 72 | 65 63 74 69 6f 6e 2e 5a |pointDir|ection.Z|
|00004ac0| 20 3d 20 30 3b 0d 0a 09 | 09 57 61 79 70 6f 69 6e | = 0;...|.Waypoin|
|00004ad0| 74 44 69 72 65 63 74 69 | 6f 6e 20 3d 20 4e 6f 72 |tDirecti|on = Nor|
|00004ae0| 6d 61 6c 28 20 57 61 79 | 70 6f 69 6e 74 44 69 72 |mal( Way|pointDir|
|00004af0| 65 63 74 69 6f 6e 20 29 | 3b 0d 0a 09 09 0d 0a 09 |ection )|;.......|
|00004b00| 09 0d 0a 09 09 63 6c 61 | 73 73 27 44 65 62 75 67 |.....cla|ss'Debug|
|00004b10| 27 2e 73 74 61 74 69 63 | 2e 44 65 62 75 67 4c 6f |'.static|.DebugLo|
|00004b20| 67 28 20 4d 6f 76 69 6e | 67 41 63 74 6f 72 2c 20 |g( Movin|gActor, |
|00004b30| 22 41 64 6a 75 73 74 57 | 61 79 70 6f 69 6e 74 4c |"AdjustW|aypointL|
|00004b40| 6f 63 61 74 69 6f 6e 20 | 47 6f 61 6c 4c 6f 63 61 |ocation |GoalLoca|
|00004b50| 74 69 6f 6e 20 22 20 24 | 20 47 6f 61 6c 4c 6f 63 |tion " $| GoalLoc|
|00004b60| 61 74 69 6f 6e 2c 20 64 | 65 66 61 75 6c 74 2e 44 |ation, d|efault.D|
|00004b70| 65 62 75 67 43 61 74 65 | 67 6f 72 79 4e 61 6d 65 |ebugCate|goryName|
|00004b80| 20 29 3b 0d 0a 09 09 63 | 6c 61 73 73 27 44 65 62 | );....c|lass'Deb|
|00004b90| 75 67 27 2e 73 74 61 74 | 69 63 2e 44 65 62 75 67 |ug'.stat|ic.Debug|
|00004ba0| 4c 6f 67 28 20 4d 6f 76 | 69 6e 67 41 63 74 6f 72 |Log( Mov|ingActor|
|00004bb0| 2c 20 22 41 64 6a 75 73 | 74 57 61 79 70 6f 69 6e |, "Adjus|tWaypoin|
|00004bc0| 74 4c 6f 63 61 74 69 6f | 6e 20 57 61 79 70 6f 69 |tLocatio|n Waypoi|
|00004bd0| 6e 74 44 69 72 65 63 74 | 69 6f 6e 20 22 20 24 20 |ntDirect|ion " $ |
|00004be0| 57 61 79 70 6f 69 6e 74 | 44 69 72 65 63 74 69 6f |Waypoint|Directio|
|00004bf0| 6e 2c 20 64 65 66 61 75 | 6c 74 2e 44 65 62 75 67 |n, defau|lt.Debug|
|00004c00| 43 61 74 65 67 6f 72 79 | 4e 61 6d 65 20 29 3b 0d |Category|Name );.|
|00004c10| 0a 09 09 63 6c 61 73 73 | 27 44 65 62 75 67 27 2e |...class|'Debug'.|
|00004c20| 73 74 61 74 69 63 2e 44 | 65 62 75 67 4c 6f 67 28 |static.D|ebugLog(|
|00004c30| 20 4d 6f 76 69 6e 67 41 | 63 74 6f 72 2c 20 22 41 | MovingA|ctor, "A|
|00004c40| 64 6a 75 73 74 57 61 79 | 70 6f 69 6e 74 4c 6f 63 |djustWay|pointLoc|
|00004c50| 61 74 69 6f 6e 20 57 61 | 79 70 6f 69 6e 74 4c 6f |ation Wa|ypointLo|
|00004c60| 63 61 74 69 6f 6e 20 22 | 20 24 20 57 61 79 70 6f |cation "| $ Waypo|
|00004c70| 69 6e 74 4c 6f 63 61 74 | 69 6f 6e 2c 20 64 65 66 |intLocat|ion, def|
|00004c80| 61 75 6c 74 2e 44 65 62 | 75 67 43 61 74 65 67 6f |ault.Deb|ugCatego|
|00004c90| 72 79 4e 61 6d 65 20 29 | 3b 0d 0a 09 09 57 61 79 |ryName )|;....Way|
|00004ca0| 70 6f 69 6e 74 4c 6f 63 | 61 74 69 6f 6e 20 2b 3d |pointLoc|ation +=|
|00004cb0| 20 57 61 79 70 6f 69 6e | 74 44 69 72 65 63 74 69 | Waypoin|tDirecti|
|00004cc0| 6f 6e 20 2a 20 44 69 73 | 74 61 6e 63 65 44 69 66 |on * Dis|tanceDif|
|00004cd0| 66 65 72 65 6e 63 65 3b | 0d 0a 09 09 63 6c 61 73 |ference;|....clas|
|00004ce0| 73 27 44 65 62 75 67 27 | 2e 73 74 61 74 69 63 2e |s'Debug'|.static.|
|00004cf0| 44 65 62 75 67 4c 6f 67 | 28 20 4d 6f 76 69 6e 67 |DebugLog|( Moving|
|00004d00| 41 63 74 6f 72 2c 20 22 | 41 64 6a 75 73 74 57 61 |Actor, "|AdjustWa|
|00004d10| 79 70 6f 69 6e 74 4c 6f | 63 61 74 69 6f 6e 20 57 |ypointLo|cation W|
|00004d20| 61 79 70 6f 69 6e 74 4c | 6f 63 61 74 69 6f 6e 20 |aypointL|ocation |
|00004d30| 22 20 24 20 57 61 79 70 | 6f 69 6e 74 4c 6f 63 61 |" $ Wayp|ointLoca|
|00004d40| 74 69 6f 6e 2c 20 64 65 | 66 61 75 6c 74 2e 44 65 |tion, de|fault.De|
|00004d50| 62 75 67 43 61 74 65 67 | 6f 72 79 4e 61 6d 65 20 |bugCateg|oryName |
|00004d60| 29 3b 0d 0a 09 7d 0d 0a | 09 72 65 74 75 72 6e 20 |);...}..|.return |
|00004d70| 21 62 50 61 73 73 65 64 | 47 6f 61 6c 44 69 73 74 |!bPassed|GoalDist|
|00004d80| 61 6e 63 65 52 65 71 3b | 0d 0a 7d 0d 0a 0d 0a 0d |anceReq;|..}.....|
|00004d90| 0a 0d 0a 73 74 61 74 69 | 63 20 66 75 6e 63 74 69 |...stati|c functi|
|00004da0| 6f 6e 20 62 6f 6f 6c 20 | 45 76 61 6c 75 61 74 65 |on bool |Evaluate|
|00004db0| 52 65 71 75 69 73 69 74 | 65 47 6f 61 6c 44 69 73 |Requisit|eGoalDis|
|00004dc0| 74 61 6e 63 65 28 20 66 | 6c 6f 61 74 20 44 69 73 |tance( f|loat Dis|
|00004dd0| 74 61 6e 63 65 44 69 66 | 66 65 72 65 6e 63 65 2c |tanceDif|ference,|
|00004de0| 20 45 52 65 6c 61 74 69 | 6f 6e 61 6c 52 65 71 75 | ERelati|onalRequ|
|00004df0| 69 72 65 6d 65 6e 74 20 | 52 65 6c 61 74 69 6f 6e |irement |Relation|
|00004e00| 61 6c 52 65 71 20 29 0d | 0a 7b 0d 0a 09 72 65 74 |alReq ).|.{...ret|
|00004e10| 75 72 6e 20 45 76 61 6c | 75 61 74 65 52 65 71 75 |urn Eval|uateRequ|
|00004e20| 69 73 69 74 65 56 61 6c | 75 65 28 20 44 69 73 74 |isiteVal|ue( Dist|
|00004e30| 61 6e 63 65 44 69 66 66 | 65 72 65 6e 63 65 2c 20 |anceDiff|erence, |
|00004e40| 52 65 6c 61 74 69 6f 6e | 61 6c 52 65 71 2c 20 64 |Relation|alReq, d|
|00004e50| 65 66 61 75 6c 74 2e 47 | 6f 61 6c 44 69 73 74 61 |efault.G|oalDista|
|00004e60| 6e 63 65 54 6f 6c 65 72 | 61 6e 63 65 20 29 3b 0d |nceToler|ance );.|
|00004e70| 0a 7d 0d 0a 0d 0a 0d 0a | 0d 0a 73 74 61 74 69 63 |.}......|..static|
|00004e80| 20 66 75 6e 63 74 69 6f | 6e 20 62 6f 6f 6c 20 45 | functio|n bool E|
|00004e90| 76 61 6c 75 61 74 65 52 | 65 71 75 69 73 69 74 65 |valuateR|equisite|
|00004ea0| 56 61 6c 75 65 28 20 66 | 6c 6f 61 74 20 52 65 71 |Value( f|loat Req|
|00004eb0| 75 69 73 69 74 65 56 61 | 6c 75 65 2c 20 45 52 65 |uisiteVa|lue, ERe|
|00004ec0| 6c 61 74 69 6f 6e 61 6c | 52 65 71 75 69 72 65 6d |lational|Requirem|
|00004ed0| 65 6e 74 20 52 65 6c 61 | 74 69 6f 6e 61 6c 52 65 |ent Rela|tionalRe|
|00004ee0| 71 2c 20 6f 70 74 69 6f | 6e 61 6c 20 66 6c 6f 61 |q, optio|nal floa|
|00004ef0| 74 20 54 6f 6c 65 72 61 | 6e 63 65 20 29 0d 0a 7b |t Tolera|nce )..{|
|00004f00| 0d 0a 09 6c 6f 63 61 6c | 20 62 6f 6f 6c 20 62 50 |...local| bool bP|
|00004f10| 61 73 73 65 64 52 65 71 | 75 69 73 69 74 65 3b 0d |assedReq|uisite;.|
|00004f20| 0a 09 73 77 69 74 63 68 | 28 20 52 65 6c 61 74 69 |..switch|( Relati|
|00004f30| 6f 6e 61 6c 52 65 71 20 | 29 0d 0a 09 7b 0d 0a 09 |onalReq |)...{...|
|00004f40| 09 63 61 73 65 20 52 52 | 5f 45 71 75 61 6c 3a 0d |.case RR|_Equal:.|
|00004f50| 0a 09 09 09 62 50 61 73 | 73 65 64 52 65 71 75 69 |....bPas|sedRequi|
|00004f60| 73 69 74 65 20 3d 20 28 | 20 52 65 71 75 69 73 69 |site = (| Requisi|
|00004f70| 74 65 56 61 6c 75 65 20 | 7e 3d 20 54 6f 6c 65 72 |teValue |~= Toler|
|00004f80| 61 6e 63 65 20 29 3b 0d | 0a 09 09 09 62 72 65 61 |ance );.|....brea|
|00004f90| 6b 3b 0d 0a 09 09 63 61 | 73 65 20 52 52 5f 4c 65 |k;....ca|se RR_Le|
|00004fa0| 73 73 3a 0d 0a 09 09 09 | 62 50 61 73 73 65 64 52 |ss:.....|bPassedR|
|00004fb0| 65 71 75 69 73 69 74 65 | 20 3d 20 28 20 52 65 71 |equisite| = ( Req|
|00004fc0| 75 69 73 69 74 65 56 61 | 6c 75 65 20 3c 20 54 6f |uisiteVa|lue < To|
|00004fd0| 6c 65 72 61 6e 63 65 20 | 29 3b 0d 0a 09 09 09 62 |lerance |);.....b|
|00004fe0| 72 65 61 6b 3b 0d 0a 09 | 09 63 61 73 65 20 52 52 |reak;...|.case RR|
|00004ff0| 5f 4c 65 73 73 4f 72 45 | 71 75 61 6c 3a 0d 0a 09 |_LessOrE|qual:...|
|00005000| 09 09 62 50 61 73 73 65 | 64 52 65 71 75 69 73 69 |..bPasse|dRequisi|
|00005010| 74 65 20 3d 20 28 20 28 | 20 52 65 71 75 69 73 69 |te = ( (| Requisi|
|00005020| 74 65 56 61 6c 75 65 20 | 3c 20 54 6f 6c 65 72 61 |teValue |< Tolera|
|00005030| 6e 63 65 20 29 20 7c 7c | 0d 0a 09 09 09 09 09 28 |nce ) |||.......(|
|00005040| 20 52 65 71 75 69 73 69 | 74 65 56 61 6c 75 65 20 | Requisi|teValue |
|00005050| 7e 3d 20 54 6f 6c 65 72 | 61 6e 63 65 20 29 20 29 |~= Toler|ance ) )|
|00005060| 3b 0d 0a 09 09 09 62 72 | 65 61 6b 3b 0d 0a 09 09 |;.....br|eak;....|
|00005070| 63 61 73 65 20 52 52 5f | 47 72 65 61 74 65 72 4f |case RR_|GreaterO|
|00005080| 72 45 71 75 61 6c 3a 0d | 0a 09 09 09 62 50 61 73 |rEqual:.|....bPas|
|00005090| 73 65 64 52 65 71 75 69 | 73 69 74 65 20 3d 20 28 |sedRequi|site = (|
|000050a0| 20 28 20 52 65 71 75 69 | 73 69 74 65 56 61 6c 75 | ( Requi|siteValu|
|000050b0| 65 20 3e 20 54 6f 6c 65 | 72 61 6e 63 65 20 29 20 |e > Tole|rance ) |
|000050c0| 7c 7c 0d 0a 09 09 09 09 | 09 28 20 52 65 71 75 69 |||......|.( Requi|
|000050d0| 73 69 74 65 56 61 6c 75 | 65 20 7e 3d 20 54 6f 6c |siteValu|e ~= Tol|
|000050e0| 65 72 61 6e 63 65 20 29 | 20 29 3b 0d 0a 09 09 09 |erance )| );.....|
|000050f0| 62 72 65 61 6b 3b 0d 0a | 09 09 63 61 73 65 20 52 |break;..|..case R|
|00005100| 52 5f 47 72 65 61 74 65 | 72 3a 0d 0a 09 09 09 62 |R_Greate|r:.....b|
|00005110| 50 61 73 73 65 64 52 65 | 71 75 69 73 69 74 65 20 |PassedRe|quisite |
|00005120| 3d 20 28 20 52 65 71 75 | 69 73 69 74 65 56 61 6c |= ( Requ|isiteVal|
|00005130| 75 65 20 3e 20 54 6f 6c | 65 72 61 6e 63 65 20 29 |ue > Tol|erance )|
|00005140| 3b 0d 0a 09 09 09 62 72 | 65 61 6b 3b 0d 0a 09 09 |;.....br|eak;....|
|00005150| 63 61 73 65 20 52 52 5f | 4e 6f 6e 65 3a 0d 0a 09 |case RR_|None:...|
|00005160| 09 09 62 50 61 73 73 65 | 64 52 65 71 75 69 73 69 |..bPasse|dRequisi|
|00005170| 74 65 20 3d 20 74 72 75 | 65 3b 0d 0a 09 09 64 65 |te = tru|e;....de|
|00005180| 66 61 75 6c 74 3a 0d 0a | 09 09 09 62 72 65 61 6b |fault:..|...break|
|00005190| 3b 0d 0a 09 7d 0d 0a 09 | 72 65 74 75 72 6e 20 62 |;...}...|return b|
|000051a0| 50 61 73 73 65 64 52 65 | 71 75 69 73 69 74 65 3b |PassedRe|quisite;|
|000051b0| 0d 0a 7d 0d 0a 0d 0a 00 | |..}.....| |
+--------+-------------------------+-------------------------+--------+--------+