home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 July & August / Gamestar_64_2004-07-08_dvd.iso / Patche / ut2004-winpatch3204.exe / UT2004-Patch / System / Skaarjpack.u / Monster_MonsterController_ScriptText.TextBuffer < prev    next >
Unknown  |  2004-05-10  |  61.2 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.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 70 d2 07 20 2f 2f 3d 3d |........|p.. //==|
|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 3d 0d 0a 2f 2f 20 |========|===..// |
|00000060| 4d 6f 6e 73 74 65 72 20 | 43 6f 6e 74 72 6f 6c 6c |Monster |Controll|
|00000070| 65 72 20 2d 20 73 69 6d | 70 6c 65 20 41 49 20 74 |er - sim|ple AI t|
|00000080| 68 61 74 20 61 6c 77 61 | 79 73 20 68 61 73 20 61 |hat alwa|ys has a|
|00000090| 6e 64 20 68 75 6e 74 73 | 20 64 6f 77 6e 20 70 6c |nd hunts| down pl|
|000000a0| 61 79 65 72 20 65 6e 65 | 6d 79 0d 0a 2f 2f 3d 3d |ayer ene|my..//==|
|000000b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|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 0d 0a 63 6c 61 |========|===..cla|
|00000100| 73 73 20 4d 6f 6e 73 74 | 65 72 43 6f 6e 74 72 6f |ss Monst|erContro|
|00000110| 6c 6c 65 72 20 65 78 74 | 65 6e 64 73 20 53 63 72 |ller ext|ends Scr|
|00000120| 69 70 74 65 64 43 6f 6e | 74 72 6f 6c 6c 65 72 3b |iptedCon|troller;|
|00000130| 0d 0a 0d 0a 2f 2f 20 41 | 49 20 4d 61 67 69 63 20 |....// A|I Magic |
|00000140| 6e 75 6d 62 65 72 73 20 | 2d 20 64 69 73 74 61 6e |numbers |- distan|
|00000150| 63 65 20 62 61 73 65 64 | 2c 20 73 6f 20 73 63 61 |ce based|, so sca|
|00000160| 6c 65 20 74 6f 20 62 6f | 74 20 73 70 65 65 64 2f |le to bo|t speed/|
|00000170| 77 65 61 70 6f 6e 20 72 | 61 6e 67 65 0d 0a 63 6f |weapon r|ange..co|
|00000180| 6e 73 74 20 4d 41 58 53 | 54 41 4b 45 4f 55 54 44 |nst MAXS|TAKEOUTD|
|00000190| 49 53 54 20 3d 20 32 30 | 30 30 3b 0d 0a 63 6f 6e |IST = 20|00;..con|
|000001a0| 73 74 20 45 4e 45 4d 59 | 4c 4f 43 41 54 49 4f 4e |st ENEMY|LOCATION|
|000001b0| 46 55 5a 5a 20 3d 20 31 | 32 30 30 3b 0d 0a 63 6f |FUZZ = 1|200;..co|
|000001c0| 6e 73 74 20 54 41 43 54 | 49 43 41 4c 48 45 49 47 |nst TACT|ICALHEIG|
|000001d0| 48 54 41 44 56 41 4e 54 | 41 47 45 20 3d 20 33 32 |HTADVANT|AGE = 32|
|000001e0| 30 3b 0d 0a 63 6f 6e 73 | 74 20 4d 49 4e 53 54 52 |0;..cons|t MINSTR|
|000001f0| 41 46 45 44 49 53 54 20 | 3d 20 32 30 30 3b 0d 0a |AFEDIST |= 200;..|
|00000200| 63 6f 6e 73 74 20 4d 49 | 4e 56 49 45 57 44 49 53 |const MI|NVIEWDIS|
|00000210| 54 20 3d 20 32 30 30 3b | 0d 0a 0d 0a 2f 2f 41 49 |T = 200;|....//AI|
|00000220| 20 66 6c 61 67 73 0d 0a | 76 61 72 09 09 62 6f 6f | flags..|var..boo|
|00000230| 6c 09 09 62 43 61 6e 46 | 69 72 65 3b 09 09 09 2f |l..bCanF|ire;.../|
|00000240| 2f 20 75 73 65 64 20 62 | 79 20 54 61 63 74 69 63 |/ used b|y Tactic|
|00000250| 61 6c 4d 6f 76 65 20 61 | 6e 64 20 43 68 61 72 67 |alMove a|nd Charg|
|00000260| 69 6e 67 20 73 74 61 74 | 65 73 0d 0a 76 61 72 09 |ing stat|es..var.|
|00000270| 09 62 6f 6f 6c 09 09 62 | 53 74 72 61 66 65 44 69 |.bool..b|StrafeDi|
|00000280| 72 3b 0d 0a 76 61 72 09 | 09 62 6f 6f 6c 09 09 62 |r;..var.|.bool..b|
|00000290| 4c 65 61 64 54 61 72 67 | 65 74 3b 09 09 2f 2f 20 |LeadTarg|et;..// |
|000002a0| 6c 65 61 64 20 74 61 72 | 67 65 74 20 77 69 74 68 |lead tar|get with|
|000002b0| 20 70 72 6f 6a 65 63 74 | 69 6c 65 20 61 74 74 61 | project|ile atta|
|000002c0| 63 6b 0d 0a 76 61 72 09 | 09 62 6f 6f 6c 09 09 62 |ck..var.|.bool..b|
|000002d0| 43 68 61 6e 67 65 44 69 | 72 3b 09 09 09 2f 2f 20 |ChangeDi|r;...// |
|000002e0| 74 61 63 74 69 63 61 6c | 20 6d 6f 76 65 20 62 6f |tactical| move bo|
|000002f0| 6f 6c 65 61 6e 0d 0a 76 | 61 72 09 09 62 6f 6f 6c |olean..v|ar..bool|
|00000300| 09 09 62 45 6e 65 6d 79 | 49 73 56 69 73 69 62 6c |..bEnemy|IsVisibl|
|00000310| 65 3b 0d 0a 76 61 72 09 | 09 62 6f 6f 6c 09 09 62 |e;..var.|.bool..b|
|00000320| 4d 75 73 74 43 68 61 72 | 67 65 3b 0d 0a 76 61 72 |MustChar|ge;..var|
|00000330| 09 09 62 6f 6f 6c 09 09 | 62 4a 75 73 74 4c 61 6e |..bool..|bJustLan|
|00000340| 64 65 64 3b 0d 0a 76 61 | 72 09 09 62 6f 6f 6c 09 |ded;..va|r..bool.|
|00000350| 09 62 52 65 63 6f 6d 6d | 65 6e 64 46 61 73 74 4d |.bRecomm|endFastM|
|00000360| 6f 76 65 3b 0d 0a 76 61 | 72 09 09 62 6f 6f 6c 09 |ove;..va|r..bool.|
|00000370| 09 62 48 61 73 46 69 72 | 65 64 3b 0d 0a 76 61 72 |.bHasFir|ed;..var|
|00000380| 09 09 62 6f 6f 6c 09 09 | 62 46 6f 72 63 65 64 44 |..bool..|bForcedD|
|00000390| 69 72 65 63 74 69 6f 6e | 3b 0d 0a 0d 0a 2f 2f 20 |irection|;....// |
|000003a0| 41 64 76 61 6e 63 65 64 | 20 41 49 20 61 74 74 72 |Advanced| AI attr|
|000003b0| 69 62 75 74 65 73 2e 0d | 0a 76 61 72 09 66 6c 6f |ibutes..|.var.flo|
|000003c0| 61 74 09 09 09 41 63 71 | 75 69 72 65 54 69 6d 65 |at...Acq|uireTime|
|000003d0| 3b 09 09 2f 2f 20 74 69 | 6d 65 20 61 74 20 77 68 |;..// ti|me at wh|
|000003e0| 69 63 68 20 63 75 72 72 | 65 6e 74 20 65 6e 65 6d |ich curr|ent enem|
|000003f0| 79 20 77 61 73 20 61 63 | 71 75 69 72 65 64 0d 0a |y was ac|quired..|
|00000400| 76 61 72 20 66 6c 6f 61 | 74 09 09 09 4c 6f 73 65 |var floa|t...Lose|
|00000410| 45 6e 65 6d 79 43 68 65 | 63 6b 54 69 6d 65 3b 0d |EnemyChe|ckTime;.|
|00000420| 0a 76 61 72 20 66 6c 6f | 61 74 09 09 09 53 74 61 |.var flo|at...Sta|
|00000430| 72 74 54 61 63 74 69 63 | 61 6c 54 69 6d 65 3b 0d |rtTactic|alTime;.|
|00000440| 0a 76 61 72 20 76 65 63 | 74 6f 72 09 09 09 48 69 |.var vec|tor...Hi|
|00000450| 64 69 6e 67 53 70 6f 74 | 3b 0d 0a 76 61 72 20 66 |dingSpot|;..var f|
|00000460| 6c 6f 61 74 09 09 09 43 | 68 61 6c 6c 65 6e 67 65 |loat...C|hallenge|
|00000470| 54 69 6d 65 3b 0d 0a 0d | 0a 2f 2f 20 6d 6f 64 69 |Time;...|.// modi|
|00000480| 66 69 61 62 6c 65 20 41 | 49 20 61 74 74 72 69 62 |fiable A|I attrib|
|00000490| 75 74 65 73 0d 0a 76 61 | 72 20 66 6c 6f 61 74 09 |utes..va|r float.|
|000004a0| 09 09 41 63 63 75 72 61 | 63 79 3b 09 09 09 2f 2f |..Accura|cy;...//|
|000004b0| 20 2d 31 20 74 6f 20 31 | 20 28 30 20 69 73 20 64 | -1 to 1| (0 is d|
|000004c0| 65 66 61 75 6c 74 2c 20 | 68 69 67 68 65 72 20 69 |efault, |higher i|
|000004d0| 73 20 6d 6f 72 65 20 61 | 63 63 75 72 61 74 65 29 |s more a|ccurate)|
|000004e0| 0d 0a 76 61 72 09 66 6c | 6f 61 74 09 09 09 53 74 |..var.fl|oat...St|
|000004f0| 72 61 66 69 6e 67 41 62 | 69 6c 69 74 79 3b 09 2f |rafingAb|ility;./|
|00000500| 2f 20 2d 31 20 74 6f 20 | 31 20 28 68 69 67 68 65 |/ -1 to |1 (highe|
|00000510| 72 20 75 73 65 73 20 73 | 74 72 61 66 69 6e 67 20 |r uses s|trafing |
|00000520| 6d 6f 72 65 29 0d 0a 76 | 61 72 09 66 6c 6f 61 74 |more)..v|ar.float|
|00000530| 09 09 09 43 6f 6d 62 61 | 74 53 74 79 6c 65 3b 09 |...Comba|tStyle;.|
|00000540| 09 2f 2f 20 2d 31 20 74 | 6f 20 31 20 3d 20 6c 6f |.// -1 t|o 1 = lo|
|00000550| 77 20 6d 65 61 6e 73 20 | 74 65 6e 64 73 20 74 6f |w means |tends to|
|00000560| 20 73 74 61 79 20 6f 66 | 66 20 61 6e 64 20 73 6e | stay of|f and sn|
|00000570| 69 70 65 2c 20 68 69 67 | 68 20 6d 65 61 6e 73 20 |ipe, hig|h means |
|00000580| 74 65 6e 64 73 20 74 6f | 20 63 68 61 72 67 65 20 |tends to| charge |
|00000590| 61 6e 64 20 6d 65 6c 65 | 65 0d 0a 76 61 72 20 66 |and mele|e..var f|
|000005a0| 6c 6f 61 74 09 09 09 52 | 65 61 63 74 69 6f 6e 54 |loat...R|eactionT|
|000005b0| 69 6d 65 3b 0d 0a 0d 0a | 2f 2f 20 54 65 61 6d 20 |ime;....|// Team |
|000005c0| 41 49 20 61 74 74 72 69 | 62 75 74 65 73 0d 0a 76 |AI attri|butes..v|
|000005d0| 61 72 20 73 74 72 69 6e | 67 09 09 09 47 6f 61 6c |ar strin|g...Goal|
|000005e0| 53 74 72 69 6e 67 3b 09 | 09 09 2f 2f 20 66 6f 72 |String;.|..// for|
|000005f0| 20 64 65 62 75 67 67 69 | 6e 67 20 2d 20 75 73 65 | debuggi|ng - use|
|00000600| 64 20 74 6f 20 73 68 6f | 77 20 77 68 61 74 20 62 |d to sho|w what b|
|00000610| 6f 74 20 69 73 20 74 68 | 69 6e 6b 69 6e 67 20 28 |ot is th|inking (|
|00000620| 77 69 74 68 20 27 53 68 | 6f 77 44 65 62 75 67 27 |with 'Sh|owDebug'|
|00000630| 29 0d 0a 76 61 72 20 73 | 74 72 69 6e 67 09 09 09 |)..var s|tring...|
|00000640| 53 6f 61 6b 53 74 72 69 | 6e 67 3b 09 09 09 2f 2f |SoakStri|ng;...//|
|00000650| 20 66 6f 72 20 64 65 62 | 75 67 67 69 6e 67 20 2d | for deb|ugging -|
|00000660| 20 73 68 6f 77 73 20 70 | 72 6f 62 6c 65 6d 20 77 | shows p|roblem w|
|00000670| 68 65 6e 20 73 6f 61 6b | 69 6e 67 0d 0a 0d 0a 2f |hen soak|ing..../|
|00000680| 2f 20 43 68 6f 6f 73 65 | 41 74 74 61 63 6b 4d 6f |/ Choose|AttackMo|
|00000690| 64 65 28 29 20 73 74 61 | 74 65 0d 0a 76 61 72 09 |de() sta|te..var.|
|000006a0| 69 6e 74 09 09 09 43 68 | 6f 6f 73 69 6e 67 41 74 |int...Ch|oosingAt|
|000006b0| 74 61 63 6b 4c 65 76 65 | 6c 3b 0d 0a 76 61 72 20 |tackLeve|l;..var |
|000006c0| 66 6c 6f 61 74 09 09 43 | 68 6f 6f 73 65 41 74 74 |float..C|hooseAtt|
|000006d0| 61 63 6b 54 69 6d 65 3b | 0d 0a 76 61 72 20 69 6e |ackTime;|..var in|
|000006e0| 74 09 09 09 43 68 6f 6f | 73 65 41 74 74 61 63 6b |t...Choo|seAttack|
|000006f0| 43 6f 75 6e 74 65 72 3b | 0d 0a 76 61 72 20 66 6c |Counter;|..var fl|
|00000700| 6f 61 74 09 09 45 6e 65 | 6d 79 56 69 73 69 62 69 |oat..Ene|myVisibi|
|00000710| 6c 69 74 79 54 69 6d 65 | 3b 0d 0a 76 61 72 09 70 |lityTime|;..var.p|
|00000720| 61 77 6e 09 09 56 69 73 | 69 62 6c 65 45 6e 65 6d |awn..Vis|ibleEnem|
|00000730| 79 3b 0d 0a 76 61 72 20 | 70 61 77 6e 09 09 4f 6c |y;..var |pawn..Ol|
|00000740| 64 45 6e 65 6d 79 3b 0d | 0a 76 61 72 20 66 6c 6f |dEnemy;.|.var flo|
|00000750| 61 74 09 09 53 74 6f 70 | 53 74 61 72 74 54 69 6d |at..Stop|StartTim|
|00000760| 65 3b 0d 0a 76 61 72 20 | 66 6c 6f 61 74 09 09 4c |e;..var |float..L|
|00000770| 61 73 74 52 65 73 70 61 | 77 6e 54 69 6d 65 3b 0d |astRespa|wnTime;.|
|00000780| 0a 76 61 72 20 66 6c 6f | 61 74 09 09 46 61 69 6c |.var flo|at..Fail|
|00000790| 65 64 48 75 6e 74 54 69 | 6d 65 3b 0d 0a 76 61 72 |edHuntTi|me;..var|
|000007a0| 20 50 61 77 6e 09 09 46 | 61 69 6c 65 64 48 75 6e | Pawn..F|ailedHun|
|000007b0| 74 45 6e 65 6d 79 3b 0d | 0a 0d 0a 76 61 72 20 69 |tEnemy;.|...var i|
|000007c0| 6e 74 09 09 4e 75 6d 52 | 61 6e 64 6f 6d 4a 75 6d |nt..NumR|andomJum|
|000007d0| 70 73 3b 09 09 09 2f 2f | 20 61 74 74 65 6d 70 74 |ps;...//| attempt|
|000007e0| 73 20 74 6f 20 66 72 65 | 65 20 6d 6f 6e 73 74 65 |s to fre|e monste|
|000007f0| 72 20 66 72 6f 6d 20 62 | 65 69 6e 67 20 73 74 75 |r from b|eing stu|
|00000800| 63 6b 0d 0a 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 50 |ck....fu|nction P|
|00000810| 6f 73 74 42 65 67 69 6e | 50 6c 61 79 28 29 0d 0a |ostBegin|Play()..|
|00000820| 7b 0d 0a 09 53 75 70 65 | 72 2e 50 6f 73 74 42 65 |{...Supe|r.PostBe|
|00000830| 67 69 6e 50 6c 61 79 28 | 29 3b 0d 0a 09 53 65 74 |ginPlay(|);...Set|
|00000840| 43 6f 6d 62 61 74 54 69 | 6d 65 72 28 29 3b 0d 0a |CombatTi|mer();..|
|00000850| 09 69 66 20 28 20 55 6e | 72 65 61 6c 4d 50 47 61 |.if ( Un|realMPGa|
|00000860| 6d 65 49 6e 66 6f 28 4c | 65 76 65 6c 2e 47 61 6d |meInfo(L|evel.Gam|
|00000870| 65 29 2e 62 53 6f 61 6b | 69 6e 67 20 29 0d 0a 09 |e).bSoak|ing )...|
|00000880| 09 62 53 6f 61 6b 69 6e | 67 20 3d 20 74 72 75 65 |.bSoakin|g = true|
|00000890| 3b 0d 0a 7d 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |;..}....|function|
|000008a0| 20 46 65 61 72 54 68 69 | 73 53 70 6f 74 28 41 76 | FearThi|sSpot(Av|
|000008b0| 6f 69 64 4d 61 72 6b 65 | 72 20 61 53 70 6f 74 29 |oidMarke|r aSpot)|
|000008c0| 0d 0a 7b 0d 0a 09 69 66 | 20 28 20 53 6b 69 6c 6c |..{...if| ( Skill|
|000008d0| 20 3e 20 31 20 2b 20 34 | 2e 35 20 2a 20 46 52 61 | > 1 + 4|.5 * FRa|
|000008e0| 6e 64 28 29 20 29 0d 0a | 09 09 53 75 70 65 72 2e |nd() )..|..Super.|
|000008f0| 46 65 61 72 54 68 69 73 | 53 70 6f 74 28 61 53 70 |FearThis|Spot(aSp|
|00000900| 6f 74 29 3b 0d 0a 7d 0d | 0a 0d 0a 66 75 6e 63 74 |ot);..}.|...funct|
|00000910| 69 6f 6e 20 53 65 74 43 | 6f 6d 62 61 74 54 69 6d |ion SetC|ombatTim|
|00000920| 65 72 28 29 0d 0a 7b 0d | 0a 09 53 65 74 54 69 6d |er()..{.|..SetTim|
|00000930| 65 72 28 31 2e 32 20 2d | 20 30 2e 30 39 20 2a 20 |er(1.2 -| 0.09 * |
|00000940| 46 4d 69 6e 28 31 30 2c | 53 6b 69 6c 6c 2b 52 65 |FMin(10,|Skill+Re|
|00000950| 61 63 74 69 6f 6e 54 69 | 6d 65 29 2c 20 54 72 75 |actionTi|me), Tru|
|00000960| 65 29 3b 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |e);..}..|..functi|
|00000970| 6f 6e 20 57 61 69 74 46 | 6f 72 4d 6f 76 65 72 28 |on WaitF|orMover(|
|00000980| 4d 6f 76 65 72 20 4d 29 | 0d 0a 7b 0d 0a 09 53 75 |Mover M)|..{...Su|
|00000990| 70 65 72 2e 57 61 69 74 | 46 6f 72 4d 6f 76 65 72 |per.Wait|ForMover|
|000009a0| 28 4d 29 3b 0d 0a 09 53 | 74 6f 70 53 74 61 72 74 |(M);...S|topStart|
|000009b0| 54 69 6d 65 20 3d 20 4c | 65 76 65 6c 2e 54 69 6d |Time = L|evel.Tim|
|000009c0| 65 53 65 63 6f 6e 64 73 | 3b 0d 0a 7d 0d 0a 0d 0a |eSeconds|;..}....|
|000009d0| 66 75 6e 63 74 69 6f 6e | 20 54 69 6d 65 64 46 69 |function| TimedFi|
|000009e0| 72 65 57 65 61 70 6f 6e | 41 74 45 6e 65 6d 79 28 |reWeapon|AtEnemy(|
|000009f0| 29 0d 0a 7b 0d 0a 09 69 | 66 20 28 20 28 45 6e 65 |)..{...i|f ( (Ene|
|00000a00| 6d 79 20 3d 3d 20 4e 6f | 6e 65 29 20 7c 7c 20 46 |my == No|ne) || F|
|00000a10| 69 72 65 57 65 61 70 6f | 6e 41 74 28 45 6e 65 6d |ireWeapo|nAt(Enem|
|00000a20| 79 29 20 29 0d 0a 09 09 | 53 65 74 43 6f 6d 62 61 |y) )....|SetComba|
|00000a30| 74 54 69 6d 65 72 28 29 | 3b 0d 0a 09 65 6c 73 65 |tTimer()|;...else|
|00000a40| 0d 0a 09 09 53 65 74 54 | 69 6d 65 72 28 30 2e 31 |....SetT|imer(0.1|
|00000a50| 2c 20 54 72 75 65 29 3b | 0d 0a 7d 0d 0a 0d 0a 66 |, True);|..}....f|
|00000a60| 75 6e 63 74 69 6f 6e 20 | 62 6f 6f 6c 20 46 69 72 |unction |bool Fir|
|00000a70| 65 57 65 61 70 6f 6e 41 | 74 28 41 63 74 6f 72 20 |eWeaponA|t(Actor |
|00000a80| 41 29 0d 0a 7b 0d 0a 09 | 69 66 20 28 20 41 20 3d |A)..{...|if ( A =|
|00000a90| 3d 20 4e 6f 6e 65 20 29 | 0d 0a 09 09 41 20 3d 20 |= None )|....A = |
|00000aa0| 45 6e 65 6d 79 3b 0d 0a | 09 69 66 20 28 20 28 41 |Enemy;..|.if ( (A|
|00000ab0| 20 3d 3d 20 4e 6f 6e 65 | 29 20 7c 7c 20 28 46 6f | == None|) || (Fo|
|00000ac0| 63 75 73 20 21 3d 20 41 | 29 20 29 0d 0a 09 09 72 |cus != A|) )....r|
|00000ad0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 0a 09 54 |eturn fa|lse;...T|
|00000ae0| 61 72 67 65 74 20 3d 20 | 41 3b 0d 0a 09 4d 6f 6e |arget = |A;...Mon|
|00000af0| 73 74 65 72 28 50 61 77 | 6e 29 2e 52 61 6e 67 65 |ster(Paw|n).Range|
|00000b00| 64 41 74 74 61 63 6b 28 | 54 61 72 67 65 74 29 3b |dAttack(|Target);|
|00000b10| 0d 0a 09 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b |...retur|n false;|
|00000b20| 0d 0a 7d 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |..}....f|unction |
|00000b30| 62 6f 6f 6c 20 43 61 6e | 41 74 74 61 63 6b 28 41 |bool Can|Attack(A|
|00000b40| 63 74 6f 72 20 4f 74 68 | 65 72 29 0d 0a 7b 0d 0a |ctor Oth|er)..{..|
|00000b50| 09 2f 2f 20 72 65 74 75 | 72 6e 20 74 72 75 65 20 |.// retu|rn true |
|00000b60| 69 66 20 69 6e 20 72 61 | 6e 67 65 20 6f 66 20 63 |if in ra|nge of c|
|00000b70| 75 72 72 65 6e 74 20 77 | 65 61 70 6f 6e 0d 0a 09 |urrent w|eapon...|
|00000b80| 72 65 74 75 72 6e 20 4d | 6f 6e 73 74 65 72 28 50 |return M|onster(P|
|00000b90| 61 77 6e 29 2e 43 61 6e | 41 74 74 61 63 6b 28 4f |awn).Can|Attack(O|
|00000ba0| 74 68 65 72 29 3b 0d 0a | 7d 0d 0a 0d 0a 66 75 6e |ther);..|}....fun|
|00000bb0| 63 74 69 6f 6e 20 53 74 | 6f 70 46 69 72 69 6e 67 |ction St|opFiring|
|00000bc0| 28 29 0d 0a 7b 0d 0a 09 | 4d 6f 6e 73 74 65 72 28 |()..{...|Monster(|
|00000bd0| 50 61 77 6e 29 2e 53 74 | 6f 70 46 69 72 69 6e 67 |Pawn).St|opFiring|
|00000be0| 28 29 3b 0d 0a 09 62 43 | 61 6e 46 69 72 65 20 3d |();...bC|anFire =|
|00000bf0| 20 66 61 6c 73 65 3b 0d | 0a 09 62 46 69 72 65 20 | false;.|..bFire |
|00000c00| 3d 20 30 3b 0d 0a 09 62 | 41 6c 74 46 69 72 65 20 |= 0;...b|AltFire |
|00000c10| 3d 20 30 3b 0d 0a 7d 0d | 0a 0d 0a 2f 2f 3d 3d 3d |= 0;..}.|...//===|
|00000c20| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000c30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000c40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000c50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000c60| 3d 3d 3d 3d 3d 3d 3d 3d | 0d 0a 0d 0a 66 75 6e 63 |========|....func|
|00000c70| 74 69 6f 6e 20 44 69 73 | 70 6c 61 79 44 65 62 75 |tion Dis|playDebu|
|00000c80| 67 28 43 61 6e 76 61 73 | 20 43 61 6e 76 61 73 2c |g(Canvas| Canvas,|
|00000c90| 20 6f 75 74 20 66 6c 6f | 61 74 20 59 4c 2c 20 6f | out flo|at YL, o|
|00000ca0| 75 74 20 66 6c 6f 61 74 | 20 59 50 6f 73 29 0d 0a |ut float| YPos)..|
|00000cb0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 73 74 72 69 6e 67 |{...loca|l string|
|00000cc0| 20 53 3b 0d 0a 0d 0a 09 | 53 75 70 65 72 2e 44 69 | S;.....|Super.Di|
|00000cd0| 73 70 6c 61 79 44 65 62 | 75 67 28 43 61 6e 76 61 |splayDeb|ug(Canva|
|00000ce0| 73 2c 59 4c 2c 20 59 50 | 6f 73 29 3b 0d 0a 0d 0a |s,YL, YP|os);....|
|00000cf0| 09 43 61 6e 76 61 73 2e | 53 65 74 44 72 61 77 43 |.Canvas.|SetDrawC|
|00000d00| 6f 6c 6f 72 28 32 35 35 | 2c 32 35 35 2c 32 35 35 |olor(255|,255,255|
|00000d10| 29 3b 0d 0a 09 43 61 6e | 76 61 73 2e 44 72 61 77 |);...Can|vas.Draw|
|00000d20| 54 65 78 74 28 22 20 20 | 20 20 20 22 24 47 6f 61 |Text(" | "$Goa|
|00000d30| 6c 53 74 72 69 6e 67 2c | 20 66 61 6c 73 65 29 3b |lString,| false);|
|00000d40| 0d 0a 0d 0a 09 59 50 6f | 73 20 2b 3d 20 32 2a 59 |.....YPo|s += 2*Y|
|00000d50| 4c 3b 0d 0a 09 43 61 6e | 76 61 73 2e 53 65 74 50 |L;...Can|vas.SetP|
|00000d60| 6f 73 28 34 2c 59 50 6f | 73 29 3b 0d 0a 0d 0a 09 |os(4,YPo|s);.....|
|00000d70| 69 66 20 28 20 45 6e 65 | 6d 79 20 21 3d 20 4e 6f |if ( Ene|my != No|
|00000d80| 6e 65 20 29 0d 0a 09 7b | 0d 0a 09 09 43 61 6e 76 |ne )...{|....Canv|
|00000d90| 61 73 2e 44 72 61 77 54 | 65 78 74 28 22 45 6e 65 |as.DrawT|ext("Ene|
|00000da0| 6d 79 20 44 69 73 74 20 | 22 24 56 53 69 7a 65 28 |my Dist |"$VSize(|
|00000db0| 45 6e 65 6d 79 2e 4c 6f | 63 61 74 69 6f 6e 20 2d |Enemy.Lo|cation -|
|00000dc0| 20 50 61 77 6e 2e 4c 6f | 63 61 74 69 6f 6e 29 24 | Pawn.Lo|cation)$|
|00000dd0| 22 20 41 63 71 75 69 72 | 65 64 20 22 24 62 45 6e |" Acquir|ed "$bEn|
|00000de0| 65 6d 79 41 63 71 75 69 | 72 65 64 29 3b 0d 0a 09 |emyAcqui|red);...|
|00000df0| 09 59 50 6f 73 20 2b 3d | 20 59 4c 3b 0d 0a 09 09 |.YPos +=| YL;....|
|00000e00| 43 61 6e 76 61 73 2e 53 | 65 74 50 6f 73 28 34 2c |Canvas.S|etPos(4,|
|00000e10| 59 50 6f 73 29 3b 0d 0a | 09 7d 0d 0a 0d 0a 09 43 |YPos);..|.}.....C|
|00000e20| 61 6e 76 61 73 2e 44 72 | 61 77 54 65 78 74 28 22 |anvas.Dr|awText("|
|00000e30| 57 65 61 70 6f 6e 73 3a | 20 22 24 53 2c 20 66 61 |Weapons:| "$S, fa|
|00000e40| 6c 73 65 29 3b 0d 0a 09 | 59 50 6f 73 20 2b 3d 20 |lse);...|YPos += |
|00000e50| 59 4c 3b 0d 0a 09 43 61 | 6e 76 61 73 2e 53 65 74 |YL;...Ca|nvas.Set|
|00000e60| 50 6f 73 28 34 2c 59 50 | 6f 73 29 3b 0d 0a 09 43 |Pos(4,YP|os);...C|
|00000e70| 61 6e 76 61 73 2e 44 72 | 61 77 54 65 78 74 28 22 |anvas.Dr|awText("|
|00000e80| 50 45 52 53 4f 4e 41 4c | 49 54 59 3a 20 43 6f 6d |PERSONAL|ITY: Com|
|00000e90| 62 61 74 53 74 79 6c 65 | 20 22 24 43 6f 6d 62 61 |batStyle| "$Comba|
|00000ea0| 74 53 74 79 6c 65 24 22 | 20 53 74 72 61 66 69 6e |tStyle$"| Strafin|
|00000eb0| 67 20 22 24 53 74 72 61 | 66 69 6e 67 41 62 69 6c |g "$Stra|fingAbil|
|00000ec0| 69 74 79 29 3b 0d 0a 09 | 59 50 6f 73 20 2b 3d 20 |ity);...|YPos += |
|00000ed0| 59 4c 3b 0d 0a 09 43 61 | 6e 76 61 73 2e 53 65 74 |YL;...Ca|nvas.Set|
|00000ee0| 50 6f 73 28 34 2c 59 50 | 6f 73 29 3b 0d 0a 7d 0d |Pos(4,YP|os);..}.|
|00000ef0| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 62 6f 6f 6c |...funct|ion bool|
|00000f00| 20 46 69 6e 64 4e 65 77 | 45 6e 65 6d 79 28 29 0d | FindNew|Enemy().|
|00000f10| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 50 61 77 6e 20 |.{...loc|al Pawn |
|00000f20| 42 65 73 74 45 6e 65 6d | 79 3b 0d 0a 09 6c 6f 63 |BestEnem|y;...loc|
|00000f30| 61 6c 20 62 6f 6f 6c 20 | 62 53 65 65 4e 65 77 2c |al bool |bSeeNew,|
|00000f40| 20 62 53 65 65 42 65 73 | 74 3b 0d 0a 09 6c 6f 63 | bSeeBes|t;...loc|
|00000f50| 61 6c 20 66 6c 6f 61 74 | 20 42 65 73 74 44 69 73 |al float| BestDis|
|00000f60| 74 2c 20 4e 65 77 44 69 | 73 74 3b 0d 0a 09 6c 6f |t, NewDi|st;...lo|
|00000f70| 63 61 6c 20 43 6f 6e 74 | 72 6f 6c 6c 65 72 20 43 |cal Cont|roller C|
|00000f80| 3b 0d 0a 0d 0a 09 69 66 | 20 28 20 4c 65 76 65 6c |;.....if| ( Level|
|00000f90| 2e 47 61 6d 65 2e 62 47 | 61 6d 65 45 6e 64 65 64 |.Game.bG|ameEnded|
|00000fa0| 20 29 0d 0a 09 09 72 65 | 74 75 72 6e 20 66 61 6c | )....re|turn fal|
|00000fb0| 73 65 3b 0d 0a 09 66 6f | 72 20 28 20 43 3d 4c 65 |se;...fo|r ( C=Le|
|00000fc0| 76 65 6c 2e 43 6f 6e 74 | 72 6f 6c 6c 65 72 4c 69 |vel.Cont|rollerLi|
|00000fd0| 73 74 3b 20 43 21 3d 4e | 6f 6e 65 3b 20 43 3d 43 |st; C!=N|one; C=C|
|00000fe0| 2e 4e 65 78 74 43 6f 6e | 74 72 6f 6c 6c 65 72 20 |.NextCon|troller |
|00000ff0| 29 0d 0a 09 09 69 66 20 | 28 20 43 2e 62 49 73 50 |)....if |( C.bIsP|
|00001000| 6c 61 79 65 72 20 26 26 | 20 28 43 2e 50 61 77 6e |layer &&| (C.Pawn|
|00001010| 20 21 3d 20 4e 6f 6e 65 | 29 20 29 0d 0a 09 09 7b | != None|) )....{|
|00001020| 0d 0a 09 09 09 69 66 20 | 28 20 42 65 73 74 45 6e |.....if |( BestEn|
|00001030| 65 6d 79 20 3d 3d 20 4e | 6f 6e 65 20 29 0d 0a 09 |emy == N|one )...|
|00001040| 09 09 7b 0d 0a 09 09 09 | 09 42 65 73 74 45 6e 65 |..{.....|.BestEne|
|00001050| 6d 79 20 3d 20 43 2e 50 | 61 77 6e 3b 0d 0a 09 09 |my = C.P|awn;....|
|00001060| 09 09 42 65 73 74 44 69 | 73 74 20 3d 20 56 53 69 |..BestDi|st = VSi|
|00001070| 7a 65 28 42 65 73 74 45 | 6e 65 6d 79 2e 4c 6f 63 |ze(BestE|nemy.Loc|
|00001080| 61 74 69 6f 6e 20 2d 20 | 50 61 77 6e 2e 4c 6f 63 |ation - |Pawn.Loc|
|00001090| 61 74 69 6f 6e 29 3b 0d | 0a 09 09 09 09 62 53 65 |ation);.|.....bSe|
|000010a0| 65 42 65 73 74 20 3d 20 | 43 61 6e 53 65 65 28 42 |eBest = |CanSee(B|
|000010b0| 65 73 74 45 6e 65 6d 79 | 29 3b 0d 0a 09 09 09 7d |estEnemy|);.....}|
|000010c0| 0d 0a 09 09 09 65 6c 73 | 65 0d 0a 09 09 09 7b 0d |.....els|e.....{.|
|000010d0| 0a 09 09 09 09 4e 65 77 | 44 69 73 74 20 3d 20 56 |.....New|Dist = V|
|000010e0| 53 69 7a 65 28 43 2e 50 | 61 77 6e 2e 4c 6f 63 61 |Size(C.P|awn.Loca|
|000010f0| 74 69 6f 6e 20 2d 20 50 | 61 77 6e 2e 4c 6f 63 61 |tion - P|awn.Loca|
|00001100| 74 69 6f 6e 29 3b 0d 0a | 09 09 09 09 69 66 20 28 |tion);..|....if (|
|00001110| 20 21 62 53 65 65 42 65 | 73 74 20 7c 7c 20 28 4e | !bSeeBe|st || (N|
|00001120| 65 77 44 69 73 74 20 3c | 20 42 65 73 74 44 69 73 |ewDist <| BestDis|
|00001130| 74 29 20 29 0d 0a 09 09 | 09 09 7b 0d 0a 09 09 09 |t) )....|..{.....|
|00001140| 09 09 62 53 65 65 4e 65 | 77 20 3d 20 43 61 6e 53 |..bSeeNe|w = CanS|
|00001150| 65 65 28 43 2e 50 61 77 | 6e 29 3b 0d 0a 09 09 09 |ee(C.Paw|n);.....|
|00001160| 09 09 69 66 20 28 20 62 | 53 65 65 4e 65 77 20 7c |..if ( b|SeeNew ||
|00001170| 7c 20 28 21 62 53 65 65 | 42 65 73 74 20 26 26 20 || (!bSee|Best && |
|00001180| 28 4e 65 77 44 69 73 74 | 20 3c 20 42 65 73 74 44 |(NewDist| < BestD|
|00001190| 69 73 74 29 29 20 20 29 | 0d 0a 09 09 09 09 09 7b |ist)) )|.......{|
|000011a0| 0d 0a 09 09 09 09 09 09 | 42 65 73 74 45 6e 65 6d |........|BestEnem|
|000011b0| 79 20 3d 20 43 2e 50 61 | 77 6e 3b 0d 0a 09 09 09 |y = C.Pa|wn;.....|
|000011c0| 09 09 09 42 65 73 74 44 | 69 73 74 20 3d 20 4e 65 |...BestD|ist = Ne|
|000011d0| 77 44 69 73 74 3b 0d 0a | 09 09 09 09 09 09 62 53 |wDist;..|......bS|
|000011e0| 65 65 42 65 73 74 20 3d | 20 62 53 65 65 4e 65 77 |eeBest =| bSeeNew|
|000011f0| 3b 0d 0a 09 09 09 09 09 | 7d 0d 0a 09 09 09 09 7d |;.......|}......}|
|00001200| 0d 0a 09 09 09 7d 0d 0a | 09 09 7d 0d 0a 0d 0a 09 |.....}..|..}.....|
|00001210| 69 66 20 28 20 42 65 73 | 74 45 6e 65 6d 79 20 3d |if ( Bes|tEnemy =|
|00001220| 3d 20 45 6e 65 6d 79 20 | 29 0d 0a 09 09 72 65 74 |= Enemy |)....ret|
|00001230| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 0d 0a 09 69 |urn fals|e;.....i|
|00001240| 66 20 28 20 42 65 73 74 | 45 6e 65 6d 79 20 21 3d |f ( Best|Enemy !=|
|00001250| 20 4e 6f 6e 65 20 29 0d | 0a 09 7b 0d 0a 09 09 43 | None ).|..{....C|
|00001260| 68 61 6e 67 65 45 6e 65 | 6d 79 28 42 65 73 74 45 |hangeEne|my(BestE|
|00001270| 6e 65 6d 79 2c 43 61 6e | 53 65 65 28 42 65 73 74 |nemy,Can|See(Best|
|00001280| 45 6e 65 6d 79 29 29 3b | 0d 0a 09 09 72 65 74 75 |Enemy));|....retu|
|00001290| 72 6e 20 74 72 75 65 3b | 0d 0a 09 7d 0d 0a 09 72 |rn true;|...}...r|
|000012a0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 0a 7d 0d |eturn fa|lse;..}.|
|000012b0| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 43 68 61 6e |...funct|ion Chan|
|000012c0| 67 65 45 6e 65 6d 79 28 | 50 61 77 6e 20 4e 65 77 |geEnemy(|Pawn New|
|000012d0| 45 6e 65 6d 79 2c 20 62 | 6f 6f 6c 20 62 43 61 6e |Enemy, b|ool bCan|
|000012e0| 53 65 65 4e 65 77 45 6e | 65 6d 79 29 0d 0a 7b 0d |SeeNewEn|emy)..{.|
|000012f0| 0a 09 4f 6c 64 45 6e 65 | 6d 79 20 3d 20 45 6e 65 |..OldEne|my = Ene|
|00001300| 6d 79 3b 0d 0a 09 45 6e | 65 6d 79 20 3d 20 4e 65 |my;...En|emy = Ne|
|00001310| 77 45 6e 65 6d 79 3b 0d | 0a 09 45 6e 65 6d 79 43 |wEnemy;.|..EnemyC|
|00001320| 68 61 6e 67 65 64 28 62 | 43 61 6e 53 65 65 4e 65 |hanged(b|CanSeeNe|
|00001330| 77 45 6e 65 6d 79 29 3b | 0d 0a 7d 0d 0a 0d 0a 66 |wEnemy);|..}....f|
|00001340| 75 6e 63 74 69 6f 6e 20 | 62 6f 6f 6c 20 53 65 74 |unction |bool Set|
|00001350| 45 6e 65 6d 79 28 20 50 | 61 77 6e 20 4e 65 77 45 |Enemy( P|awn NewE|
|00001360| 6e 65 6d 79 2c 20 6f 70 | 74 69 6f 6e 61 6c 20 62 |nemy, op|tional b|
|00001370| 6f 6f 6c 20 62 48 61 74 | 65 4d 6f 6e 73 74 65 72 |ool bHat|eMonster|
|00001380| 20 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 66 6c | )..{...|local fl|
|00001390| 6f 61 74 20 45 6e 65 6d | 79 44 69 73 74 3b 0d 0a |oat Enem|yDist;..|
|000013a0| 09 6c 6f 63 61 6c 20 62 | 6f 6f 6c 20 62 4e 65 77 |.local b|ool bNew|
|000013b0| 4d 6f 6e 73 74 65 72 45 | 6e 65 6d 79 3b 0d 0a 0d |MonsterE|nemy;...|
|000013c0| 0a 09 69 66 20 28 20 28 | 4e 65 77 45 6e 65 6d 79 |..if ( (|NewEnemy|
|000013d0| 20 3d 3d 20 4e 6f 6e 65 | 29 20 7c 7c 20 28 4e 65 | == None|) || (Ne|
|000013e0| 77 45 6e 65 6d 79 2e 48 | 65 61 6c 74 68 20 3c 3d |wEnemy.H|ealth <=|
|000013f0| 20 30 29 20 7c 7c 20 28 | 4e 65 77 45 6e 65 6d 79 | 0) || (|NewEnemy|
|00001400| 2e 43 6f 6e 74 72 6f 6c | 6c 65 72 20 3d 3d 20 4e |.Control|ler == N|
|00001410| 6f 6e 65 29 20 7c 7c 20 | 28 4e 65 77 45 6e 65 6d |one) || |(NewEnem|
|00001420| 79 20 3d 3d 20 45 6e 65 | 6d 79 29 20 29 0d 0a 09 |y == Ene|my) )...|
|00001430| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0a |.return |false;..|
|00001440| 0d 0a 09 62 4e 65 77 4d | 6f 6e 73 74 65 72 45 6e |...bNewM|onsterEn|
|00001450| 65 6d 79 20 3d 20 62 48 | 61 74 65 4d 6f 6e 73 74 |emy = bH|ateMonst|
|00001460| 65 72 20 26 26 20 28 4c | 65 76 65 6c 2e 47 61 6d |er && (L|evel.Gam|
|00001470| 65 2e 4e 75 6d 50 6c 61 | 79 65 72 73 20 3c 20 34 |e.NumPla|yers < 4|
|00001480| 29 20 26 26 20 21 4d 6f | 6e 73 74 65 72 28 50 61 |) && !Mo|nster(Pa|
|00001490| 77 6e 29 2e 53 61 6d 65 | 53 70 65 63 69 65 73 41 |wn).Same|SpeciesA|
|000014a0| 73 28 4e 65 77 45 6e 65 | 6d 79 29 20 26 26 20 21 |s(NewEne|my) && !|
|000014b0| 4e 65 77 45 6e 65 6d 79 | 2e 43 6f 6e 74 72 6f 6c |NewEnemy|.Control|
|000014c0| 6c 65 72 2e 62 49 73 50 | 6c 61 79 65 72 3b 0d 0a |ler.bIsP|layer;..|
|000014d0| 09 69 66 20 28 20 21 4e | 65 77 45 6e 65 6d 79 2e |.if ( !N|ewEnemy.|
|000014e0| 43 6f 6e 74 72 6f 6c 6c | 65 72 2e 62 49 73 50 6c |Controll|er.bIsPl|
|000014f0| 61 79 65 72 09 26 26 20 | 21 62 4e 65 77 4d 6f 6e |ayer.&& |!bNewMon|
|00001500| 73 74 65 72 45 6e 65 6d | 79 20 29 0d 0a 09 09 09 |sterEnem|y ).....|
|00001510| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 0d |return f|alse;...|
|00001520| 0a 09 69 66 20 28 20 28 | 62 4e 65 77 4d 6f 6e 73 |..if ( (|bNewMons|
|00001530| 74 65 72 45 6e 65 6d 79 | 20 26 26 20 4c 69 6e 65 |terEnemy| && Line|
|00001540| 4f 66 53 69 67 68 74 54 | 6f 28 4e 65 77 45 6e 65 |OfSightT|o(NewEne|
|00001550| 6d 79 29 29 20 7c 7c 20 | 28 45 6e 65 6d 79 20 3d |my)) || |(Enemy =|
|00001560| 3d 20 4e 6f 6e 65 29 20 | 7c 7c 20 21 45 6e 65 6d |= None) ||| !Enem|
|00001570| 79 56 69 73 69 62 6c 65 | 28 29 20 29 0d 0a 09 7b |yVisible|() )...{|
|00001580| 0d 0a 09 09 43 68 61 6e | 67 65 45 6e 65 6d 79 28 |....Chan|geEnemy(|
|00001590| 4e 65 77 45 6e 65 6d 79 | 2c 43 61 6e 53 65 65 28 |NewEnemy|,CanSee(|
|000015a0| 4e 65 77 45 6e 65 6d 79 | 29 29 3b 0d 0a 09 09 72 |NewEnemy|));....r|
|000015b0| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 0a 09 7d 0d |eturn tr|ue;...}.|
|000015c0| 0a 0d 0a 09 69 66 20 28 | 20 21 43 61 6e 53 65 65 |....if (| !CanSee|
|000015d0| 28 4e 65 77 45 6e 65 6d | 79 29 20 29 0d 0a 09 09 |(NewEnem|y) )....|
|000015e0| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 0d |return f|alse;...|
|000015f0| 0a 09 69 66 20 28 20 21 | 62 48 61 74 65 4d 6f 6e |..if ( !|bHateMon|
|00001600| 73 74 65 72 20 26 26 20 | 28 4d 6f 6e 73 74 65 72 |ster && |(Monster|
|00001610| 28 45 6e 65 6d 79 29 20 | 21 3d 20 4e 6f 6e 65 29 |(Enemy) |!= None)|
|00001620| 20 26 26 20 4e 65 77 45 | 6e 65 6d 79 2e 43 6f 6e | && NewE|nemy.Con|
|00001630| 74 72 6f 6c 6c 65 72 2e | 62 49 73 50 6c 61 79 65 |troller.|bIsPlaye|
|00001640| 72 20 29 0d 0a 09 09 72 | 65 74 75 72 6e 20 66 61 |r )....r|eturn fa|
|00001650| 6c 73 65 3b 0d 0a 0d 0a | 09 45 6e 65 6d 79 44 69 |lse;....|.EnemyDi|
|00001660| 73 74 20 3d 20 56 53 69 | 7a 65 28 45 6e 65 6d 79 |st = VSi|ze(Enemy|
|00001670| 2e 4c 6f 63 61 74 69 6f | 6e 20 2d 20 50 61 77 6e |.Locatio|n - Pawn|
|00001680| 2e 4c 6f 63 61 74 69 6f | 6e 29 3b 0d 0a 09 69 66 |.Locatio|n);...if|
|00001690| 20 28 20 45 6e 65 6d 79 | 44 69 73 74 20 3c 20 50 | ( Enemy|Dist < P|
|000016a0| 61 77 6e 2e 4d 65 6c 65 | 65 52 61 6e 67 65 20 29 |awn.Mele|eRange )|
|000016b0| 0d 0a 09 09 72 65 74 75 | 72 6e 20 66 61 6c 73 65 |....retu|rn false|
|000016c0| 3b 0d 0a 0d 0a 09 69 66 | 20 28 20 45 6e 65 6d 79 |;.....if| ( Enemy|
|000016d0| 44 69 73 74 20 3e 20 31 | 2e 37 20 2a 20 56 53 69 |Dist > 1|.7 * VSi|
|000016e0| 7a 65 28 4e 65 77 45 6e | 65 6d 79 2e 4c 6f 63 61 |ze(NewEn|emy.Loca|
|000016f0| 74 69 6f 6e 20 2d 20 50 | 61 77 6e 2e 4c 6f 63 61 |tion - P|awn.Loca|
|00001700| 74 69 6f 6e 29 29 0d 0a | 09 7b 0d 0a 09 09 43 68 |tion))..|.{....Ch|
|00001710| 61 6e 67 65 45 6e 65 6d | 79 28 4e 65 77 45 6e 65 |angeEnem|y(NewEne|
|00001720| 6d 79 2c 43 61 6e 53 65 | 65 28 4e 65 77 45 6e 65 |my,CanSe|e(NewEne|
|00001730| 6d 79 29 29 3b 0d 0a 09 | 09 72 65 74 75 72 6e 20 |my));...|.return |
|00001740| 74 72 75 65 3b 0d 0a 09 | 7d 0d 0a 09 72 65 74 75 |true;...|}...retu|
|00001750| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 7d 0d 0a 0d 0a |rn false|;..}....|
|00001760| 66 75 6e 63 74 69 6f 6e | 20 48 65 61 72 4e 6f 69 |function| HearNoi|
|00001770| 73 65 28 66 6c 6f 61 74 | 20 4c 6f 75 64 6e 65 73 |se(float| Loudnes|
|00001780| 73 2c 20 41 63 74 6f 72 | 20 4e 6f 69 73 65 4d 61 |s, Actor| NoiseMa|
|00001790| 6b 65 72 29 0d 0a 7b 0d | 0a 09 69 66 20 28 20 28 |ker)..{.|..if ( (|
|000017a0| 28 43 68 6f 6f 73 65 41 | 74 74 61 63 6b 43 6f 75 |(ChooseA|ttackCou|
|000017b0| 6e 74 65 72 20 3c 20 32 | 29 20 7c 7c 20 28 43 68 |nter < 2|) || (Ch|
|000017c0| 6f 6f 73 65 41 74 74 61 | 63 6b 54 69 6d 65 20 21 |ooseAtta|ckTime !|
|000017d0| 3d 20 4c 65 76 65 6c 2e | 54 69 6d 65 53 65 63 6f |= Level.|TimeSeco|
|000017e0| 6e 64 73 29 29 20 26 26 | 20 53 65 74 45 6e 65 6d |nds)) &&| SetEnem|
|000017f0| 79 28 4e 6f 69 73 65 4d | 61 6b 65 72 2e 69 6e 73 |y(NoiseM|aker.ins|
|00001800| 74 69 67 61 74 6f 72 29 | 20 29 0d 0a 09 09 57 68 |tigator)| )....Wh|
|00001810| 61 74 54 6f 44 6f 4e 65 | 78 74 28 32 29 3b 0d 0a |atToDoNe|xt(2);..|
|00001820| 7d 0d 0a 0d 0a 65 76 65 | 6e 74 20 53 65 65 50 6c |}....eve|nt SeePl|
|00001830| 61 79 65 72 28 50 61 77 | 6e 20 53 65 65 6e 50 6c |ayer(Paw|n SeenPl|
|00001840| 61 79 65 72 29 0d 0a 7b | 0d 0a 09 69 66 20 28 20 |ayer)..{|...if ( |
|00001850| 28 28 43 68 6f 6f 73 65 | 41 74 74 61 63 6b 43 6f |((Choose|AttackCo|
|00001860| 75 6e 74 65 72 20 3c 20 | 32 29 20 7c 7c 20 28 43 |unter < |2) || (C|
|00001870| 68 6f 6f 73 65 41 74 74 | 61 63 6b 54 69 6d 65 20 |hooseAtt|ackTime |
|00001880| 21 3d 20 4c 65 76 65 6c | 2e 54 69 6d 65 53 65 63 |!= Level|.TimeSec|
|00001890| 6f 6e 64 73 29 29 20 26 | 26 20 53 65 74 45 6e 65 |onds)) &|& SetEne|
|000018a0| 6d 79 28 53 65 65 6e 50 | 6c 61 79 65 72 29 20 29 |my(SeenP|layer) )|
|000018b0| 0d 0a 09 09 57 68 61 74 | 54 6f 44 6f 4e 65 78 74 |....What|ToDoNext|
|000018c0| 28 33 29 3b 0d 0a 09 69 | 66 20 28 20 45 6e 65 6d |(3);...i|f ( Enem|
|000018d0| 79 20 3d 3d 20 53 65 65 | 6e 50 6c 61 79 65 72 20 |y == See|nPlayer |
|000018e0| 29 0d 0a 09 7b 0d 0a 09 | 09 56 69 73 69 62 6c 65 |)...{...|.Visible|
|000018f0| 45 6e 65 6d 79 20 3d 20 | 45 6e 65 6d 79 3b 0d 0a |Enemy = |Enemy;..|
|00001900| 09 09 45 6e 65 6d 79 56 | 69 73 69 62 69 6c 69 74 |..EnemyV|isibilit|
|00001910| 79 54 69 6d 65 20 3d 20 | 4c 65 76 65 6c 2e 54 69 |yTime = |Level.Ti|
|00001920| 6d 65 53 65 63 6f 6e 64 | 73 3b 0d 0a 09 09 62 45 |meSecond|s;....bE|
|00001930| 6e 65 6d 79 49 73 56 69 | 73 69 62 6c 65 20 3d 20 |nemyIsVi|sible = |
|00001940| 74 72 75 65 3b 0d 0a 09 | 7d 0d 0a 7d 0d 0a 0d 0a |true;...|}..}....|
|00001950| 66 75 6e 63 74 69 6f 6e | 20 62 6f 6f 6c 20 43 6c |function| bool Cl|
|00001960| 65 61 72 53 68 6f 74 28 | 56 65 63 74 6f 72 20 54 |earShot(|Vector T|
|00001970| 61 72 67 65 74 4c 6f 63 | 2c 20 62 6f 6f 6c 20 62 |argetLoc|, bool b|
|00001980| 49 6d 6d 65 64 69 61 74 | 65 46 69 72 65 29 0d 0a |Immediat|eFire)..|
|00001990| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 62 6f 6f 6c 20 62 |{...loca|l bool b|
|000019a0| 53 65 65 54 61 72 67 65 | 74 3b 0d 0a 0d 0a 09 69 |SeeTarge|t;.....i|
|000019b0| 66 20 28 20 56 53 69 7a | 65 28 45 6e 65 6d 79 2e |f ( VSiz|e(Enemy.|
|000019c0| 4c 6f 63 61 74 69 6f 6e | 20 2d 20 54 61 72 67 65 |Location| - Targe|
|000019d0| 74 4c 6f 63 29 20 3e 20 | 4d 41 58 53 54 41 4b 45 |tLoc) > |MAXSTAKE|
|000019e0| 4f 55 54 44 49 53 54 20 | 29 0d 0a 09 09 72 65 74 |OUTDIST |)....ret|
|000019f0| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 0d 0a 09 62 |urn fals|e;.....b|
|00001a00| 53 65 65 54 61 72 67 65 | 74 20 3d 20 46 61 73 74 |SeeTarge|t = Fast|
|00001a10| 54 72 61 63 65 28 54 61 | 72 67 65 74 4c 6f 63 2c |Trace(Ta|rgetLoc,|
|00001a20| 20 50 61 77 6e 2e 4c 6f | 63 61 74 69 6f 6e 20 2b | Pawn.Lo|cation +|
|00001a30| 20 50 61 77 6e 2e 45 79 | 65 48 65 69 67 68 74 20 | Pawn.Ey|eHeight |
|00001a40| 2a 20 76 65 63 74 28 30 | 2c 30 2c 31 29 29 3b 0d |* vect(0|,0,1));.|
|00001a50| 0a 09 2f 2f 20 69 66 20 | 70 61 77 6e 20 69 73 20 |..// if |pawn is |
|00001a60| 63 72 6f 75 63 68 65 64 | 2c 20 63 68 65 63 6b 20 |crouched|, check |
|00001a70| 69 66 20 73 74 61 6e 64 | 69 6e 67 20 77 6f 75 6c |if stand|ing woul|
|00001a80| 64 20 70 72 6f 76 69 64 | 65 20 63 6c 65 61 72 20 |d provid|e clear |
|00001a90| 73 68 6f 74 0d 0a 09 69 | 66 20 28 20 21 62 49 6d |shot...i|f ( !bIm|
|00001aa0| 6d 65 64 69 61 74 65 46 | 69 72 65 20 26 26 20 21 |mediateF|ire && !|
|00001ab0| 62 53 65 65 54 61 72 67 | 65 74 20 26 26 20 50 61 |bSeeTarg|et && Pa|
|00001ac0| 77 6e 2e 62 49 73 43 72 | 6f 75 63 68 65 64 20 29 |wn.bIsCr|ouched )|
|00001ad0| 0d 0a 09 09 62 53 65 65 | 54 61 72 67 65 74 20 3d |....bSee|Target =|
|00001ae0| 20 46 61 73 74 54 72 61 | 63 65 28 54 61 72 67 65 | FastTra|ce(Targe|
|00001af0| 74 4c 6f 63 2c 20 50 61 | 77 6e 2e 4c 6f 63 61 74 |tLoc, Pa|wn.Locat|
|00001b00| 69 6f 6e 20 2b 20 28 50 | 61 77 6e 2e 44 65 66 61 |ion + (P|awn.Defa|
|00001b10| 75 6c 74 2e 45 79 65 48 | 65 69 67 68 74 20 2b 20 |ult.EyeH|eight + |
|00001b20| 50 61 77 6e 2e 44 65 66 | 61 75 6c 74 2e 43 6f 6c |Pawn.Def|ault.Col|
|00001b30| 6c 69 73 69 6f 6e 48 65 | 69 67 68 74 20 2d 20 50 |lisionHe|ight - P|
|00001b40| 61 77 6e 2e 43 6f 6c 6c | 69 73 69 6f 6e 48 65 69 |awn.Coll|isionHei|
|00001b50| 67 68 74 29 20 2a 20 76 | 65 63 74 28 30 2c 30 2c |ght) * v|ect(0,0,|
|00001b60| 31 29 29 3b 0d 0a 0d 0a | 09 69 66 20 28 20 21 62 |1));....|.if ( !b|
|00001b70| 53 65 65 54 61 72 67 65 | 74 20 7c 7c 20 21 46 61 |SeeTarge|t || !Fa|
|00001b80| 73 74 54 72 61 63 65 28 | 54 61 72 67 65 74 4c 6f |stTrace(|TargetLo|
|00001b90| 63 20 2c 20 45 6e 65 6d | 79 2e 4c 6f 63 61 74 69 |c , Enem|y.Locati|
|00001ba0| 6f 6e 20 2b 20 45 6e 65 | 6d 79 2e 42 61 73 65 45 |on + Ene|my.BaseE|
|00001bb0| 79 65 48 65 69 67 68 74 | 20 2a 20 76 65 63 74 28 |yeHeight| * vect(|
|00001bc0| 30 2c 30 2c 31 29 29 20 | 29 3b 0d 0a 09 09 72 65 |0,0,1)) |);....re|
|00001bd0| 74 75 72 6e 20 66 61 6c | 73 65 3b 0d 0a 09 69 66 |turn fal|se;...if|
|00001be0| 20 28 20 28 4d 6f 6e 73 | 74 65 72 28 50 61 77 6e | ( (Mons|ter(Pawn|
|00001bf0| 29 2e 53 70 6c 61 73 68 | 44 61 6d 61 67 65 28 29 |).Splash|Damage()|
|00001c00| 20 26 26 20 28 56 53 69 | 7a 65 28 50 61 77 6e 2e | && (VSi|ze(Pawn.|
|00001c10| 4c 6f 63 61 74 69 6f 6e | 20 2d 20 54 61 72 67 65 |Location| - Targe|
|00001c20| 74 4c 6f 63 29 20 3c 20 | 4d 6f 6e 73 74 65 72 28 |tLoc) < |Monster(|
|00001c30| 50 61 77 6e 29 2e 47 65 | 74 44 61 6d 61 67 65 52 |Pawn).Ge|tDamageR|
|00001c40| 61 64 69 75 73 28 29 29 | 29 0d 0a 09 09 7c 7c 20 |adius())|)....|| |
|00001c50| 21 46 61 73 74 54 72 61 | 63 65 28 54 61 72 67 65 |!FastTra|ce(Targe|
|00001c60| 74 4c 6f 63 20 2b 20 76 | 65 63 74 28 30 2c 30 2c |tLoc + v|ect(0,0,|
|00001c70| 30 2e 39 29 20 2a 20 45 | 6e 65 6d 79 2e 43 6f 6c |0.9) * E|nemy.Col|
|00001c80| 6c 69 73 69 6f 6e 48 65 | 69 67 68 74 2c 20 50 61 |lisionHe|ight, Pa|
|00001c90| 77 6e 2e 4c 6f 63 61 74 | 69 6f 6e 29 20 29 0d 0a |wn.Locat|ion) )..|
|00001ca0| 09 7b 0d 0a 09 09 53 74 | 6f 70 46 69 72 69 6e 67 |.{....St|opFiring|
|00001cb0| 28 29 3b 0d 0a 09 09 72 | 65 74 75 72 6e 20 66 61 |();....r|eturn fa|
|00001cc0| 6c 73 65 3b 0d 0a 09 7d | 0d 0a 09 72 65 74 75 72 |lse;...}|...retur|
|00001cd0| 6e 20 74 72 75 65 3b 0d | 0a 7d 0d 0a 0d 0a 2f 2a |n true;.|.}..../*|
|00001ce0| 20 43 68 65 63 6b 49 66 | 53 68 6f 75 6c 64 43 72 | CheckIf|ShouldCr|
|00001cf0| 6f 75 63 68 28 29 0d 0a | 72 65 74 75 72 6e 73 20 |ouch()..|returns |
|00001d00| 74 72 75 65 20 69 66 20 | 74 61 72 67 65 74 20 70 |true if |target p|
|00001d10| 6f 73 69 74 69 6f 6e 20 | 73 74 69 6c 6c 20 63 61 |osition |still ca|
|00001d20| 6e 20 62 65 20 73 68 6f | 74 20 66 72 6f 6d 20 63 |n be sho|t from c|
|00001d30| 72 6f 75 63 68 65 64 20 | 70 6f 73 69 74 69 6f 6e |rouched |position|
|00001d40| 2c 0d 0a 6f 72 20 69 66 | 20 63 6f 75 6c 64 6e 27 |,..or if| couldn'|
|00001d50| 74 20 68 69 74 20 69 74 | 20 66 72 6f 6d 20 73 74 |t hit it| from st|
|00001d60| 61 6e 64 69 6e 67 20 70 | 6f 73 69 74 69 6f 6e 20 |anding p|osition |
|00001d70| 65 69 74 68 65 72 0d 0a | 2a 2f 0d 0a 66 75 6e 63 |either..|*/..func|
|00001d80| 74 69 6f 6e 20 43 68 65 | 63 6b 49 66 53 68 6f 75 |tion Che|ckIfShou|
|00001d90| 6c 64 43 72 6f 75 63 68 | 28 76 65 63 74 6f 72 20 |ldCrouch|(vector |
|00001da0| 53 74 61 72 74 50 6f 73 | 69 74 69 6f 6e 2c 20 76 |StartPos|ition, v|
|00001db0| 65 63 74 6f 72 20 54 61 | 72 67 65 74 50 6f 73 69 |ector Ta|rgetPosi|
|00001dc0| 74 69 6f 6e 2c 20 66 6c | 6f 61 74 20 70 72 6f 62 |tion, fl|oat prob|
|00001dd0| 61 62 69 6c 69 74 79 29 | 0d 0a 7b 0d 0a 09 6c 6f |ability)|..{...lo|
|00001de0| 63 61 6c 20 61 63 74 6f | 72 20 48 69 74 41 63 74 |cal acto|r HitAct|
|00001df0| 6f 72 3b 0d 0a 09 6c 6f | 63 61 6c 20 76 65 63 74 |or;...lo|cal vect|
|00001e00| 6f 72 20 48 69 74 4e 6f | 72 6d 61 6c 2c 48 69 74 |or HitNo|rmal,Hit|
|00001e10| 4c 6f 63 61 74 69 6f 6e | 2c 20 58 2c 59 2c 5a 2c |Location|, X,Y,Z,|
|00001e20| 20 70 72 6f 6a 73 74 61 | 72 74 3b 0d 0a 0d 0a 09 | projsta|rt;.....|
|00001e30| 69 66 20 28 20 21 50 61 | 77 6e 2e 62 43 61 6e 43 |if ( !Pa|wn.bCanC|
|00001e40| 72 6f 75 63 68 20 7c 7c | 20 28 21 50 61 77 6e 2e |rouch ||| (!Pawn.|
|00001e50| 62 49 73 43 72 6f 75 63 | 68 65 64 20 26 26 20 28 |bIsCrouc|hed && (|
|00001e60| 46 52 61 6e 64 28 29 20 | 3e 20 70 72 6f 62 61 62 |FRand() |> probab|
|00001e70| 69 6c 69 74 79 29 29 0d | 0a 09 09 7c 7c 20 28 53 |ility)).|...|| (S|
|00001e80| 6b 69 6c 6c 20 3c 20 33 | 20 2a 20 46 52 61 6e 64 |kill < 3| * FRand|
|00001e90| 28 29 29 0d 0a 09 09 7c | 7c 20 4d 6f 6e 73 74 65 |())....||| Monste|
|00001ea0| 72 28 50 61 77 6e 29 2e | 52 65 63 6f 6d 6d 65 6e |r(Pawn).|Recommen|
|00001eb0| 64 53 70 6c 61 73 68 44 | 61 6d 61 67 65 28 29 20 |dSplashD|amage() |
|00001ec0| 29 0d 0a 09 7b 0d 0a 09 | 09 50 61 77 6e 2e 62 57 |)...{...|.Pawn.bW|
|00001ed0| 61 6e 74 73 54 6f 43 72 | 6f 75 63 68 20 3d 20 66 |antsToCr|ouch = f|
|00001ee0| 61 6c 73 65 3b 0d 0a 09 | 09 72 65 74 75 72 6e 3b |alse;...|.return;|
|00001ef0| 0d 0a 09 7d 0d 0a 0d 0a | 09 47 65 74 41 78 65 73 |...}....|.GetAxes|
|00001f00| 28 52 6f 74 61 74 69 6f | 6e 2c 58 2c 59 2c 5a 29 |(Rotatio|n,X,Y,Z)|
|00001f10| 3b 0d 0a 09 70 72 6f 6a | 53 74 61 72 74 20 3d 20 |;...proj|Start = |
|00001f20| 4d 6f 6e 73 74 65 72 28 | 50 61 77 6e 29 2e 47 65 |Monster(|Pawn).Ge|
|00001f30| 74 46 69 72 65 53 74 61 | 72 74 28 58 2c 59 2c 5a |tFireSta|rt(X,Y,Z|
|00001f40| 29 3b 0d 0a 09 70 72 6f | 6a 53 74 61 72 74 20 3d |);...pro|jStart =|
|00001f50| 20 70 72 6f 6a 53 74 61 | 72 74 20 2b 20 53 74 61 | projSta|rt + Sta|
|00001f60| 72 74 50 6f 73 69 74 69 | 6f 6e 20 2d 20 50 61 77 |rtPositi|on - Paw|
|00001f70| 6e 2e 4c 6f 63 61 74 69 | 6f 6e 3b 0d 0a 09 70 72 |n.Locati|on;...pr|
|00001f80| 6f 6a 53 74 61 72 74 2e | 5a 20 3d 20 70 72 6f 6a |ojStart.|Z = proj|
|00001f90| 53 74 61 72 74 2e 5a 20 | 2d 20 31 2e 38 20 2a 20 |Start.Z |- 1.8 * |
|00001fa0| 28 50 61 77 6e 2e 43 6f | 6c 6c 69 73 69 6f 6e 48 |(Pawn.Co|llisionH|
|00001fb0| 65 69 67 68 74 20 2d 20 | 50 61 77 6e 2e 43 72 6f |eight - |Pawn.Cro|
|00001fc0| 75 63 68 48 65 69 67 68 | 74 29 3b 0d 0a 09 48 69 |uchHeigh|t);...Hi|
|00001fd0| 74 41 63 74 6f 72 20 3d | 20 09 54 72 61 63 65 28 |tActor =| .Trace(|
|00001fe0| 48 69 74 4c 6f 63 61 74 | 69 6f 6e 2c 20 48 69 74 |HitLocat|ion, Hit|
|00001ff0| 4e 6f 72 6d 61 6c 2c 20 | 54 61 72 67 65 74 50 6f |Normal, |TargetPo|
|00002000| 73 69 74 69 6f 6e 20 2c | 20 70 72 6f 6a 53 74 61 |sition ,| projSta|
|00002010| 72 74 2c 20 66 61 6c 73 | 65 29 3b 0d 0a 09 69 66 |rt, fals|e);...if|
|00002020| 20 28 20 48 69 74 41 63 | 74 6f 72 20 3d 3d 20 4e | ( HitAc|tor == N|
|00002030| 6f 6e 65 20 29 0d 0a 09 | 7b 0d 0a 09 09 50 61 77 |one )...|{....Paw|
|00002040| 6e 2e 62 57 61 6e 74 73 | 54 6f 43 72 6f 75 63 68 |n.bWants|ToCrouch|
|00002050| 20 3d 20 74 72 75 65 3b | 0d 0a 09 09 72 65 74 75 | = true;|....retu|
|00002060| 72 6e 3b 0d 0a 09 7d 0d | 0a 0d 0a 09 70 72 6f 6a |rn;...}.|....proj|
|00002070| 53 74 61 72 74 2e 5a 20 | 3d 20 70 72 6f 6a 53 74 |Start.Z |= projSt|
|00002080| 61 72 74 2e 5a 20 2b 20 | 31 2e 38 20 2a 20 28 50 |art.Z + |1.8 * (P|
|00002090| 61 77 6e 2e 44 65 66 61 | 75 6c 74 2e 43 6f 6c 6c |awn.Defa|ult.Coll|
|000020a0| 69 73 69 6f 6e 48 65 69 | 67 68 74 20 2d 20 50 61 |isionHei|ght - Pa|
|000020b0| 77 6e 2e 43 72 6f 75 63 | 68 48 65 69 67 68 74 29 |wn.Crouc|hHeight)|
|000020c0| 3b 0d 0a 09 48 69 74 41 | 63 74 6f 72 20 3d 20 09 |;...HitA|ctor = .|
|000020d0| 54 72 61 63 65 28 48 69 | 74 4c 6f 63 61 74 69 6f |Trace(Hi|tLocatio|
|000020e0| 6e 2c 20 48 69 74 4e 6f | 72 6d 61 6c 2c 20 54 61 |n, HitNo|rmal, Ta|
|000020f0| 72 67 65 74 50 6f 73 69 | 74 69 6f 6e 20 2c 20 70 |rgetPosi|tion , p|
|00002100| 72 6f 6a 53 74 61 72 74 | 2c 20 66 61 6c 73 65 29 |rojStart|, false)|
|00002110| 3b 0d 0a 09 69 66 20 28 | 20 48 69 74 41 63 74 6f |;...if (| HitActo|
|00002120| 72 20 3d 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 7b 0d |r == Non|e )...{.|
|00002130| 0a 09 09 50 61 77 6e 2e | 62 57 61 6e 74 73 54 6f |...Pawn.|bWantsTo|
|00002140| 43 72 6f 75 63 68 20 3d | 20 66 61 6c 73 65 3b 0d |Crouch =| false;.|
|00002150| 0a 09 09 72 65 74 75 72 | 6e 3b 0d 0a 09 7d 0d 0a |...retur|n;...}..|
|00002160| 09 50 61 77 6e 2e 62 57 | 61 6e 74 73 54 6f 43 72 |.Pawn.bW|antsToCr|
|00002170| 6f 75 63 68 20 3d 20 74 | 72 75 65 3b 0d 0a 7d 0d |ouch = t|rue;..}.|
|00002180| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 54 72 69 67 |...funct|ion Trig|
|00002190| 67 65 72 28 20 61 63 74 | 6f 72 20 4f 74 68 65 72 |ger( act|or Other|
|000021a0| 2c 20 70 61 77 6e 20 45 | 76 65 6e 74 49 6e 73 74 |, pawn E|ventInst|
|000021b0| 69 67 61 74 6f 72 20 29 | 0d 0a 7b 0d 0a 09 69 66 |igator )|..{...if|
|000021c0| 20 28 20 28 4f 74 68 65 | 72 20 3d 3d 20 50 61 77 | ( (Othe|r == Paw|
|000021d0| 6e 29 20 7c 7c 20 28 50 | 61 77 6e 2e 48 65 61 6c |n) || (P|awn.Heal|
|000021e0| 74 68 20 3c 3d 20 30 29 | 20 29 0d 0a 09 09 72 65 |th <= 0)| )....re|
|000021f0| 74 75 72 6e 3b 0d 0a 09 | 53 65 74 45 6e 65 6d 79 |turn;...|SetEnemy|
|00002200| 28 45 76 65 6e 74 49 6e | 73 74 69 67 61 74 6f 72 |(EventIn|stigator|
|00002210| 2c 74 72 75 65 29 3b 0d | 0a 7d 0d 0a 0d 0a 66 75 |,true);.|.}....fu|
|00002220| 6e 63 74 69 6f 6e 20 53 | 65 74 45 6e 65 6d 79 49 |nction S|etEnemyI|
|00002230| 6e 66 6f 28 62 6f 6f 6c | 20 62 4e 65 77 45 6e 65 |nfo(bool| bNewEne|
|00002240| 6d 79 56 69 73 69 62 6c | 65 29 0d 0a 7b 0d 0a 09 |myVisibl|e)..{...|
|00002250| 41 63 71 75 69 72 65 54 | 69 6d 65 20 3d 20 4c 65 |AcquireT|ime = Le|
|00002260| 76 65 6c 2e 54 69 6d 65 | 53 65 63 6f 6e 64 73 3b |vel.Time|Seconds;|
|00002270| 0d 0a 09 69 66 20 28 20 | 62 4e 65 77 45 6e 65 6d |...if ( |bNewEnem|
|00002280| 79 56 69 73 69 62 6c 65 | 20 29 0d 0a 09 7b 0d 0a |yVisible| )...{..|
|00002290| 09 09 4c 61 73 74 53 65 | 65 6e 54 69 6d 65 20 3d |..LastSe|enTime =|
|000022a0| 20 4c 65 76 65 6c 2e 54 | 69 6d 65 53 65 63 6f 6e | Level.T|imeSecon|
|000022b0| 64 73 3b 0d 0a 09 09 4c | 61 73 74 53 65 65 6e 50 |ds;....L|astSeenP|
|000022c0| 6f 73 20 3d 20 45 6e 65 | 6d 79 2e 4c 6f 63 61 74 |os = Ene|my.Locat|
|000022d0| 69 6f 6e 3b 0d 0a 09 09 | 4c 61 73 74 53 65 65 69 |ion;....|LastSeei|
|000022e0| 6e 67 50 6f 73 20 3d 20 | 50 61 77 6e 2e 4c 6f 63 |ngPos = |Pawn.Loc|
|000022f0| 61 74 69 6f 6e 3b 0d 0a | 09 09 62 45 6e 65 6d 79 |ation;..|..bEnemy|
|00002300| 49 6e 66 6f 56 61 6c 69 | 64 20 3d 20 74 72 75 65 |InfoVali|d = true|
|00002310| 3b 0d 0a 09 7d 0d 0a 09 | 65 6c 73 65 0d 0a 09 7b |;...}...|else...{|
|00002320| 0d 0a 09 09 4c 61 73 74 | 53 65 65 6e 54 69 6d 65 |....Last|SeenTime|
|00002330| 20 3d 20 2d 31 30 30 30 | 3b 0d 0a 09 09 62 45 6e | = -1000|;....bEn|
|00002340| 65 6d 79 49 6e 66 6f 56 | 61 6c 69 64 20 3d 20 66 |emyInfoV|alid = f|
|00002350| 61 6c 73 65 3b 0d 0a 09 | 7d 0d 0a 7d 0d 0a 0d 0a |alse;...|}..}....|
|00002360| 2f 2f 20 45 6e 65 6d 79 | 43 68 61 6e 67 65 64 28 |// Enemy|Changed(|
|00002370| 29 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 20 63 75 |) called| when cu|
|00002380| 72 72 65 6e 74 20 65 6e | 65 6d 79 20 63 68 61 6e |rrent en|emy chan|
|00002390| 67 65 73 0d 0a 66 75 6e | 63 74 69 6f 6e 20 45 6e |ges..fun|ction En|
|000023a0| 65 6d 79 43 68 61 6e 67 | 65 64 28 62 6f 6f 6c 20 |emyChang|ed(bool |
|000023b0| 62 4e 65 77 45 6e 65 6d | 79 56 69 73 69 62 6c 65 |bNewEnem|yVisible|
|000023c0| 29 0d 0a 7b 0d 0a 09 62 | 45 6e 65 6d 79 41 63 71 |)..{...b|EnemyAcq|
|000023d0| 75 69 72 65 64 20 3d 20 | 66 61 6c 73 65 3b 0d 0a |uired = |false;..|
|000023e0| 09 53 65 74 45 6e 65 6d | 79 49 6e 66 6f 28 62 4e |.SetEnem|yInfo(bN|
|000023f0| 65 77 45 6e 65 6d 79 56 | 69 73 69 62 6c 65 29 3b |ewEnemyV|isible);|
|00002400| 0d 0a 09 4d 6f 6e 73 74 | 65 72 28 50 61 77 6e 29 |...Monst|er(Pawn)|
|00002410| 2e 50 6c 61 79 43 68 61 | 6c 6c 65 6e 67 65 53 6f |.PlayCha|llengeSo|
|00002420| 75 6e 64 28 29 3b 0d 0a | 7d 0d 0a 0d 0a 66 75 6e |und();..|}....fun|
|00002430| 63 74 69 6f 6e 20 62 6f | 6f 6c 20 53 74 72 61 66 |ction bo|ol Straf|
|00002440| 65 46 72 6f 6d 44 61 6d | 61 67 65 28 66 6c 6f 61 |eFromDam|age(floa|
|00002450| 74 20 44 61 6d 61 67 65 | 2c 20 63 6c 61 73 73 3c |t Damage|, class<|
|00002460| 44 61 6d 61 67 65 54 79 | 70 65 3e 20 44 61 6d 61 |DamageTy|pe> Dama|
|00002470| 67 65 54 79 70 65 2c 20 | 62 6f 6f 6c 20 62 46 69 |geType, |bool bFi|
|00002480| 6e 64 44 65 73 74 29 3b | 0d 0a 0d 0a 2f 2f 2a 2a |ndDest);|....//**|
|00002490| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000024a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000024b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000024c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000024d0| 2a 2a 2a 2a 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |****....|function|
|000024e0| 20 62 6f 6f 6c 20 4e 6f | 74 69 66 79 50 68 79 73 | bool No|tifyPhys|
|000024f0| 69 63 73 56 6f 6c 75 6d | 65 43 68 61 6e 67 65 28 |icsVolum|eChange(|
|00002500| 50 68 79 73 69 63 73 56 | 6f 6c 75 6d 65 20 4e 65 |PhysicsV|olume Ne|
|00002510| 77 56 6f 6c 75 6d 65 29 | 0d 0a 7b 0d 0a 09 6c 6f |wVolume)|..{...lo|
|00002520| 63 61 6c 20 76 65 63 74 | 6f 72 20 6a 75 6d 70 44 |cal vect|or jumpD|
|00002530| 69 72 3b 0d 0a 0d 0a 09 | 69 66 20 28 20 6e 65 77 |ir;.....|if ( new|
|00002540| 56 6f 6c 75 6d 65 2e 62 | 57 61 74 65 72 56 6f 6c |Volume.b|WaterVol|
|00002550| 75 6d 65 20 29 0d 0a 09 | 7b 0d 0a 09 09 69 66 20 |ume )...|{....if |
|00002560| 28 21 50 61 77 6e 2e 62 | 43 61 6e 53 77 69 6d 29 |(!Pawn.b|CanSwim)|
|00002570| 0d 0a 09 09 09 4d 6f 76 | 65 54 69 6d 65 72 20 3d |.....Mov|eTimer =|
|00002580| 20 2d 31 2e 30 3b 0d 0a | 09 09 65 6c 73 65 20 69 | -1.0;..|..else i|
|00002590| 66 20 28 50 61 77 6e 2e | 50 68 79 73 69 63 73 20 |f (Pawn.|Physics |
|000025a0| 21 3d 20 50 48 59 53 5f | 53 77 69 6d 6d 69 6e 67 |!= PHYS_|Swimming|
|000025b0| 29 0d 0a 09 09 09 50 61 | 77 6e 2e 73 65 74 50 68 |).....Pa|wn.setPh|
|000025c0| 79 73 69 63 73 28 50 48 | 59 53 5f 53 77 69 6d 6d |ysics(PH|YS_Swimm|
|000025d0| 69 6e 67 29 3b 0d 0a 09 | 7d 0d 0a 09 65 6c 73 65 |ing);...|}...else|
|000025e0| 20 69 66 20 28 50 61 77 | 6e 2e 50 68 79 73 69 63 | if (Paw|n.Physic|
|000025f0| 73 20 3d 3d 20 50 48 59 | 53 5f 53 77 69 6d 6d 69 |s == PHY|S_Swimmi|
|00002600| 6e 67 29 0d 0a 09 7b 0d | 0a 09 09 69 66 20 28 20 |ng)...{.|...if ( |
|00002610| 50 61 77 6e 2e 62 43 61 | 6e 46 6c 79 20 29 0d 0a |Pawn.bCa|nFly )..|
|00002620| 09 09 09 20 50 61 77 6e | 2e 53 65 74 50 68 79 73 |... Pawn|.SetPhys|
|00002630| 69 63 73 28 50 48 59 53 | 5f 46 6c 79 69 6e 67 29 |ics(PHYS|_Flying)|
|00002640| 3b 0d 0a 09 09 65 6c 73 | 65 0d 0a 09 09 7b 0d 0a |;....els|e....{..|
|00002650| 09 09 09 50 61 77 6e 2e | 53 65 74 50 68 79 73 69 |...Pawn.|SetPhysi|
|00002660| 63 73 28 50 48 59 53 5f | 46 61 6c 6c 69 6e 67 29 |cs(PHYS_|Falling)|
|00002670| 3b 0d 0a 09 09 09 69 66 | 20 28 20 50 61 77 6e 2e |;.....if| ( Pawn.|
|00002680| 62 43 61 6e 57 61 6c 6b | 20 26 26 20 28 41 62 73 |bCanWalk| && (Abs|
|00002690| 28 50 61 77 6e 2e 41 63 | 63 65 6c 65 72 61 74 69 |(Pawn.Ac|celerati|
|000026a0| 6f 6e 2e 58 29 20 2b 20 | 41 62 73 28 50 61 77 6e |on.X) + |Abs(Pawn|
|000026b0| 2e 41 63 63 65 6c 65 72 | 61 74 69 6f 6e 2e 59 29 |.Acceler|ation.Y)|
|000026c0| 20 3e 20 30 29 0d 0a 09 | 09 09 09 26 26 20 28 44 | > 0)...|...&& (D|
|000026d0| 65 73 74 69 6e 61 74 69 | 6f 6e 2e 5a 20 3e 3d 20 |estinati|on.Z >= |
|000026e0| 50 61 77 6e 2e 4c 6f 63 | 61 74 69 6f 6e 2e 5a 29 |Pawn.Loc|ation.Z)|
|000026f0| 0d 0a 09 09 09 09 26 26 | 20 50 61 77 6e 2e 43 68 |......&&| Pawn.Ch|
|00002700| 65 63 6b 57 61 74 65 72 | 4a 75 6d 70 28 6a 75 6d |eckWater|Jump(jum|
|00002710| 70 44 69 72 29 20 29 0d | 0a 09 09 09 09 50 61 77 |pDir) ).|.....Paw|
|00002720| 6e 2e 4a 75 6d 70 4f 75 | 74 4f 66 57 61 74 65 72 |n.JumpOu|tOfWater|
|00002730| 28 6a 75 6d 70 44 69 72 | 29 3b 0d 0a 09 09 7d 0d |(jumpDir|);....}.|
|00002740| 0a 09 7d 0d 0a 09 72 65 | 74 75 72 6e 20 66 61 6c |..}...re|turn fal|
|00002750| 73 65 3b 0d 0a 7d 0d 0a | 0d 0a 65 76 65 6e 74 20 |se;..}..|..event |
|00002760| 4e 6f 74 69 66 79 4d 69 | 73 73 65 64 4a 75 6d 70 |NotifyMi|ssedJump|
|00002770| 28 29 0d 0a 7b 0d 0a 09 | 69 66 20 28 20 50 61 77 |()..{...|if ( Paw|
|00002780| 6e 2e 62 43 61 6e 46 6c | 79 20 29 0d 0a 09 09 50 |n.bCanFl|y )....P|
|00002790| 61 77 6e 2e 53 65 74 50 | 68 79 73 69 63 73 28 50 |awn.SetP|hysics(P|
|000027a0| 48 59 53 5f 46 6c 79 69 | 6e 67 29 3b 0d 0a 7d 0d |HYS_Flyi|ng);..}.|
|000027b0| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 50 6f 73 73 |...funct|ion Poss|
|000027c0| 65 73 73 28 50 61 77 6e | 20 61 50 61 77 6e 29 0d |ess(Pawn| aPawn).|
|000027d0| 0a 7b 0d 0a 09 53 75 70 | 65 72 2e 50 6f 73 73 65 |.{...Sup|er.Posse|
|000027e0| 73 73 28 61 50 61 77 6e | 29 3b 0d 0a 09 49 6e 69 |ss(aPawn|);...Ini|
|000027f0| 74 69 61 6c 69 7a 65 53 | 6b 69 6c 6c 28 44 65 61 |tializeS|kill(Dea|
|00002800| 74 68 4d 61 74 63 68 28 | 4c 65 76 65 6c 2e 47 61 |thMatch(|Level.Ga|
|00002810| 6d 65 29 2e 41 64 6a 75 | 73 74 65 64 44 69 66 66 |me).Adju|stedDiff|
|00002820| 69 63 75 6c 74 79 29 3b | 0d 0a 09 50 61 77 6e 2e |iculty);|...Pawn.|
|00002830| 4d 61 78 46 61 6c 6c 53 | 70 65 65 64 20 3d 20 31 |MaxFallS|peed = 1|
|00002840| 2e 31 20 2a 20 50 61 77 | 6e 2e 64 65 66 61 75 6c |.1 * Paw|n.defaul|
|00002850| 74 2e 4d 61 78 46 61 6c | 6c 53 70 65 65 64 3b 20 |t.MaxFal|lSpeed; |
|00002860| 2f 2f 20 73 6f 20 62 6f | 74 73 20 77 69 6c 6c 20 |// so bo|ts will |
|00002870| 61 63 63 65 70 74 20 61 | 20 6c 69 74 74 6c 65 20 |accept a| little |
|00002880| 66 61 6c 6c 69 6e 67 20 | 64 61 6d 61 67 65 20 66 |falling |damage f|
|00002890| 6f 72 20 73 68 6f 72 74 | 65 72 20 72 6f 75 74 65 |or short|er route|
|000028a0| 73 0d 0a 09 50 61 77 6e | 2e 53 65 74 4d 6f 76 65 |s...Pawn|.SetMove|
|000028b0| 6d 65 6e 74 50 68 79 73 | 69 63 73 28 29 3b 0d 0a |mentPhys|ics();..|
|000028c0| 09 69 66 20 28 50 61 77 | 6e 2e 50 68 79 73 69 63 |.if (Paw|n.Physic|
|000028d0| 73 20 3d 3d 20 50 48 59 | 53 5f 57 61 6c 6b 69 6e |s == PHY|S_Walkin|
|000028e0| 67 29 0d 0a 09 09 50 61 | 77 6e 2e 53 65 74 50 68 |g)....Pa|wn.SetPh|
|000028f0| 79 73 69 63 73 28 50 48 | 59 53 5f 46 61 6c 6c 69 |ysics(PH|YS_Falli|
|00002900| 6e 67 29 3b 0d 0a 09 57 | 68 61 74 54 6f 44 6f 4e |ng);...W|hatToDoN|
|00002910| 65 78 74 28 31 29 3b 0d | 0a 09 65 6e 61 62 6c 65 |ext(1);.|..enable|
|00002920| 28 27 4e 6f 74 69 66 79 | 42 75 6d 70 27 29 3b 0d |('Notify|Bump');.|
|00002930| 0a 7d 0d 0a 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 49 |.}....fu|nction I|
|00002940| 6e 69 74 69 61 6c 69 7a | 65 53 6b 69 6c 6c 28 66 |nitializ|eSkill(f|
|00002950| 6c 6f 61 74 20 49 6e 53 | 6b 69 6c 6c 29 0d 0a 7b |loat InS|kill)..{|
|00002960| 0d 0a 09 53 6b 69 6c 6c | 20 3d 20 46 43 6c 61 6d |...Skill| = FClam|
|00002970| 70 28 49 6e 53 6b 69 6c | 6c 2c 20 30 2c 20 37 29 |p(InSkil|l, 0, 7)|
|00002980| 3b 0d 0a 09 52 65 53 65 | 74 53 6b 69 6c 6c 28 29 |;...ReSe|tSkill()|
|00002990| 3b 0d 0a 7d 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |;..}....|function|
|000029a0| 20 52 65 73 65 74 53 6b | 69 6c 6c 28 29 0d 0a 7b | ResetSk|ill()..{|
|000029b0| 0d 0a 09 6c 6f 63 61 6c | 20 66 6c 6f 61 74 20 41 |...local| float A|
|000029c0| 64 6a 75 73 74 65 64 59 | 61 77 3b 0d 0a 0d 0a 09 |djustedY|aw;.....|
|000029d0| 62 4c 65 61 64 54 61 72 | 67 65 74 20 3d 20 28 20 |bLeadTar|get = ( |
|000029e0| 53 6b 69 6c 6c 20 3e 3d | 20 34 20 29 3b 0d 0a 09 |Skill >=| 4 );...|
|000029f0| 53 65 74 43 6f 6d 62 61 | 74 54 69 6d 65 72 28 29 |SetComba|tTimer()|
|00002a00| 3b 0d 0a 09 53 65 74 50 | 65 72 69 70 68 65 72 61 |;...SetP|eriphera|
|00002a10| 6c 56 69 73 69 6f 6e 28 | 29 3b 0d 0a 09 69 66 20 |lVision(|);...if |
|00002a20| 28 20 53 6b 69 6c 6c 20 | 2b 20 52 65 61 63 74 69 |( Skill |+ Reacti|
|00002a30| 6f 6e 54 69 6d 65 20 3e | 20 37 20 29 0d 0a 09 09 |onTime >| 7 )....|
|00002a40| 52 6f 74 61 74 69 6f 6e | 52 61 74 65 2e 59 61 77 |Rotation|Rate.Yaw|
|00002a50| 20 3d 20 39 30 30 30 30 | 3b 0d 0a 09 65 6c 73 65 | = 90000|;...else|
|00002a60| 20 69 66 20 28 20 53 6b | 69 6c 6c 20 2b 20 52 65 | if ( Sk|ill + Re|
|00002a70| 61 63 74 69 6f 6e 54 69 | 6d 65 20 3e 3d 20 34 20 |actionTi|me >= 4 |
|00002a80| 29 0d 0a 09 09 52 6f 74 | 61 74 69 6f 6e 52 61 74 |)....Rot|ationRat|
|00002a90| 65 2e 59 61 77 20 3d 20 | 32 30 30 30 30 20 2b 20 |e.Yaw = |20000 + |
|00002aa0| 37 30 30 30 20 2a 20 28 | 73 6b 69 6c 6c 20 2b 20 |7000 * (|skill + |
|00002ab0| 52 65 61 63 74 69 6f 6e | 54 69 6d 65 29 3b 0d 0a |Reaction|Time);..|
|00002ac0| 09 65 6c 73 65 0d 0a 09 | 09 52 6f 74 61 74 69 6f |.else...|.Rotatio|
|00002ad0| 6e 52 61 74 65 2e 59 61 | 77 20 3d 20 33 30 30 30 |nRate.Ya|w = 3000|
|00002ae0| 30 20 2b 20 34 30 30 30 | 20 2a 20 28 73 6b 69 6c |0 + 4000| * (skil|
|00002af0| 6c 20 2b 20 52 65 61 63 | 74 69 6f 6e 54 69 6d 65 |l + Reac|tionTime|
|00002b00| 29 3b 0d 0a 20 20 20 20 | 41 64 6a 75 73 74 65 64 |);.. |Adjusted|
|00002b10| 59 61 77 20 3d 20 28 30 | 2e 37 35 20 2b 20 30 2e |Yaw = (0|.75 + 0.|
|00002b20| 30 35 20 2a 20 52 65 61 | 63 74 69 6f 6e 54 69 6d |05 * Rea|ctionTim|
|00002b30| 65 29 20 2a 20 52 6f 74 | 61 74 69 6f 6e 52 61 74 |e) * Rot|ationRat|
|00002b40| 65 2e 59 61 77 3b 0d 0a | 09 41 63 71 75 69 73 69 |e.Yaw;..|.Acquisi|
|00002b50| 74 69 6f 6e 59 61 77 52 | 61 74 65 20 3d 20 41 64 |tionYawR|ate = Ad|
|00002b60| 6a 75 73 74 65 64 59 61 | 77 3b 0d 0a 09 53 65 74 |justedYa|w;...Set|
|00002b70| 4d 61 78 44 65 73 69 72 | 65 64 53 70 65 65 64 28 |MaxDesir|edSpeed(|
|00002b80| 29 3b 0d 0a 7d 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |);..}...|.functio|
|00002b90| 6e 20 53 65 74 4d 61 78 | 44 65 73 69 72 65 64 53 |n SetMax|DesiredS|
|00002ba0| 70 65 65 64 28 29 0d 0a | 7b 0d 0a 09 69 66 20 28 |peed()..|{...if (|
|00002bb0| 20 50 61 77 6e 20 21 3d | 20 4e 6f 6e 65 20 29 0d | Pawn !=| None ).|
|00002bc0| 0a 09 7b 0d 0a 09 09 69 | 66 20 28 20 53 6b 69 6c |..{....i|f ( Skil|
|00002bd0| 6c 20 3e 20 33 20 29 0d | 0a 09 09 09 50 61 77 6e |l > 3 ).|....Pawn|
|00002be0| 2e 4d 61 78 44 65 73 69 | 72 65 64 53 70 65 65 64 |.MaxDesi|redSpeed|
|00002bf0| 20 3d 20 31 3b 0d 0a 09 | 09 65 6c 73 65 0d 0a 09 | = 1;...|.else...|
|00002c00| 09 09 50 61 77 6e 2e 4d | 61 78 44 65 73 69 72 65 |..Pawn.M|axDesire|
|00002c10| 64 53 70 65 65 64 20 3d | 20 30 2e 36 20 2b 20 30 |dSpeed =| 0.6 + 0|
|00002c20| 2e 31 20 2a 20 53 6b 69 | 6c 6c 3b 0d 0a 09 7d 0d |.1 * Ski|ll;...}.|
|00002c30| 0a 7d 0d 0a 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 53 |.}....fu|nction S|
|00002c40| 65 74 50 65 72 69 70 68 | 65 72 61 6c 56 69 73 69 |etPeriph|eralVisi|
|00002c50| 6f 6e 28 29 0d 0a 7b 0d | 0a 09 69 66 20 28 20 50 |on()..{.|..if ( P|
|00002c60| 61 77 6e 20 3d 3d 20 4e | 6f 6e 65 20 29 0d 0a 09 |awn == N|one )...|
|00002c70| 09 72 65 74 75 72 6e 3b | 0d 0a 09 69 66 20 28 20 |.return;|...if ( |
|00002c80| 53 6b 69 6c 6c 20 3c 20 | 32 20 29 0d 0a 09 09 50 |Skill < |2 )....P|
|00002c90| 61 77 6e 2e 50 65 72 69 | 70 68 65 72 61 6c 56 69 |awn.Peri|pheralVi|
|00002ca0| 73 69 6f 6e 20 3d 20 30 | 2e 37 3b 0d 0a 09 65 6c |sion = 0|.7;...el|
|00002cb0| 73 65 20 69 66 20 28 20 | 53 6b 69 6c 6c 20 3e 20 |se if ( |Skill > |
|00002cc0| 35 20 29 0d 0a 09 09 50 | 61 77 6e 2e 50 65 72 69 |5 )....P|awn.Peri|
|00002cd0| 70 68 65 72 61 6c 56 69 | 73 69 6f 6e 20 3d 20 30 |pheralVi|sion = 0|
|00002ce0| 3b 0d 0a 09 65 6c 73 65 | 0d 0a 09 09 50 61 77 6e |;...else|....Pawn|
|00002cf0| 2e 50 65 72 69 70 68 65 | 72 61 6c 56 69 73 69 6f |.Periphe|ralVisio|
|00002d00| 6e 20 3d 20 31 2e 30 20 | 2d 20 30 2e 32 20 2a 20 |n = 1.0 |- 0.2 * |
|00002d10| 73 6b 69 6c 6c 3b 0d 0a | 0d 0a 09 50 61 77 6e 2e |skill;..|...Pawn.|
|00002d20| 53 69 67 68 74 52 61 64 | 69 75 73 20 3d 20 50 61 |SightRad|ius = Pa|
|00002d30| 77 6e 2e 44 65 66 61 75 | 6c 74 2e 53 69 67 68 74 |wn.Defau|lt.Sight|
|00002d40| 52 61 64 69 75 73 3b 0d | 0a 7d 0d 0a 0d 0a 2f 2f |Radius;.|.}....//|
|00002d50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002d60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002d70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002d80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002d90| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0d 0a 66 |========|=====..f|
|00002da0| 75 6e 63 74 69 6f 6e 20 | 57 68 61 74 54 6f 44 6f |unction |WhatToDo|
|00002db0| 4e 65 78 74 28 62 79 74 | 65 20 43 61 6c 6c 69 6e |Next(byt|e Callin|
|00002dc0| 67 42 79 74 65 29 0d 0a | 7b 0d 0a 09 69 66 20 28 |gByte)..|{...if (|
|00002dd0| 20 43 68 6f 6f 73 69 6e | 67 41 74 74 61 63 6b 4c | Choosin|gAttackL|
|00002de0| 65 76 65 6c 20 3e 20 30 | 20 29 0d 0a 09 09 6c 6f |evel > 0| )....lo|
|00002df0| 67 28 22 43 48 4f 4f 53 | 45 41 54 54 41 43 4b 41 |g("CHOOS|EATTACKA|
|00002e00| 47 41 49 4e 20 69 6e 20 | 73 74 61 74 65 20 22 24 |GAIN in |state "$|
|00002e10| 47 65 74 53 74 61 74 65 | 4e 61 6d 65 28 29 24 22 |GetState|Name()$"|
|00002e20| 20 65 6e 65 6d 79 20 22 | 24 47 65 74 45 6e 65 6d | enemy "|$GetEnem|
|00002e30| 79 4e 61 6d 65 28 29 24 | 22 20 6f 6c 64 20 65 6e |yName()$|" old en|
|00002e40| 65 6d 79 20 22 24 47 65 | 74 4f 6c 64 45 6e 65 6d |emy "$Ge|tOldEnem|
|00002e50| 79 4e 61 6d 65 28 29 24 | 22 20 43 41 4c 4c 49 4e |yName()$|" CALLIN|
|00002e60| 47 20 42 59 54 45 20 22 | 24 43 61 6c 6c 69 6e 67 |G BYTE "|$Calling|
|00002e70| 42 79 74 65 29 3b 0d 0a | 0d 0a 09 69 66 20 28 20 |Byte);..|...if ( |
|00002e80| 43 68 6f 6f 73 65 41 74 | 74 61 63 6b 54 69 6d 65 |ChooseAt|tackTime|
|00002e90| 20 3d 3d 20 4c 65 76 65 | 6c 2e 54 69 6d 65 53 65 | == Leve|l.TimeSe|
|00002ea0| 63 6f 6e 64 73 20 29 0d | 0a 09 7b 0d 0a 09 09 43 |conds ).|..{....C|
|00002eb0| 68 6f 6f 73 65 41 74 74 | 61 63 6b 43 6f 75 6e 74 |hooseAtt|ackCount|
|00002ec0| 65 72 2b 2b 3b 0d 0a 09 | 09 69 66 20 28 20 43 68 |er++;...|.if ( Ch|
|00002ed0| 6f 6f 73 65 41 74 74 61 | 63 6b 43 6f 75 6e 74 65 |ooseAtta|ckCounte|
|00002ee0| 72 20 3e 20 33 20 29 0d | 0a 09 09 09 6c 6f 67 28 |r > 3 ).|....log(|
|00002ef0| 22 43 48 4f 4f 53 45 41 | 54 54 41 43 4b 53 45 52 |"CHOOSEA|TTACKSER|
|00002f00| 49 41 4c 20 69 6e 20 73 | 74 61 74 65 20 22 24 47 |IAL in s|tate "$G|
|00002f10| 65 74 53 74 61 74 65 4e | 61 6d 65 28 29 24 22 20 |etStateN|ame()$" |
|00002f20| 65 6e 65 6d 79 20 22 24 | 47 65 74 45 6e 65 6d 79 |enemy "$|GetEnemy|
|00002f30| 4e 61 6d 65 28 29 24 22 | 20 6f 6c 64 20 65 6e 65 |Name()$"| old ene|
|00002f40| 6d 79 20 22 24 47 65 74 | 4f 6c 64 45 6e 65 6d 79 |my "$Get|OldEnemy|
|00002f50| 4e 61 6d 65 28 29 24 22 | 20 43 41 4c 4c 49 4e 47 |Name()$"| CALLING|
|00002f60| 20 42 59 54 45 20 22 24 | 43 61 6c 6c 69 6e 67 42 | BYTE "$|CallingB|
|00002f70| 79 74 65 29 3b 0d 0a 09 | 7d 0d 0a 09 65 6c 73 65 |yte);...|}...else|
|00002f80| 0d 0a 09 7b 0d 0a 09 09 | 43 68 6f 6f 73 65 41 74 |...{....|ChooseAt|
|00002f90| 74 61 63 6b 54 69 6d 65 | 20 3d 20 4c 65 76 65 6c |tackTime| = Level|
|00002fa0| 2e 54 69 6d 65 53 65 63 | 6f 6e 64 73 3b 0d 0a 09 |.TimeSec|onds;...|
|00002fb0| 09 43 68 6f 6f 73 65 41 | 74 74 61 63 6b 43 6f 75 |.ChooseA|ttackCou|
|00002fc0| 6e 74 65 72 20 3d 20 30 | 3b 0d 0a 09 7d 0d 0a 09 |nter = 0|;...}...|
|00002fd0| 69 66 20 28 20 4d 6f 6e | 73 74 65 72 28 50 61 77 |if ( Mon|ster(Paw|
|00002fe0| 6e 29 2e 62 54 72 79 54 | 6f 57 61 6c 6b 20 26 26 |n).bTryT|oWalk &&|
|00002ff0| 20 28 50 61 77 6e 2e 50 | 68 79 73 69 63 73 20 3d | (Pawn.P|hysics =|
|00003000| 3d 20 50 48 59 53 5f 46 | 6c 79 69 6e 67 29 20 26 |= PHYS_F|lying) &|
|00003010| 26 20 28 43 68 6f 6f 73 | 69 6e 67 41 74 74 61 63 |& (Choos|ingAttac|
|00003020| 6b 4c 65 76 65 6c 20 3d | 3d 20 30 29 20 26 26 20 |kLevel =|= 0) && |
|00003030| 28 43 68 6f 6f 73 65 41 | 74 74 61 63 6b 43 6f 75 |(ChooseA|ttackCou|
|00003040| 6e 74 65 72 20 3d 3d 20 | 30 29 20 29 0d 0a 09 09 |nter == |0) )....|
|00003050| 54 72 79 54 6f 57 61 6c | 6b 28 29 3b 0d 0a 09 43 |TryToWal|k();...C|
|00003060| 68 6f 6f 73 69 6e 67 41 | 74 74 61 63 6b 4c 65 76 |hoosingA|ttackLev|
|00003070| 65 6c 2b 2b 3b 0d 0a 09 | 45 78 65 63 75 74 65 57 |el++;...|ExecuteW|
|00003080| 68 61 74 54 6f 44 6f 4e | 65 78 74 28 29 3b 0d 0a |hatToDoN|ext();..|
|00003090| 09 43 68 6f 6f 73 69 6e | 67 41 74 74 61 63 6b 4c |.Choosin|gAttackL|
|000030a0| 65 76 65 6c 2d 2d 3b 0d | 0a 7d 0d 0a 0d 0a 2f 2a |evel--;.|.}..../*|
|000030b0| 20 43 68 65 63 6b 20 69 | 66 20 6a 75 73 74 20 61 | Check i|f just a|
|000030c0| 62 6f 76 65 20 67 72 6f | 75 6e 64 20 2d 20 69 66 |bove gro|und - if|
|000030d0| 20 73 6f 20 6c 61 6e 64 | 0d 0a 2a 2f 0d 0a 66 75 | so land|..*/..fu|
|000030e0| 6e 63 74 69 6f 6e 20 54 | 72 79 54 6f 57 61 6c 6b |nction T|ryToWalk|
|000030f0| 28 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 76 65 |()..{...|local ve|
|00003100| 63 74 6f 72 20 48 69 74 | 4c 6f 63 61 74 69 6f 6e |ctor Hit|Location|
|00003110| 2c 20 48 69 74 4e 6f 72 | 6d 61 6c 2c 20 45 78 74 |, HitNor|mal, Ext|
|00003120| 65 6e 74 3b 0d 0a 09 6c | 6f 63 61 6c 20 61 63 74 |ent;...l|ocal act|
|00003130| 6f 72 20 48 69 74 41 63 | 74 6f 72 3b 0d 0a 0d 0a |or HitAc|tor;....|
|00003140| 09 69 66 20 28 20 50 61 | 77 6e 2e 50 68 79 73 69 |.if ( Pa|wn.Physi|
|00003150| 63 73 56 6f 6c 75 6d 65 | 2e 62 57 61 74 65 72 56 |csVolume|.bWaterV|
|00003160| 6f 6c 75 6d 65 20 29 0d | 0a 09 09 72 65 74 75 72 |olume ).|...retur|
|00003170| 6e 3b 0d 0a 0d 0a 09 45 | 78 74 65 6e 74 20 3d 20 |n;.....E|xtent = |
|00003180| 50 61 77 6e 2e 47 65 74 | 43 6f 6c 6c 69 73 69 6f |Pawn.Get|Collisio|
|00003190| 6e 45 78 74 65 6e 74 28 | 29 3b 0d 0a 09 48 69 74 |nExtent(|);...Hit|
|000031a0| 41 63 74 6f 72 20 3d 20 | 54 72 61 63 65 28 48 69 |Actor = |Trace(Hi|
|000031b0| 74 4c 6f 63 61 74 69 6f | 6e 2c 20 48 69 74 4e 6f |tLocatio|n, HitNo|
|000031c0| 72 6d 61 6c 2c 20 50 61 | 77 6e 2e 4c 6f 63 61 74 |rmal, Pa|wn.Locat|
|000031d0| 69 6f 6e 20 2d 20 76 65 | 63 74 28 30 2c 30 2c 31 |ion - ve|ct(0,0,1|
|000031e0| 30 30 29 2c 20 50 61 77 | 6e 2e 4c 6f 63 61 74 69 |00), Paw|n.Locati|
|000031f0| 6f 6e 2c 20 66 61 6c 73 | 65 2c 20 45 78 74 65 6e |on, fals|e, Exten|
|00003200| 74 29 3b 0d 0a 09 69 66 | 20 28 20 28 48 69 74 41 |t);...if| ( (HitA|
|00003210| 63 74 6f 72 20 21 3d 20 | 4e 6f 6e 65 29 20 26 26 |ctor != |None) &&|
|00003220| 20 48 69 74 41 63 74 6f | 72 2e 62 57 6f 72 6c 64 | HitActo|r.bWorld|
|00003230| 47 65 6f 6d 65 74 72 79 | 20 26 26 20 28 48 69 74 |Geometry| && (Hit|
|00003240| 4e 6f 72 6d 61 6c 2e 5a | 20 3e 20 4d 49 4e 46 4c |Normal.Z| > MINFL|
|00003250| 4f 4f 52 5a 29 20 29 0d | 0a 09 09 50 61 77 6e 2e |OORZ) ).|...Pawn.|
|00003260| 53 65 74 50 68 79 73 69 | 63 73 28 50 48 59 53 5f |SetPhysi|cs(PHYS_|
|00003270| 46 61 6c 6c 69 6e 67 29 | 3b 0d 0a 7d 0d 0a 0d 0a |Falling)|;..}....|
|00003280| 66 75 6e 63 74 69 6f 6e | 20 73 74 72 69 6e 67 20 |function| string |
|00003290| 47 65 74 4f 6c 64 45 6e | 65 6d 79 4e 61 6d 65 28 |GetOldEn|emyName(|
|000032a0| 29 0d 0a 7b 0d 0a 09 69 | 66 20 28 20 4f 6c 64 45 |)..{...i|f ( OldE|
|000032b0| 6e 65 6d 79 20 3d 3d 20 | 4e 6f 6e 65 20 29 0d 0a |nemy == |None )..|
|000032c0| 09 09 72 65 74 75 72 6e | 20 22 4e 4f 4e 45 22 3b |..return| "NONE";|
|000032d0| 0d 0a 09 65 6c 73 65 0d | 0a 09 09 72 65 74 75 72 |...else.|...retur|
|000032e0| 6e 20 4f 6c 64 45 6e 65 | 6d 79 2e 47 65 74 48 75 |n OldEne|my.GetHu|
|000032f0| 6d 61 6e 52 65 61 64 61 | 62 6c 65 4e 61 6d 65 28 |manReada|bleName(|
|00003300| 29 3b 0d 0a 7d 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |);..}...|.functio|
|00003310| 6e 20 73 74 72 69 6e 67 | 20 47 65 74 45 6e 65 6d |n string| GetEnem|
|00003320| 79 4e 61 6d 65 28 29 0d | 0a 7b 0d 0a 09 69 66 20 |yName().|.{...if |
|00003330| 28 20 45 6e 65 6d 79 20 | 3d 3d 20 4e 6f 6e 65 20 |( Enemy |== None |
|00003340| 29 0d 0a 09 09 72 65 74 | 75 72 6e 20 22 4e 4f 4e |)....ret|urn "NON|
|00003350| 45 22 3b 0d 0a 09 65 6c | 73 65 0d 0a 09 09 72 65 |E";...el|se....re|
|00003360| 74 75 72 6e 20 45 6e 65 | 6d 79 2e 47 65 74 48 75 |turn Ene|my.GetHu|
|00003370| 6d 61 6e 52 65 61 64 61 | 62 6c 65 4e 61 6d 65 28 |manReada|bleName(|
|00003380| 29 3b 0d 0a 7d 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |);..}...|.functio|
|00003390| 6e 20 45 78 65 63 75 74 | 65 57 68 61 74 54 6f 44 |n Execut|eWhatToD|
|000033a0| 6f 4e 65 78 74 28 29 0d | 0a 7b 0d 0a 09 62 48 61 |oNext().|.{...bHa|
|000033b0| 73 46 69 72 65 64 20 3d | 20 66 61 6c 73 65 3b 0d |sFired =| false;.|
|000033c0| 0a 09 47 6f 61 6c 53 74 | 72 69 6e 67 20 3d 20 22 |..GoalSt|ring = "|
|000033d0| 57 68 61 74 54 6f 44 6f | 4e 65 78 74 20 61 74 20 |WhatToDo|Next at |
|000033e0| 22 24 4c 65 76 65 6c 2e | 54 69 6d 65 53 65 63 6f |"$Level.|TimeSeco|
|000033f0| 6e 64 73 3b 0d 0a 09 69 | 66 20 28 20 50 61 77 6e |nds;...i|f ( Pawn|
|00003400| 20 3d 3d 20 4e 6f 6e 65 | 20 29 0d 0a 09 7b 0d 0a | == None| )...{..|
|00003410| 09 09 77 61 72 6e 28 47 | 65 74 48 75 6d 61 6e 52 |..warn(G|etHumanR|
|00003420| 65 61 64 61 62 6c 65 4e | 61 6d 65 28 29 24 22 20 |eadableN|ame()$" |
|00003430| 57 68 61 74 54 6f 44 6f | 4e 65 78 74 20 77 69 74 |WhatToDo|Next wit|
|00003440| 68 20 6e 6f 20 70 61 77 | 6e 22 29 3b 0d 0a 09 09 |h no paw|n");....|
|00003450| 72 65 74 75 72 6e 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 |return;.|..}.....|
|00003460| 69 66 20 28 20 62 50 72 | 65 70 61 72 69 6e 67 4d |if ( bPr|eparingM|
|00003470| 6f 76 65 20 26 26 20 4d | 6f 6e 73 74 65 72 28 50 |ove && M|onster(P|
|00003480| 61 77 6e 29 2e 62 53 68 | 6f 74 41 6e 69 6d 20 29 |awn).bSh|otAnim )|
|00003490| 0d 0a 09 7b 0d 0a 09 09 | 50 61 77 6e 2e 41 63 63 |...{....|Pawn.Acc|
|000034a0| 65 6c 65 72 61 74 69 6f | 6e 20 3d 20 76 65 63 74 |eleratio|n = vect|
|000034b0| 28 30 2c 30 2c 30 29 3b | 0d 0a 09 09 47 6f 74 6f |(0,0,0);|....Goto|
|000034c0| 53 74 61 74 65 28 27 57 | 61 69 74 46 6f 72 41 6e |State('W|aitForAn|
|000034d0| 69 6d 27 29 3b 0d 0a 09 | 09 72 65 74 75 72 6e 3b |im');...|.return;|
|000034e0| 0d 0a 09 7d 0d 0a 09 69 | 66 20 28 50 61 77 6e 2e |...}...i|f (Pawn.|
|000034f0| 50 68 79 73 69 63 73 20 | 3d 3d 20 50 48 59 53 5f |Physics |== PHYS_|
|00003500| 4e 6f 6e 65 29 0d 0a 09 | 09 50 61 77 6e 2e 53 65 |None)...|.Pawn.Se|
|00003510| 74 4d 6f 76 65 6d 65 6e | 74 50 68 79 73 69 63 73 |tMovemen|tPhysics|
|00003520| 28 29 3b 0d 0a 09 69 66 | 20 28 20 28 50 61 77 6e |();...if| ( (Pawn|
|00003530| 2e 50 68 79 73 69 63 73 | 20 3d 3d 20 50 48 59 53 |.Physics| == PHYS|
|00003540| 5f 46 61 6c 6c 69 6e 67 | 29 20 26 26 20 44 6f 57 |_Falling|) && DoW|
|00003550| 61 69 74 46 6f 72 4c 61 | 6e 64 69 6e 67 28 29 20 |aitForLa|nding() |
|00003560| 29 0d 0a 09 09 72 65 74 | 75 72 6e 3b 0d 0a 09 69 |)....ret|urn;...i|
|00003570| 66 20 28 20 28 45 6e 65 | 6d 79 20 21 3d 20 4e 6f |f ( (Ene|my != No|
|00003580| 6e 65 29 20 26 26 20 28 | 28 45 6e 65 6d 79 2e 48 |ne) && (|(Enemy.H|
|00003590| 65 61 6c 74 68 20 3c 3d | 20 30 29 20 7c 7c 20 28 |ealth <=| 0) || (|
|000035a0| 45 6e 65 6d 79 2e 43 6f | 6e 74 72 6f 6c 6c 65 72 |Enemy.Co|ntroller|
|000035b0| 20 3d 3d 20 4e 6f 6e 65 | 29 29 20 29 0d 0a 09 09 | == None|)) )....|
|000035c0| 45 6e 65 6d 79 20 3d 20 | 4e 6f 6e 65 3b 0d 0a 0d |Enemy = |None;...|
|000035d0| 0a 09 69 66 20 28 20 4c | 65 76 65 6c 2e 47 61 6d |..if ( L|evel.Gam|
|000035e0| 65 2e 62 47 61 6d 65 45 | 6e 64 65 64 20 26 26 20 |e.bGameE|nded && |
|000035f0| 28 45 6e 65 6d 79 20 21 | 3d 20 4e 6f 6e 65 29 20 |(Enemy !|= None) |
|00003600| 26 26 20 45 6e 65 6d 79 | 2e 43 6f 6e 74 72 6f 6c |&& Enemy|.Control|
|00003610| 6c 65 72 2e 62 49 73 50 | 6c 61 79 65 72 20 29 0d |ler.bIsP|layer ).|
|00003620| 0a 09 09 45 6e 65 6d 79 | 20 3d 20 4e 6f 6e 65 3b |...Enemy| = None;|
|00003630| 0d 0a 0d 0a 09 69 66 20 | 28 20 28 45 6e 65 6d 79 |.....if |( (Enemy|
|00003640| 20 3d 3d 20 4e 6f 6e 65 | 29 20 7c 7c 20 21 45 6e | == None|) || !En|
|00003650| 65 6d 79 56 69 73 69 62 | 6c 65 28 29 20 29 0d 0a |emyVisib|le() )..|
|00003660| 09 09 46 69 6e 64 4e 65 | 77 45 6e 65 6d 79 28 29 |..FindNe|wEnemy()|
|00003670| 3b 0d 0a 0d 0a 09 69 66 | 20 28 20 45 6e 65 6d 79 |;.....if| ( Enemy|
|00003680| 20 21 3d 20 4e 6f 6e 65 | 20 29 0d 0a 09 09 43 68 | != None| )....Ch|
|00003690| 6f 6f 73 65 41 74 74 61 | 63 6b 4d 6f 64 65 28 29 |ooseAtta|ckMode()|
|000036a0| 3b 0d 0a 09 65 6c 73 65 | 0d 0a 09 7b 0d 0a 09 09 |;...else|...{....|
|000036b0| 47 6f 61 6c 53 74 72 69 | 6e 67 20 3d 20 22 57 68 |GoalStri|ng = "Wh|
|000036c0| 61 74 54 6f 44 6f 4e 65 | 78 74 20 57 61 6e 64 65 |atToDoNe|xt Wande|
|000036d0| 72 20 6f 72 20 43 61 6d | 70 20 61 74 20 22 24 4c |r or Cam|p at "$L|
|000036e0| 65 76 65 6c 2e 54 69 6d | 65 53 65 63 6f 6e 64 73 |evel.Tim|eSeconds|
|000036f0| 3b 0d 0a 09 09 57 61 6e | 64 65 72 4f 72 43 61 6d |;....Wan|derOrCam|
|00003700| 70 28 74 72 75 65 29 3b | 0d 0a 09 7d 0d 0a 7d 0d |p(true);|...}..}.|
|00003710| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 62 6f 6f 6c |...funct|ion bool|
|00003720| 20 44 6f 57 61 69 74 46 | 6f 72 4c 61 6e 64 69 6e | DoWaitF|orLandin|
|00003730| 67 28 29 0d 0a 7b 0d 0a | 09 47 6f 74 6f 53 74 61 |g()..{..|.GotoSta|
|00003740| 74 65 28 27 57 61 69 74 | 69 6e 67 46 6f 72 4c 61 |te('Wait|ingForLa|
|00003750| 6e 64 69 6e 67 27 29 3b | 0d 0a 09 72 65 74 75 72 |nding');|...retur|
|00003760| 6e 20 74 72 75 65 3b 0d | 0a 7d 0d 0a 0d 0a 66 75 |n true;.|.}....fu|
|00003770| 6e 63 74 69 6f 6e 20 62 | 6f 6f 6c 20 45 6e 65 6d |nction b|ool Enem|
|00003780| 79 56 69 73 69 62 6c 65 | 28 29 0d 0a 7b 0d 0a 09 |yVisible|()..{...|
|00003790| 69 66 20 28 20 28 45 6e | 65 6d 79 56 69 73 69 62 |if ( (En|emyVisib|
|000037a0| 69 6c 69 74 79 54 69 6d | 65 20 3d 3d 20 4c 65 76 |ilityTim|e == Lev|
|000037b0| 65 6c 2e 54 69 6d 65 53 | 65 63 6f 6e 64 73 29 20 |el.TimeS|econds) |
|000037c0| 26 26 20 28 56 69 73 69 | 62 6c 65 45 6e 65 6d 79 |&& (Visi|bleEnemy|
|000037d0| 20 3d 3d 20 45 6e 65 6d | 79 29 20 29 0d 0a 09 09 | == Enem|y) )....|
|000037e0| 72 65 74 75 72 6e 20 62 | 45 6e 65 6d 79 49 73 56 |return b|EnemyIsV|
|000037f0| 69 73 69 62 6c 65 3b 0d | 0a 09 56 69 73 69 62 6c |isible;.|..Visibl|
|00003800| 65 45 6e 65 6d 79 20 3d | 20 45 6e 65 6d 79 3b 0d |eEnemy =| Enemy;.|
|00003810| 0a 09 45 6e 65 6d 79 56 | 69 73 69 62 69 6c 69 74 |..EnemyV|isibilit|
|00003820| 79 54 69 6d 65 20 3d 20 | 4c 65 76 65 6c 2e 54 69 |yTime = |Level.Ti|
|00003830| 6d 65 53 65 63 6f 6e 64 | 73 3b 0d 0a 09 62 45 6e |meSecond|s;...bEn|
|00003840| 65 6d 79 49 73 56 69 73 | 69 62 6c 65 20 3d 20 4c |emyIsVis|ible = L|
|00003850| 69 6e 65 4f 66 53 69 67 | 68 74 54 6f 28 45 6e 65 |ineOfSig|htTo(Ene|
|00003860| 6d 79 29 3b 0d 0a 09 72 | 65 74 75 72 6e 20 62 45 |my);...r|eturn bE|
|00003870| 6e 65 6d 79 49 73 56 69 | 73 69 62 6c 65 3b 0d 0a |nemyIsVi|sible;..|
|00003880| 7d 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 46 69 |}....fun|ction Fi|
|00003890| 67 68 74 45 6e 65 6d 79 | 28 62 6f 6f 6c 20 62 43 |ghtEnemy|(bool bC|
|000038a0| 61 6e 43 68 61 72 67 65 | 29 0d 0a 7b 0d 0a 09 6c |anCharge|)..{...l|
|000038b0| 6f 63 61 6c 20 76 65 63 | 74 6f 72 20 58 2c 59 2c |ocal vec|tor X,Y,|
|000038c0| 5a 3b 0d 0a 09 6c 6f 63 | 61 6c 20 66 6c 6f 61 74 |Z;...loc|al float|
|000038d0| 20 65 6e 65 6d 79 44 69 | 73 74 3b 0d 0a 09 6c 6f | enemyDi|st;...lo|
|000038e0| 63 61 6c 20 66 6c 6f 61 | 74 20 41 64 6a 75 73 74 |cal floa|t Adjust|
|000038f0| 65 64 43 6f 6d 62 61 74 | 53 74 79 6c 65 2c 20 41 |edCombat|Style, A|
|00003900| 67 67 72 65 73 73 69 6f | 6e 3b 0d 0a 09 6c 6f 63 |ggressio|n;...loc|
|00003910| 61 6c 20 62 6f 6f 6c 20 | 62 46 61 72 41 77 61 79 |al bool |bFarAway|
|00003920| 2c 20 62 4f 6c 64 46 6f | 72 63 65 64 43 68 61 72 |, bOldFo|rcedChar|
|00003930| 67 65 3b 0d 0a 09 6c 6f | 63 61 6c 20 4e 61 76 69 |ge;...lo|cal Navi|
|00003940| 67 61 74 69 6f 6e 50 6f | 69 6e 74 20 4e 3b 0d 0a |gationPo|int N;..|
|00003950| 0d 0a 09 69 66 20 28 20 | 28 45 6e 65 6d 79 20 3d |...if ( |(Enemy =|
|00003960| 3d 20 4e 6f 6e 65 29 20 | 7c 7c 20 28 50 61 77 6e |= None) ||| (Pawn|
|00003970| 20 3d 3d 20 4e 6f 6e 65 | 29 20 29 0d 0a 09 09 6c | == None|) )....l|
|00003980| 6f 67 28 22 48 45 52 45 | 20 33 20 45 6e 65 6d 79 |og("HERE| 3 Enemy|
|00003990| 20 22 24 45 6e 65 6d 79 | 24 22 20 70 61 77 6e 20 | "$Enemy|$" pawn |
|000039a0| 22 24 50 61 77 6e 29 3b | 0d 0a 0d 0a 09 69 66 20 |"$Pawn);|.....if |
|000039b0| 28 20 28 45 6e 65 6d 79 | 20 3d 3d 20 46 61 69 6c |( (Enemy| == Fail|
|000039c0| 65 64 48 75 6e 74 45 6e | 65 6d 79 29 20 26 26 20 |edHuntEn|emy) && |
|000039d0| 28 4c 65 76 65 6c 2e 54 | 69 6d 65 53 65 63 6f 6e |(Level.T|imeSecon|
|000039e0| 64 73 20 3d 3d 20 46 61 | 69 6c 65 64 48 75 6e 74 |ds == Fa|iledHunt|
|000039f0| 54 69 6d 65 29 20 29 0d | 0a 09 7b 0d 0a 09 09 69 |Time) ).|..{....i|
|00003a00| 66 20 28 20 21 45 6e 65 | 6d 79 2e 43 6f 6e 74 72 |f ( !Ene|my.Contr|
|00003a10| 6f 6c 6c 65 72 2e 62 49 | 73 50 6c 61 79 65 72 20 |oller.bI|sPlayer |
|00003a20| 29 0d 0a 09 09 09 46 69 | 6e 64 4e 65 77 45 6e 65 |).....Fi|ndNewEne|
|00003a30| 6d 79 28 29 3b 0d 0a 0d | 0a 09 09 69 66 20 28 20 |my();...|...if ( |
|00003a40| 45 6e 65 6d 79 20 3d 3d | 20 46 61 69 6c 65 64 48 |Enemy ==| FailedH|
|00003a50| 75 6e 74 45 6e 65 6d 79 | 20 29 0d 0a 09 09 7b 0d |untEnemy| )....{.|
|00003a60| 0a 09 09 09 47 6f 61 6c | 53 74 72 69 6e 67 20 3d |....Goal|String =|
|00003a70| 20 22 46 41 49 4c 45 44 | 20 48 55 4e 54 20 2d 20 | "FAILED| HUNT - |
|00003a80| 48 41 4e 47 20 4f 55 54 | 22 3b 0d 0a 09 09 09 69 |HANG OUT|";.....i|
|00003a90| 66 20 28 20 45 6e 65 6d | 79 56 69 73 69 62 6c 65 |f ( Enem|yVisible|
|00003aa0| 28 29 20 29 0d 0a 09 09 | 09 09 62 43 61 6e 43 68 |() )....|..bCanCh|
|00003ab0| 61 72 67 65 20 3d 20 66 | 61 6c 73 65 3b 0d 0a 09 |arge = f|alse;...|
|00003ac0| 09 09 65 6c 73 65 20 69 | 66 20 28 20 28 4c 61 73 |..else i|f ( (Las|
|00003ad0| 74 52 65 73 70 61 77 6e | 54 69 6d 65 20 21 3d 20 |tRespawn|Time != |
|00003ae0| 4c 65 76 65 6c 2e 54 69 | 6d 65 53 65 63 6f 6e 64 |Level.Ti|meSecond|
|00003af0| 73 29 20 26 26 20 28 28 | 4c 61 73 74 53 65 65 6e |s) && ((|LastSeen|
|00003b00| 54 69 6d 65 20 3d 3d 20 | 30 29 20 7c 7c 20 28 4c |Time == |0) || (L|
|00003b10| 65 76 65 6c 2e 54 69 6d | 65 53 65 63 6f 6e 64 73 |evel.Tim|eSeconds|
|00003b20| 20 2d 20 4c 61 73 74 53 | 65 65 6e 54 69 6d 65 29 | - LastS|eenTime)|
|00003b30| 20 3e 20 31 35 29 20 26 | 26 20 21 50 61 77 6e 2e | > 15) &|& !Pawn.|
|00003b40| 50 6c 61 79 65 72 43 61 | 6e 53 65 65 4d 65 28 29 |PlayerCa|nSeeMe()|
|00003b50| 20 29 0d 0a 09 09 09 7b | 0d 0a 09 09 09 09 4c 61 | ).....{|......La|
|00003b60| 73 74 52 65 73 70 61 77 | 6e 54 69 6d 65 20 3d 20 |stRespaw|nTime = |
|00003b70| 4c 65 76 65 6c 2e 54 69 | 6d 65 53 65 63 6f 6e 64 |Level.Ti|meSecond|
|00003b80| 73 3b 0d 0a 09 09 09 09 | 45 6e 65 6d 79 56 69 73 |s;......|EnemyVis|
|00003b90| 69 62 69 6c 69 74 79 54 | 69 6d 65 20 3d 20 30 3b |ibilityT|ime = 0;|
|00003ba0| 0d 0a 09 09 09 09 4e 20 | 3d 20 4c 65 76 65 6c 2e |......N |= Level.|
|00003bb0| 47 61 6d 65 2e 46 69 6e | 64 50 6c 61 79 65 72 53 |Game.Fin|dPlayerS|
|00003bc0| 74 61 72 74 28 73 65 6c | 66 2c 31 29 3b 0d 0a 09 |tart(sel|f,1);...|
|00003bd0| 09 09 09 50 61 77 6e 2e | 53 65 74 4c 6f 63 61 74 |...Pawn.|SetLocat|
|00003be0| 69 6f 6e 28 4e 2e 4c 6f | 63 61 74 69 6f 6e 2b 28 |ion(N.Lo|cation+(|
|00003bf0| 50 61 77 6e 2e 43 6f 6c | 6c 69 73 69 6f 6e 48 65 |Pawn.Col|lisionHe|
|00003c00| 69 67 68 74 20 2d 20 4e | 2e 43 6f 6c 6c 69 73 69 |ight - N|.Collisi|
|00003c10| 6f 6e 48 65 69 67 68 74 | 29 20 2a 20 76 65 63 74 |onHeight|) * vect|
|00003c20| 28 30 2c 30 2c 31 29 29 | 3b 0d 0a 09 09 09 7d 0d |(0,0,1))|;.....}.|
|00003c30| 0a 09 09 09 69 66 20 28 | 20 21 45 6e 65 6d 79 56 |....if (| !EnemyV|
|00003c40| 69 73 69 62 6c 65 28 29 | 20 29 0d 0a 09 09 09 7b |isible()| ).....{|
|00003c50| 0d 0a 09 09 09 09 57 61 | 6e 64 65 72 4f 72 43 61 |......Wa|nderOrCa|
|00003c60| 6d 70 28 74 72 75 65 29 | 3b 0d 0a 09 09 09 09 72 |mp(true)|;......r|
|00003c70| 65 74 75 72 6e 3b 0d 0a | 09 09 09 7d 0d 0a 09 09 |eturn;..|...}....|
|00003c80| 7d 0d 0a 09 7d 0d 0a 0d | 0a 09 62 4f 6c 64 46 6f |}...}...|..bOldFo|
|00003c90| 72 63 65 64 43 68 61 72 | 67 65 20 3d 20 62 4d 75 |rcedChar|ge = bMu|
|00003ca0| 73 74 43 68 61 72 67 65 | 3b 0d 0a 09 62 4d 75 73 |stCharge|;...bMus|
|00003cb0| 74 43 68 61 72 67 65 20 | 3d 20 66 61 6c 73 65 3b |tCharge |= false;|
|00003cc0| 0d 0a 09 65 6e 65 6d 79 | 44 69 73 74 20 3d 20 56 |...enemy|Dist = V|
|00003cd0| 53 69 7a 65 28 50 61 77 | 6e 2e 4c 6f 63 61 74 69 |Size(Paw|n.Locati|
|00003ce0| 6f 6e 20 2d 20 45 6e 65 | 6d 79 2e 4c 6f 63 61 74 |on - Ene|my.Locat|
|00003cf0| 69 6f 6e 29 3b 0d 0a 09 | 41 64 6a 75 73 74 65 64 |ion);...|Adjusted|
|00003d00| 43 6f 6d 62 61 74 53 74 | 79 6c 65 20 3d 20 43 6f |CombatSt|yle = Co|
|00003d10| 6d 62 61 74 53 74 79 6c | 65 3b 0d 0a 09 41 67 67 |mbatStyl|e;...Agg|
|00003d20| 72 65 73 73 69 6f 6e 20 | 3d 20 31 2e 35 20 2a 20 |ression |= 1.5 * |
|00003d30| 46 52 61 6e 64 28 29 20 | 2d 20 30 2e 38 20 2b 20 |FRand() |- 0.8 + |
|00003d40| 32 20 2a 20 41 64 6a 75 | 73 74 65 64 43 6f 6d 62 |2 * Adju|stedComb|
|00003d50| 61 74 53 74 79 6c 65 0d | 0a 09 09 09 09 2b 20 46 |atStyle.|.....+ F|
|00003d60| 52 61 6e 64 28 29 20 2a | 20 28 4e 6f 72 6d 61 6c |Rand() *| (Normal|
|00003d70| 28 45 6e 65 6d 79 2e 56 | 65 6c 6f 63 69 74 79 20 |(Enemy.V|elocity |
|00003d80| 2d 20 50 61 77 6e 2e 56 | 65 6c 6f 63 69 74 79 29 |- Pawn.V|elocity)|
|00003d90| 20 44 6f 74 20 4e 6f 72 | 6d 61 6c 28 45 6e 65 6d | Dot Nor|mal(Enem|
|00003da0| 79 2e 4c 6f 63 61 74 69 | 6f 6e 20 2d 20 50 61 77 |y.Locati|on - Paw|
|00003db0| 6e 2e 4c 6f 63 61 74 69 | 6f 6e 29 29 3b 0d 0a 09 |n.Locati|on));...|
|00003dc0| 69 66 20 28 20 45 6e 65 | 6d 79 2e 57 65 61 70 6f |if ( Ene|my.Weapo|
|00003dd0| 6e 20 21 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 09 41 |n != Non|e )....A|
|00003de0| 67 67 72 65 73 73 69 6f | 6e 20 2b 3d 20 32 20 2a |ggressio|n += 2 *|
|00003df0| 20 45 6e 65 6d 79 2e 57 | 65 61 70 6f 6e 2e 53 75 | Enemy.W|eapon.Su|
|00003e00| 67 67 65 73 74 44 65 66 | 65 6e 73 65 53 74 79 6c |ggestDef|enseStyl|
|00003e10| 65 28 29 3b 0d 0a 09 69 | 66 20 28 20 65 6e 65 6d |e();...i|f ( enem|
|00003e20| 79 44 69 73 74 20 3e 20 | 4d 41 58 53 54 41 4b 45 |yDist > |MAXSTAKE|
|00003e30| 4f 55 54 44 49 53 54 20 | 29 0d 0a 09 09 41 67 67 |OUTDIST |)....Agg|
|00003e40| 72 65 73 73 69 6f 6e 20 | 2b 3d 20 30 2e 35 3b 0d |ression |+= 0.5;.|
|00003e50| 0a 09 69 66 20 28 20 28 | 50 61 77 6e 2e 50 68 79 |..if ( (|Pawn.Phy|
|00003e60| 73 69 63 73 20 3d 3d 20 | 50 48 59 53 5f 57 61 6c |sics == |PHYS_Wal|
|00003e70| 6b 69 6e 67 29 20 7c 7c | 20 28 50 61 77 6e 2e 50 |king) ||| (Pawn.P|
|00003e80| 68 79 73 69 63 73 20 3d | 3d 20 50 48 59 53 5f 46 |hysics =|= PHYS_F|
|00003e90| 61 6c 6c 69 6e 67 29 20 | 29 0d 0a 09 7b 0d 0a 09 |alling) |)...{...|
|00003ea0| 09 69 66 20 28 50 61 77 | 6e 2e 4c 6f 63 61 74 69 |.if (Paw|n.Locati|
|00003eb0| 6f 6e 2e 5a 20 3e 20 45 | 6e 65 6d 79 2e 4c 6f 63 |on.Z > E|nemy.Loc|
|00003ec0| 61 74 69 6f 6e 2e 5a 20 | 2b 20 54 41 43 54 49 43 |ation.Z |+ TACTIC|
|00003ed0| 41 4c 48 45 49 47 48 54 | 41 44 56 41 4e 54 41 47 |ALHEIGHT|ADVANTAG|
|00003ee0| 45 29 0d 0a 09 09 09 41 | 67 67 72 65 73 73 69 6f |E).....A|ggressio|
|00003ef0| 6e 20 3d 20 46 4d 61 78 | 28 30 2e 30 2c 20 41 67 |n = FMax|(0.0, Ag|
|00003f00| 67 72 65 73 73 69 6f 6e | 20 2d 20 31 2e 30 20 2b |gression| - 1.0 +|
|00003f10| 20 41 64 6a 75 73 74 65 | 64 43 6f 6d 62 61 74 53 | Adjuste|dCombatS|
|00003f20| 74 79 6c 65 29 3b 0d 0a | 09 09 65 6c 73 65 20 69 |tyle);..|..else i|
|00003f30| 66 20 28 20 28 53 6b 69 | 6c 6c 20 3c 20 34 29 20 |f ( (Ski|ll < 4) |
|00003f40| 26 26 20 28 65 6e 65 6d | 79 44 69 73 74 20 3e 20 |&& (enem|yDist > |
|00003f50| 30 2e 36 35 20 2a 20 4d | 41 58 53 54 41 4b 45 4f |0.65 * M|AXSTAKEO|
|00003f60| 55 54 44 49 53 54 29 20 | 29 0d 0a 09 09 7b 0d 0a |UTDIST) |)....{..|
|00003f70| 09 09 09 62 46 61 72 41 | 77 61 79 20 3d 20 74 72 |...bFarA|way = tr|
|00003f80| 75 65 3b 0d 0a 09 09 09 | 41 67 67 72 65 73 73 69 |ue;.....|Aggressi|
|00003f90| 6f 6e 20 2b 3d 20 30 2e | 35 3b 0d 0a 09 09 7d 0d |on += 0.|5;....}.|
|00003fa0| 0a 09 09 65 6c 73 65 20 | 69 66 20 28 50 61 77 6e |...else |if (Pawn|
|00003fb0| 2e 4c 6f 63 61 74 69 6f | 6e 2e 5a 20 3c 20 45 6e |.Locatio|n.Z < En|
|00003fc0| 65 6d 79 2e 4c 6f 63 61 | 74 69 6f 6e 2e 5a 20 2d |emy.Loca|tion.Z -|
|00003fd0| 20 50 61 77 6e 2e 43 6f | 6c 6c 69 73 69 6f 6e 48 | Pawn.Co|llisionH|
|00003fe0| 65 69 67 68 74 29 20 2f | 2f 20 62 65 6c 6f 77 20 |eight) /|/ below |
|00003ff0| 65 6e 65 6d 79 0d 0a 09 | 09 09 41 67 67 72 65 73 |enemy...|..Aggres|
|00004000| 73 69 6f 6e 20 2b 3d 20 | 43 6f 6d 62 61 74 53 74 |sion += |CombatSt|
|00004010| 79 6c 65 3b 0d 0a 09 7d | 0d 0a 0d 0a 09 69 66 20 |yle;...}|.....if |
|00004020| 28 20 21 45 6e 65 6d 79 | 56 69 73 69 62 6c 65 28 |( !Enemy|Visible(|
|00004030| 29 20 29 0d 0a 09 7b 0d | 0a 09 09 47 6f 61 6c 53 |) )...{.|...GoalS|
|00004040| 74 72 69 6e 67 20 3d 20 | 22 45 6e 65 6d 79 20 6e |tring = |"Enemy n|
|00004050| 6f 74 20 76 69 73 69 62 | 6c 65 22 3b 0d 0a 09 09 |ot visib|le";....|
|00004060| 69 66 20 28 20 21 62 43 | 61 6e 43 68 61 72 67 65 |if ( !bC|anCharge|
|00004070| 20 29 0d 0a 09 09 7b 0d | 0a 09 09 09 47 6f 61 6c | )....{.|....Goal|
|00004080| 53 74 72 69 6e 67 20 3d | 20 22 53 74 61 6b 65 20 |String =| "Stake |
|00004090| 4f 75 74 22 3b 0d 0a 09 | 09 09 44 6f 53 74 61 6b |Out";...|..DoStak|
|000040a0| 65 4f 75 74 28 29 3b 0d | 0a 09 09 7d 0d 0a 09 09 |eOut();.|...}....|
|000040b0| 65 6c 73 65 0d 0a 09 09 | 7b 0d 0a 09 09 09 47 6f |else....|{.....Go|
|000040c0| 61 6c 53 74 72 69 6e 67 | 20 3d 20 22 48 75 6e 74 |alString| = "Hunt|
|000040d0| 22 3b 0d 0a 09 09 09 47 | 6f 74 6f 53 74 61 74 65 |";.....G|otoState|
|000040e0| 28 27 48 75 6e 74 69 6e | 67 27 29 3b 0d 0a 09 09 |('Huntin|g');....|
|000040f0| 7d 0d 0a 09 09 72 65 74 | 75 72 6e 3b 0d 0a 09 7d |}....ret|urn;...}|
|00004100| 0d 0a 0d 0a 09 2f 2f 20 | 73 65 65 20 65 6e 65 6d |.....// |see enem|
|00004110| 79 20 2d 20 64 65 63 69 | 64 65 20 77 68 65 74 68 |y - deci|de wheth|
|00004120| 65 72 20 74 6f 20 63 68 | 61 72 67 65 20 69 74 20 |er to ch|arge it |
|00004130| 6f 72 20 73 74 72 61 66 | 65 20 61 72 6f 75 6e 64 |or straf|e around|
|00004140| 2f 73 74 61 6e 64 20 61 | 6e 64 20 66 69 72 65 0d |/stand a|nd fire.|
|00004150| 0a 09 54 61 72 67 65 74 | 20 3d 20 45 6e 65 6d 79 |..Target| = Enemy|
|00004160| 3b 0d 0a 09 69 66 28 20 | 4d 6f 6e 73 74 65 72 28 |;...if( |Monster(|
|00004170| 50 61 77 6e 29 2e 50 72 | 65 66 65 72 4d 65 6c 65 |Pawn).Pr|eferMele|
|00004180| 65 28 29 20 7c 7c 20 28 | 62 43 61 6e 43 68 61 72 |e() || (|bCanChar|
|00004190| 67 65 20 26 26 20 62 4f | 6c 64 46 6f 72 63 65 64 |ge && bO|ldForced|
|000041a0| 43 68 61 72 67 65 29 20 | 29 0d 0a 09 7b 0d 0a 09 |Charge) |)...{...|
|000041b0| 09 47 6f 61 6c 53 74 72 | 69 6e 67 20 3d 20 22 43 |.GoalStr|ing = "C|
|000041c0| 68 61 72 67 65 22 3b 0d | 0a 09 09 44 6f 43 68 61 |harge";.|...DoCha|
|000041d0| 72 67 65 28 29 3b 0d 0a | 09 09 72 65 74 75 72 6e |rge();..|..return|
|000041e0| 3b 0d 0a 09 7d 0d 0a 0d | 0a 09 69 66 20 28 20 62 |;...}...|..if ( b|
|000041f0| 43 61 6e 43 68 61 72 67 | 65 20 26 26 20 28 53 6b |CanCharg|e && (Sk|
|00004200| 69 6c 6c 20 3c 20 35 29 | 20 26 26 20 62 46 61 72 |ill < 5)| && bFar|
|00004210| 41 77 61 79 20 26 26 20 | 28 41 67 67 72 65 73 73 |Away && |(Aggress|
|00004220| 69 6f 6e 20 3e 20 31 29 | 20 26 26 20 28 46 52 61 |ion > 1)| && (FRa|
|00004230| 6e 64 28 29 20 3c 20 30 | 2e 35 29 20 29 0d 0a 09 |nd() < 0|.5) )...|
|00004240| 7b 0d 0a 09 09 47 6f 61 | 6c 53 74 72 69 6e 67 20 |{....Goa|lString |
|00004250| 3d 20 22 43 68 61 72 67 | 65 20 63 6c 6f 73 65 72 |= "Charg|e closer|
|00004260| 22 3b 0d 0a 09 09 44 6f | 43 68 61 72 67 65 28 29 |";....Do|Charge()|
|00004270| 3b 0d 0a 09 09 72 65 74 | 75 72 6e 3b 0d 0a 09 7d |;....ret|urn;...}|
|00004280| 0d 0a 0d 0a 09 69 66 20 | 28 20 21 4d 6f 6e 73 74 |.....if |( !Monst|
|00004290| 65 72 28 50 61 77 6e 29 | 2e 50 72 65 66 65 72 4d |er(Pawn)|.PreferM|
|000042a0| 65 6c 65 65 28 29 20 26 | 26 20 28 46 52 61 6e 64 |elee() &|& (FRand|
|000042b0| 28 29 20 3e 20 30 2e 31 | 37 20 2a 20 28 73 6b 69 |() > 0.1|7 * (ski|
|000042c0| 6c 6c 20 2d 20 31 29 29 | 20 26 26 20 21 44 65 66 |ll - 1))| && !Def|
|000042d0| 65 6e 64 4d 65 6c 65 65 | 28 65 6e 65 6d 79 44 69 |endMelee|(enemyDi|
|000042e0| 73 74 29 20 29 0d 0a 09 | 7b 0d 0a 09 09 47 6f 61 |st) )...|{....Goa|
|000042f0| 6c 53 74 72 69 6e 67 20 | 3d 20 22 52 61 6e 67 65 |lString |= "Range|
|00004300| 64 20 41 74 74 61 63 6b | 22 3b 0d 0a 09 09 44 6f |d Attack|";....Do|
|00004310| 52 61 6e 67 65 64 41 74 | 74 61 63 6b 4f 6e 28 45 |RangedAt|tackOn(E|
|00004320| 6e 65 6d 79 29 3b 0d 0a | 09 09 72 65 74 75 72 6e |nemy);..|..return|
|00004330| 3b 0d 0a 09 7d 0d 0a 0d | 0a 09 69 66 20 28 20 62 |;...}...|..if ( b|
|00004340| 43 61 6e 43 68 61 72 67 | 65 20 29 0d 0a 09 7b 0d |CanCharg|e )...{.|
|00004350| 0a 09 09 69 66 20 28 20 | 41 67 67 72 65 73 73 69 |...if ( |Aggressi|
|00004360| 6f 6e 20 3e 20 31 20 29 | 0d 0a 09 09 7b 0d 0a 09 |on > 1 )|....{...|
|00004370| 09 09 47 6f 61 6c 53 74 | 72 69 6e 67 20 3d 20 22 |..GoalSt|ring = "|
|00004380| 43 68 61 72 67 65 20 32 | 22 3b 0d 0a 09 09 09 44 |Charge 2|";.....D|
|00004390| 6f 43 68 61 72 67 65 28 | 29 3b 0d 0a 09 09 09 72 |oCharge(|);.....r|
|000043a0| 65 74 75 72 6e 3b 0d 0a | 09 09 7d 0d 0a 09 7d 0d |eturn;..|..}...}.|
|000043b0| 0a 0d 0a 09 69 66 20 28 | 20 21 50 61 77 6e 2e 62 |....if (| !Pawn.b|
|000043c0| 43 61 6e 53 74 72 61 66 | 65 20 29 0d 0a 09 7b 0d |CanStraf|e )...{.|
|000043d0| 0a 09 09 47 6f 61 6c 53 | 74 72 69 6e 67 20 3d 20 |...GoalS|tring = |
|000043e0| 22 52 61 6e 67 65 64 20 | 41 74 74 61 63 6b 22 3b |"Ranged |Attack";|
|000043f0| 0d 0a 09 09 44 6f 52 61 | 6e 67 65 64 41 74 74 61 |....DoRa|ngedAtta|
|00004400| 63 6b 4f 6e 28 45 6e 65 | 6d 79 29 3b 0d 0a 09 09 |ckOn(Ene|my);....|
|00004410| 72 65 74 75 72 6e 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 |return;.|..}.....|
|00004420| 47 6f 61 6c 53 74 72 69 | 6e 67 20 3d 20 22 44 6f |GoalStri|ng = "Do|
|00004430| 20 74 61 63 74 69 63 61 | 6c 20 6d 6f 76 65 22 3b | tactica|l move";|
|00004440| 0d 0a 09 69 66 20 28 20 | 21 4d 6f 6e 73 74 65 72 |...if ( |!Monster|
|00004450| 28 50 61 77 6e 29 2e 52 | 65 63 6f 6d 6d 65 6e 64 |(Pawn).R|ecommend|
|00004460| 53 70 6c 61 73 68 44 61 | 6d 61 67 65 28 29 20 26 |SplashDa|mage() &|
|00004470| 26 20 4d 6f 6e 73 74 65 | 72 28 50 61 77 6e 29 2e |& Monste|r(Pawn).|
|00004480| 62 43 61 6e 44 6f 64 67 | 65 20 26 26 20 28 46 52 |bCanDodg|e && (FR|
|00004490| 61 6e 64 28 29 20 3c 20 | 30 2e 37 29 20 26 26 20 |and() < |0.7) && |
|000044a0| 28 46 52 61 6e 64 28 29 | 2a 53 6b 69 6c 6c 20 3e |(FRand()|*Skill >|
|000044b0| 20 33 29 20 29 0d 0a 09 | 7b 0d 0a 09 09 47 65 74 | 3) )...|{....Get|
|000044c0| 41 78 65 73 28 50 61 77 | 6e 2e 52 6f 74 61 74 69 |Axes(Paw|n.Rotati|
|000044d0| 6f 6e 2c 58 2c 59 2c 5a | 29 3b 0d 0a 09 09 47 6f |on,X,Y,Z|);....Go|
|000044e0| 61 6c 53 74 72 69 6e 67 | 20 3d 20 22 54 72 79 20 |alString| = "Try |
|000044f0| 74 6f 20 44 75 63 6b 20 | 22 3b 0d 0a 09 09 69 66 |to Duck |";....if|
|00004500| 20 28 20 46 52 61 6e 64 | 28 29 20 3c 20 30 2e 35 | ( FRand|() < 0.5|
|00004510| 20 29 0d 0a 09 09 7b 0d | 0a 09 09 09 59 20 2a 3d | )....{.|....Y *=|
|00004520| 20 2d 31 3b 0d 0a 09 09 | 09 54 72 79 54 6f 44 75 | -1;....|.TryToDu|
|00004530| 63 6b 28 59 2c 20 74 72 | 75 65 29 3b 0d 0a 09 09 |ck(Y, tr|ue);....|
|00004540| 7d 0d 0a 09 09 65 6c 73 | 65 0d 0a 09 09 09 54 72 |}....els|e.....Tr|
|00004550| 79 54 6f 44 75 63 6b 28 | 59 2c 20 66 61 6c 73 65 |yToDuck(|Y, false|
|00004560| 29 3b 0d 0a 09 7d 0d 0a | 09 44 6f 54 61 63 74 69 |);...}..|.DoTacti|
|00004570| 63 61 6c 4d 6f 76 65 28 | 29 3b 0d 0a 7d 0d 0a 0d |calMove(|);..}...|
|00004580| 0a 66 75 6e 63 74 69 6f | 6e 20 44 6f 52 61 6e 67 |.functio|n DoRang|
|00004590| 65 64 41 74 74 61 63 6b | 4f 6e 28 41 63 74 6f 72 |edAttack|On(Actor|
|000045a0| 20 41 29 0d 0a 7b 0d 0a | 09 54 61 72 67 65 74 20 | A)..{..|.Target |
|000045b0| 3d 20 41 3b 0d 0a 09 47 | 6f 74 6f 53 74 61 74 65 |= A;...G|otoState|
|000045c0| 28 27 52 61 6e 67 65 64 | 41 74 74 61 63 6b 27 29 |('Ranged|Attack')|
|000045d0| 3b 0d 0a 7d 0d 0a 0d 0a | 2f 2a 20 43 68 6f 6f 73 |;..}....|/* Choos|
|000045e0| 65 41 74 74 61 63 6b 4d | 6f 64 65 28 29 0d 0a 48 |eAttackM|ode()..H|
|000045f0| 61 6e 64 6c 65 73 20 74 | 61 63 74 69 63 61 6c 20 |andles t|actical |
|00004600| 61 74 74 61 63 6b 69 6e | 67 20 73 74 61 74 65 20 |attackin|g state |
|00004610| 73 65 6c 65 63 74 69 6f | 6e 20 2d 20 63 68 6f 6f |selectio|n - choo|
|00004620| 73 65 20 77 68 69 63 68 | 20 74 79 70 65 20 6f 66 |se which| type of|
|00004630| 20 61 74 74 61 63 6b 20 | 74 6f 20 64 6f 20 66 72 | attack |to do fr|
|00004640| 6f 6d 20 68 65 72 65 0d | 0a 2a 2f 0d 0a 66 75 6e |om here.|.*/..fun|
|00004650| 63 74 69 6f 6e 20 43 68 | 6f 6f 73 65 41 74 74 61 |ction Ch|ooseAtta|
|00004660| 63 6b 4d 6f 64 65 28 29 | 0d 0a 7b 0d 0a 09 47 6f |ckMode()|..{...Go|
|00004670| 61 6c 53 74 72 69 6e 67 | 20 3d 20 22 20 43 68 6f |alString| = " Cho|
|00004680| 6f 73 65 41 74 74 61 63 | 6b 4d 6f 64 65 20 6c 61 |oseAttac|kMode la|
|00004690| 73 74 20 73 65 65 6e 20 | 22 24 28 4c 65 76 65 6c |st seen |"$(Level|
|000046a0| 2e 54 69 6d 65 53 65 63 | 6f 6e 64 73 20 2d 20 4c |.TimeSec|onds - L|
|000046b0| 61 73 74 53 65 65 6e 54 | 69 6d 65 29 3b 0d 0a 09 |astSeenT|ime);...|
|000046c0| 2f 2f 20 73 68 6f 75 6c | 64 20 49 20 72 75 6e 20 |// shoul|d I run |
|000046d0| 61 77 61 79 3f 0d 0a 09 | 69 66 20 28 20 28 45 6e |away?...|if ( (En|
|000046e0| 65 6d 79 20 3d 3d 20 4e | 6f 6e 65 29 20 7c 7c 20 |emy == N|one) || |
|000046f0| 28 50 61 77 6e 20 3d 3d | 20 4e 6f 6e 65 29 20 29 |(Pawn ==| None) )|
|00004700| 0d 0a 09 09 6c 6f 67 28 | 22 48 45 52 45 20 31 20 |....log(|"HERE 1 |
|00004710| 45 6e 65 6d 79 20 22 24 | 45 6e 65 6d 79 24 22 20 |Enemy "$|Enemy$" |
|00004720| 70 61 77 6e 20 22 24 50 | 61 77 6e 29 3b 0d 0a 09 |pawn "$P|awn);...|
|00004730| 47 6f 61 6c 53 74 72 69 | 6e 67 20 3d 20 22 43 68 |GoalStri|ng = "Ch|
|00004740| 6f 6f 73 65 41 74 74 61 | 63 6b 4d 6f 64 65 20 46 |ooseAtta|ckMode F|
|00004750| 69 67 68 74 45 6e 65 6d | 79 22 3b 0d 0a 09 46 69 |ightEnem|y";...Fi|
|00004760| 67 68 74 45 6e 65 6d 79 | 28 74 72 75 65 29 3b 0d |ghtEnemy|(true);.|
|00004770| 0a 7d 0d 0a 0d 0a 65 76 | 65 6e 74 20 53 6f 61 6b |.}....ev|ent Soak|
|00004780| 53 74 6f 70 28 73 74 72 | 69 6e 67 20 70 72 6f 62 |Stop(str|ing prob|
|00004790| 6c 65 6d 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |lem)..{.|..local |
|000047a0| 55 6e 72 65 61 6c 50 6c | 61 79 65 72 20 50 43 3b |UnrealPl|ayer PC;|
|000047b0| 0d 0a 0d 0a 09 6c 6f 67 | 28 70 72 6f 62 6c 65 6d |.....log|(problem|
|000047c0| 29 3b 0d 0a 09 53 6f 61 | 6b 53 74 72 69 6e 67 20 |);...Soa|kString |
|000047d0| 3d 20 70 72 6f 62 6c 65 | 6d 3b 0d 0a 09 47 6f 61 |= proble|m;...Goa|
|000047e0| 6c 53 74 72 69 6e 67 20 | 3d 20 53 6f 61 6b 53 74 |lString |= SoakSt|
|000047f0| 72 69 6e 67 40 47 6f 61 | 6c 53 74 72 69 6e 67 3b |ring@Goa|lString;|
|00004800| 0d 0a 09 46 6f 72 45 61 | 63 68 20 44 79 6e 61 6d |...ForEa|ch Dynam|
|00004810| 69 63 41 63 74 6f 72 73 | 28 63 6c 61 73 73 27 55 |icActors|(class'U|
|00004820| 6e 72 65 61 6c 50 6c 61 | 79 65 72 27 2c 50 43 29 |nrealPla|yer',PC)|
|00004830| 0d 0a 09 7b 0d 0a 09 09 | 50 43 2e 53 6f 61 6b 50 |...{....|PC.SoakP|
|00004840| 61 75 73 65 28 50 61 77 | 6e 29 3b 0d 0a 09 09 62 |ause(Paw|n);....b|
|00004850| 72 65 61 6b 3b 0d 0a 09 | 7d 0d 0a 7d 0d 0a 0d 0a |reak;...|}..}....|
|00004860| 66 75 6e 63 74 69 6f 6e | 20 62 6f 6f 6c 20 46 69 |function| bool Fi|
|00004870| 6e 64 52 6f 61 6d 44 65 | 73 74 28 29 0d 0a 7b 0d |ndRoamDe|st()..{.|
|00004880| 0a 09 6c 6f 63 61 6c 20 | 61 63 74 6f 72 20 42 65 |..local |actor Be|
|00004890| 73 74 50 61 74 68 3b 0d | 0a 0d 0a 09 69 66 20 28 |stPath;.|....if (|
|000048a0| 20 50 61 77 6e 2e 46 69 | 6e 64 41 6e 63 68 6f 72 | Pawn.Fi|ndAnchor|
|000048b0| 46 61 69 6c 65 64 54 69 | 6d 65 20 3d 3d 20 4c 65 |FailedTi|me == Le|
|000048c0| 76 65 6c 2e 54 69 6d 65 | 53 65 63 6f 6e 64 73 20 |vel.Time|Seconds |
|000048d0| 29 0d 0a 09 7b 0d 0a 09 | 09 2f 2f 20 63 6f 75 6c |)...{...|.// coul|
|000048e0| 64 6e 27 74 20 66 69 6e | 64 20 61 6e 20 61 6e 63 |dn't fin|d an anc|
|000048f0| 68 6f 72 2e 0d 0a 09 09 | 47 6f 61 6c 53 74 72 69 |hor.....|GoalStri|
|00004900| 6e 67 20 3d 20 22 4e 6f | 20 61 6e 63 68 6f 72 20 |ng = "No| anchor |
|00004910| 22 24 4c 65 76 65 6c 2e | 54 69 6d 65 53 65 63 6f |"$Level.|TimeSeco|
|00004920| 6e 64 73 3b 0d 0a 09 09 | 69 66 20 28 20 50 61 77 |nds;....|if ( Paw|
|00004930| 6e 2e 4c 61 73 74 56 61 | 6c 69 64 41 6e 63 68 6f |n.LastVa|lidAncho|
|00004940| 72 54 69 6d 65 20 3e 20 | 35 20 29 0d 0a 09 09 7b |rTime > |5 )....{|
|00004950| 0d 0a 09 09 09 69 66 20 | 28 20 62 53 6f 61 6b 69 |.....if |( bSoaki|
|00004960| 6e 67 20 29 0d 0a 09 09 | 09 09 53 6f 61 6b 53 74 |ng )....|..SoakSt|
|00004970| 6f 70 28 22 4e 4f 20 50 | 41 54 48 20 41 56 41 49 |op("NO P|ATH AVAI|
|00004980| 4c 41 42 4c 45 21 21 21 | 22 29 3b 0d 0a 09 09 09 |LABLE!!!|");.....|
|00004990| 65 6c 73 65 0d 0a 09 09 | 09 7b 0d 0a 09 09 09 09 |else....|.{......|
|000049a0| 69 66 20 28 20 4e 75 6d | 52 61 6e 64 6f 6d 4a 75 |if ( Num|RandomJu|
|000049b0| 6d 70 73 20 3e 20 34 20 | 29 0d 0a 09 09 09 09 7b |mps > 4 |)......{|
|000049c0| 0d 0a 09 09 09 09 09 50 | 61 77 6e 2e 48 65 61 6c |.......P|awn.Heal|
|000049d0| 74 68 20 3d 20 30 3b 0d | 0a 09 09 09 09 09 50 61 |th = 0;.|......Pa|
|000049e0| 77 6e 2e 44 69 65 64 28 | 20 73 65 6c 66 2c 20 63 |wn.Died(| self, c|
|000049f0| 6c 61 73 73 27 53 75 69 | 63 69 64 65 64 27 2c 20 |lass'Sui|cided', |
|00004a00| 50 61 77 6e 2e 4c 6f 63 | 61 74 69 6f 6e 20 29 3b |Pawn.Loc|ation );|
|00004a10| 0d 0a 09 09 09 09 09 72 | 65 74 75 72 6e 20 74 72 |.......r|eturn tr|
|00004a20| 75 65 3b 0d 0a 09 09 09 | 09 7d 0d 0a 09 09 09 09 |ue;.....|.}......|
|00004a30| 65 6c 73 65 0d 0a 09 09 | 09 09 7b 0d 0a 09 09 09 |else....|..{.....|
|00004a40| 09 09 2f 2f 20 6a 75 6d | 70 0d 0a 09 09 09 09 09 |..// jum|p.......|
|00004a50| 4e 75 6d 52 61 6e 64 6f | 6d 4a 75 6d 70 73 2b 2b |NumRando|mJumps++|
|00004a60| 3b 0d 0a 09 09 09 09 09 | 69 66 20 28 20 50 68 79 |;.......|if ( Phy|
|00004a70| 73 69 63 73 20 21 3d 20 | 50 48 59 53 5f 46 61 6c |sics != |PHYS_Fal|
|00004a80| 6c 69 6e 67 20 29 0d 0a | 09 09 09 09 09 7b 0d 0a |ling )..|.....{..|
|00004a90| 09 09 09 09 09 09 50 61 | 77 6e 2e 53 65 74 50 68 |......Pa|wn.SetPh|
|00004aa0| 79 73 69 63 73 28 50 48 | 59 53 5f 46 61 6c 6c 69 |ysics(PH|YS_Falli|
|00004ab0| 6e 67 29 3b 0d 0a 09 09 | 09 09 09 09 50 61 77 6e |ng);....|....Pawn|
|00004ac0| 2e 56 65 6c 6f 63 69 74 | 79 20 3d 20 30 2e 35 20 |.Velocit|y = 0.5 |
|00004ad0| 2a 20 50 61 77 6e 2e 47 | 72 6f 75 6e 64 53 70 65 |* Pawn.G|roundSpe|
|00004ae0| 65 64 20 2a 20 56 52 61 | 6e 64 28 29 3b 0d 0a 09 |ed * VRa|nd();...|
|00004af0| 09 09 09 09 09 50 61 77 | 6e 2e 56 65 6c 6f 63 69 |.....Paw|n.Veloci|
|00004b00| 74 79 2e 5a 20 3d 20 50 | 61 77 6e 2e 4a 75 6d 70 |ty.Z = P|awn.Jump|
|00004b10| 5a 3b 0d 0a 09 09 09 09 | 09 7d 0d 0a 09 09 09 09 |Z;......|.}......|
|00004b20| 7d 0d 0a 09 09 09 7d 0d | 0a 09 09 7d 0d 0a 09 09 |}.....}.|...}....|
|00004b30| 2f 2f 6c 6f 67 28 73 65 | 6c 66 24 22 20 46 69 6e |//log(se|lf$" Fin|
|00004b40| 64 20 41 6e 63 68 6f 72 | 20 66 61 69 6c 65 64 21 |d Anchor| failed!|
|00004b50| 22 29 3b 0d 0a 09 09 72 | 65 74 75 72 6e 20 66 61 |");....r|eturn fa|
|00004b60| 6c 73 65 3b 0d 0a 09 7d | 0d 0a 09 4e 75 6d 52 61 |lse;...}|...NumRa|
|00004b70| 6e 64 6f 6d 4a 75 6d 70 | 73 20 3d 20 30 3b 0d 0a |ndomJump|s = 0;..|
|00004b80| 09 47 6f 61 6c 53 74 72 | 69 6e 67 20 3d 20 22 46 |.GoalStr|ing = "F|
|00004b90| 69 6e 64 20 72 6f 61 6d | 20 64 65 73 74 20 22 24 |ind roam| dest "$|
|00004ba0| 4c 65 76 65 6c 2e 54 69 | 6d 65 53 65 63 6f 6e 64 |Level.Ti|meSecond|
|00004bb0| 73 3b 0d 0a 09 2f 2f 20 | 66 69 6e 64 20 72 61 6e |s;...// |find ran|
|00004bc0| 64 6f 6d 20 4e 61 76 69 | 67 61 74 69 6f 6e 50 6f |dom Navi|gationPo|
|00004bd0| 69 6e 74 20 74 6f 20 72 | 6f 61 6d 20 74 6f 0d 0a |int to r|oam to..|
|00004be0| 09 69 66 20 28 20 28 52 | 6f 75 74 65 47 6f 61 6c |.if ( (R|outeGoal|
|00004bf0| 20 3d 3d 20 4e 6f 6e 65 | 29 20 7c 7c 20 28 50 61 | == None|) || (Pa|
|00004c00| 77 6e 2e 41 6e 63 68 6f | 72 20 3d 3d 20 52 6f 75 |wn.Ancho|r == Rou|
|00004c10| 74 65 47 6f 61 6c 29 0d | 0a 09 09 7c 7c 20 50 61 |teGoal).|...|| Pa|
|00004c20| 77 6e 2e 52 65 61 63 68 | 65 64 44 65 73 74 69 6e |wn.Reach|edDestin|
|00004c30| 61 74 69 6f 6e 28 52 6f | 75 74 65 47 6f 61 6c 29 |ation(Ro|uteGoal)|
|00004c40| 20 29 0d 0a 09 7b 0d 0a | 09 09 52 6f 75 74 65 47 | )...{..|..RouteG|
|00004c50| 6f 61 6c 20 3d 20 46 69 | 6e 64 52 61 6e 64 6f 6d |oal = Fi|ndRandom|
|00004c60| 44 65 73 74 28 29 3b 0d | 0a 09 09 42 65 73 74 50 |Dest();.|...BestP|
|00004c70| 61 74 68 20 3d 20 52 6f | 75 74 65 43 61 63 68 65 |ath = Ro|uteCache|
|00004c80| 5b 30 5d 3b 0d 0a 09 09 | 69 66 20 28 20 52 6f 75 |[0];....|if ( Rou|
|00004c90| 74 65 47 6f 61 6c 20 3d | 3d 20 4e 6f 6e 65 20 29 |teGoal =|= None )|
|00004ca0| 0d 0a 09 09 7b 0d 0a 09 | 09 09 69 66 20 28 20 62 |....{...|..if ( b|
|00004cb0| 53 6f 61 6b 69 6e 67 20 | 26 26 20 28 50 68 79 73 |Soaking |&& (Phys|
|00004cc0| 69 63 73 20 21 3d 20 50 | 48 59 53 5f 46 61 6c 6c |ics != P|HYS_Fall|
|00004cd0| 69 6e 67 29 20 29 0d 0a | 09 09 09 09 53 6f 61 6b |ing) )..|....Soak|
|00004ce0| 53 74 6f 70 28 22 43 4f | 55 4c 44 4e 27 54 20 46 |Stop("CO|ULDN'T F|
|00004cf0| 49 4e 44 20 52 4f 41 4d | 20 44 45 53 54 49 4e 41 |IND ROAM| DESTINA|
|00004d00| 54 49 4f 4e 22 29 3b 0d | 0a 09 09 09 72 65 74 75 |TION");.|....retu|
|00004d10| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 09 09 7d 0d 0a |rn false|;....}..|
|00004d20| 09 7d 0d 0a 09 69 66 20 | 28 20 42 65 73 74 50 61 |.}...if |( BestPa|
|00004d30| 74 68 20 3d 3d 20 4e 6f | 6e 65 20 29 0d 0a 09 09 |th == No|ne )....|
|00004d40| 42 65 73 74 50 61 74 68 | 20 3d 20 46 69 6e 64 50 |BestPath| = FindP|
|00004d50| 61 74 68 54 6f 77 61 72 | 64 28 52 6f 75 74 65 47 |athTowar|d(RouteG|
|00004d60| 6f 61 6c 2c 66 61 6c 73 | 65 29 3b 0d 0a 09 69 66 |oal,fals|e);...if|
|00004d70| 20 28 20 42 65 73 74 50 | 61 74 68 20 21 3d 20 4e | ( BestP|ath != N|
|00004d80| 6f 6e 65 20 29 0d 0a 09 | 7b 0d 0a 09 09 4d 6f 76 |one )...|{....Mov|
|00004d90| 65 54 61 72 67 65 74 20 | 3d 20 42 65 73 74 50 61 |eTarget |= BestPa|
|00004da0| 74 68 3b 0d 0a 09 09 47 | 6f 74 6f 53 74 61 74 65 |th;....G|otoState|
|00004db0| 28 27 52 6f 61 6d 69 6e | 67 27 29 3b 0d 0a 09 09 |('Roamin|g');....|
|00004dc0| 72 65 74 75 72 6e 20 74 | 72 75 65 3b 0d 0a 09 7d |return t|rue;...}|
|00004dd0| 0d 0a 09 69 66 20 28 20 | 62 53 6f 61 6b 69 6e 67 |...if ( |bSoaking|
|00004de0| 20 26 26 20 28 50 68 79 | 73 69 63 73 20 21 3d 20 | && (Phy|sics != |
|00004df0| 50 48 59 53 5f 46 61 6c | 6c 69 6e 67 29 20 29 0d |PHYS_Fal|ling) ).|
|00004e00| 0a 09 09 53 6f 61 6b 53 | 74 6f 70 28 22 43 4f 55 |...SoakS|top("COU|
|00004e10| 4c 44 4e 27 54 20 46 49 | 4e 44 20 52 4f 41 4d 20 |LDN'T FI|ND ROAM |
|00004e20| 50 41 54 48 20 54 4f 20 | 22 24 52 6f 75 74 65 47 |PATH TO |"$RouteG|
|00004e30| 6f 61 6c 29 3b 0d 0a 09 | 52 6f 75 74 65 47 6f 61 |oal);...|RouteGoa|
|00004e40| 6c 20 3d 20 4e 6f 6e 65 | 3b 0d 0a 09 72 65 74 75 |l = None|;...retu|
|00004e50| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 7d 0d 0a 0d 0a |rn false|;..}....|
|00004e60| 66 75 6e 63 74 69 6f 6e | 20 62 6f 6f 6c 20 54 65 |function| bool Te|
|00004e70| 73 74 44 69 72 65 63 74 | 69 6f 6e 28 76 65 63 74 |stDirect|ion(vect|
|00004e80| 6f 72 20 64 69 72 2c 20 | 6f 75 74 20 76 65 63 74 |or dir, |out vect|
|00004e90| 6f 72 20 70 69 63 6b 29 | 0d 0a 7b 0d 0a 09 6c 6f |or pick)|..{...lo|
|00004ea0| 63 61 6c 20 76 65 63 74 | 6f 72 20 48 69 74 4c 6f |cal vect|or HitLo|
|00004eb0| 63 61 74 69 6f 6e 2c 20 | 48 69 74 4e 6f 72 6d 61 |cation, |HitNorma|
|00004ec0| 6c 2c 20 64 69 73 74 3b | 0d 0a 09 6c 6f 63 61 6c |l, dist;|...local|
|00004ed0| 20 61 63 74 6f 72 20 48 | 69 74 41 63 74 6f 72 3b | actor H|itActor;|
|00004ee0| 0d 0a 0d 0a 09 70 69 63 | 6b 20 3d 20 64 69 72 20 |.....pic|k = dir |
|00004ef0| 2a 20 28 4d 49 4e 53 54 | 52 41 46 45 44 49 53 54 |* (MINST|RAFEDIST|
|00004f00| 20 2b 20 32 20 2a 20 4d | 49 4e 53 54 52 41 46 45 | + 2 * M|INSTRAFE|
|00004f10| 44 49 53 54 20 2a 20 46 | 52 61 6e 64 28 29 29 3b |DIST * F|Rand());|
|00004f20| 0d 0a 0d 0a 09 48 69 74 | 41 63 74 6f 72 20 3d 20 |.....Hit|Actor = |
|00004f30| 54 72 61 63 65 28 48 69 | 74 4c 6f 63 61 74 69 6f |Trace(Hi|tLocatio|
|00004f40| 6e 2c 20 48 69 74 4e 6f | 72 6d 61 6c 2c 20 50 61 |n, HitNo|rmal, Pa|
|00004f50| 77 6e 2e 4c 6f 63 61 74 | 69 6f 6e 20 2b 20 70 69 |wn.Locat|ion + pi|
|00004f60| 63 6b 20 2b 20 31 2e 35 | 20 2a 20 50 61 77 6e 2e |ck + 1.5| * Pawn.|
|00004f70| 43 6f 6c 6c 69 73 69 6f | 6e 52 61 64 69 75 73 20 |Collisio|nRadius |
|00004f80| 2a 20 64 69 72 20 2c 20 | 50 61 77 6e 2e 4c 6f 63 |* dir , |Pawn.Loc|
|00004f90| 61 74 69 6f 6e 2c 20 66 | 61 6c 73 65 29 3b 0d 0a |ation, f|alse);..|
|00004fa0| 09 69 66 20 28 48 69 74 | 41 63 74 6f 72 20 21 3d |.if (Hit|Actor !=|
|00004fb0| 20 4e 6f 6e 65 29 0d 0a | 09 7b 0d 0a 09 09 70 69 | None)..|.{....pi|
|00004fc0| 63 6b 20 3d 20 48 69 74 | 4c 6f 63 61 74 69 6f 6e |ck = Hit|Location|
|00004fd0| 20 2b 20 28 48 69 74 4e | 6f 72 6d 61 6c 20 2d 20 | + (HitN|ormal - |
|00004fe0| 64 69 72 29 20 2a 20 32 | 20 2a 20 50 61 77 6e 2e |dir) * 2| * Pawn.|
|00004ff0| 43 6f 6c 6c 69 73 69 6f | 6e 52 61 64 69 75 73 3b |Collisio|nRadius;|
|00005000| 0d 0a 09 09 69 66 20 28 | 20 21 46 61 73 74 54 72 |....if (| !FastTr|
|00005010| 61 63 65 28 70 69 63 6b | 2c 20 50 61 77 6e 2e 4c |ace(pick|, Pawn.L|
|00005020| 6f 63 61 74 69 6f 6e 29 | 20 29 0d 0a 09 09 09 72 |ocation)| ).....r|
|00005030| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 0a 09 7d |eturn fa|lse;...}|
|00005040| 0d 0a 09 65 6c 73 65 0d | 0a 09 09 70 69 63 6b 20 |...else.|...pick |
|00005050| 3d 20 50 61 77 6e 2e 4c | 6f 63 61 74 69 6f 6e 20 |= Pawn.L|ocation |
|00005060| 2b 20 70 69 63 6b 3b 0d | 0a 0d 0a 09 64 69 73 74 |+ pick;.|....dist|
|00005070| 20 3d 20 70 69 63 6b 20 | 2d 20 50 61 77 6e 2e 4c | = pick |- Pawn.L|
|00005080| 6f 63 61 74 69 6f 6e 3b | 0d 0a 09 69 66 20 28 50 |ocation;|...if (P|
|00005090| 61 77 6e 2e 50 68 79 73 | 69 63 73 20 3d 3d 20 50 |awn.Phys|ics == P|
|000050a0| 48 59 53 5f 57 61 6c 6b | 69 6e 67 29 0d 0a 09 09 |HYS_Walk|ing)....|
|000050b0| 64 69 73 74 2e 5a 20 3d | 20 30 3b 0d 0a 0d 0a 09 |dist.Z =| 0;.....|
|000050c0| 72 65 74 75 72 6e 20 28 | 56 53 69 7a 65 28 64 69 |return (|VSize(di|
|000050d0| 73 74 29 20 3e 20 4d 49 | 4e 53 54 52 41 46 45 44 |st) > MI|NSTRAFED|
|000050e0| 49 53 54 29 3b 0d 0a 7d | 0d 0a 0d 0a 66 75 6e 63 |IST);..}|....func|
|000050f0| 74 69 6f 6e 20 52 65 73 | 74 61 72 74 28 29 0d 0a |tion Res|tart()..|
|00005100| 7b 0d 0a 09 53 75 70 65 | 72 2e 52 65 73 74 61 72 |{...Supe|r.Restar|
|00005110| 74 28 29 3b 0d 0a 09 52 | 65 53 65 74 53 6b 69 6c |t();...R|eSetSkil|
|00005120| 6c 28 29 3b 0d 0a 09 47 | 6f 74 6f 53 74 61 74 65 |l();...G|otoState|
|00005130| 28 27 52 6f 61 6d 69 6e | 67 27 2c 27 44 6f 6e 65 |('Roamin|g','Done|
|00005140| 52 6f 61 6d 69 6e 67 27 | 29 3b 0d 0a 7d 0d 0a 0d |Roaming'|);..}...|
|00005150| 0a 66 75 6e 63 74 69 6f | 6e 20 43 61 6e 63 65 6c |.functio|n Cancel|
|00005160| 43 61 6d 70 46 6f 72 28 | 43 6f 6e 74 72 6f 6c 6c |CampFor(|Controll|
|00005170| 65 72 20 43 29 3b 0d 0a | 0d 0a 66 75 6e 63 74 69 |er C);..|..functi|
|00005180| 6f 6e 20 62 6f 6f 6c 20 | 41 64 6a 75 73 74 41 72 |on bool |AdjustAr|
|00005190| 6f 75 6e 64 28 50 61 77 | 6e 20 4f 74 68 65 72 29 |ound(Paw|n Other)|
|000051a0| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 66 6c 6f 61 |..{...lo|cal floa|
|000051b0| 74 20 73 70 65 65 64 3b | 0d 0a 09 6c 6f 63 61 6c |t speed;|...local|
|000051c0| 20 76 65 63 74 6f 72 20 | 56 65 6c 44 69 72 2c 20 | vector |VelDir, |
|000051d0| 4f 74 68 65 72 44 69 72 | 2c 20 53 69 64 65 44 69 |OtherDir|, SideDi|
|000051e0| 72 3b 0d 0a 0d 0a 09 73 | 70 65 65 64 20 3d 20 56 |r;.....s|peed = V|
|000051f0| 53 69 7a 65 28 50 61 77 | 6e 2e 41 63 63 65 6c 65 |Size(Paw|n.Accele|
|00005200| 72 61 74 69 6f 6e 29 3b | 0d 0a 09 69 66 20 28 20 |ration);|...if ( |
|00005210| 73 70 65 65 64 20 3c 20 | 50 61 77 6e 2e 57 61 6c |speed < |Pawn.Wal|
|00005220| 6b 69 6e 67 50 63 74 20 | 2a 20 50 61 77 6e 2e 47 |kingPct |* Pawn.G|
|00005230| 72 6f 75 6e 64 53 70 65 | 65 64 20 29 0d 0a 09 09 |roundSpe|ed )....|
|00005240| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 0d |return f|alse;...|
|00005250| 0a 09 56 65 6c 44 69 72 | 20 3d 20 50 61 77 6e 2e |..VelDir| = Pawn.|
|00005260| 41 63 63 65 6c 65 72 61 | 74 69 6f 6e 2f 73 70 65 |Accelera|tion/spe|
|00005270| 65 64 3b 0d 0a 09 56 65 | 6c 44 69 72 2e 5a 20 3d |ed;...Ve|lDir.Z =|
|00005280| 20 30 3b 0d 0a 09 4f 74 | 68 65 72 44 69 72 20 3d | 0;...Ot|herDir =|
|00005290| 20 4f 74 68 65 72 2e 4c | 6f 63 61 74 69 6f 6e 20 | Other.L|ocation |
|000052a0| 2d 20 50 61 77 6e 2e 4c | 6f 63 61 74 69 6f 6e 3b |- Pawn.L|ocation;|
|000052b0| 0d 0a 09 4f 74 68 65 72 | 44 69 72 2e 5a 20 3d 20 |...Other|Dir.Z = |
|000052c0| 30 3b 0d 0a 09 4f 74 68 | 65 72 44 69 72 20 3d 20 |0;...Oth|erDir = |
|000052d0| 4e 6f 72 6d 61 6c 28 4f | 74 68 65 72 44 69 72 29 |Normal(O|therDir)|
|000052e0| 3b 0d 0a 09 69 66 20 28 | 20 28 56 65 6c 44 69 72 |;...if (| (VelDir|
|000052f0| 20 44 6f 74 20 4f 74 68 | 65 72 44 69 72 29 20 3e | Dot Oth|erDir) >|
|00005300| 20 30 2e 38 20 29 0d 0a | 09 7b 0d 0a 09 09 62 41 | 0.8 )..|.{....bA|
|00005310| 64 6a 75 73 74 69 6e 67 | 20 3d 20 74 72 75 65 3b |djusting| = true;|
|00005320| 0d 0a 09 09 53 69 64 65 | 44 69 72 2e 58 20 3d 20 |....Side|Dir.X = |
|00005330| 56 65 6c 44 69 72 2e 59 | 3b 0d 0a 09 09 53 69 64 |VelDir.Y|;....Sid|
|00005340| 65 44 69 72 2e 59 20 3d | 20 2d 31 20 2a 20 56 65 |eDir.Y =| -1 * Ve|
|00005350| 6c 44 69 72 2e 58 3b 0d | 0a 09 09 69 66 20 28 20 |lDir.X;.|...if ( |
|00005360| 28 53 69 64 65 44 69 72 | 20 44 6f 74 20 4f 74 68 |(SideDir| Dot Oth|
|00005370| 65 72 44 69 72 29 20 3e | 20 30 20 29 0d 0a 09 09 |erDir) >| 0 )....|
|00005380| 09 53 69 64 65 44 69 72 | 20 2a 3d 20 2d 31 3b 0d |.SideDir| *= -1;.|
|00005390| 0a 09 09 41 64 6a 75 73 | 74 4c 6f 63 20 3d 20 50 |...Adjus|tLoc = P|
|000053a0| 61 77 6e 2e 4c 6f 63 61 | 74 69 6f 6e 20 2b 20 31 |awn.Loca|tion + 1|
|000053b0| 2e 35 20 2a 20 4f 74 68 | 65 72 2e 43 6f 6c 6c 69 |.5 * Oth|er.Colli|
|000053c0| 73 69 6f 6e 52 61 64 69 | 75 73 20 2a 20 28 30 2e |sionRadi|us * (0.|
|000053d0| 35 20 2a 20 56 65 6c 44 | 69 72 20 2b 20 53 69 64 |5 * VelD|ir + Sid|
|000053e0| 65 44 69 72 29 3b 0d 0a | 09 7d 0d 0a 7d 0d 0a 0d |eDir);..|.}..}...|
|000053f0| 0a 66 75 6e 63 74 69 6f | 6e 20 44 69 72 65 63 74 |.functio|n Direct|
|00005400| 65 64 57 61 6e 64 65 72 | 28 76 65 63 74 6f 72 20 |edWander|(vector |
|00005410| 57 61 6e 64 65 72 44 69 | 72 29 0d 0a 7b 0d 0a 09 |WanderDi|r)..{...|
|00005420| 47 6f 61 6c 53 74 72 69 | 6e 67 20 3d 20 22 44 49 |GoalStri|ng = "DI|
|00005430| 52 45 43 54 45 44 20 57 | 41 4e 44 45 52 20 22 24 |RECTED W|ANDER "$|
|00005440| 47 6f 61 6c 53 74 72 69 | 6e 67 3b 0d 0a 09 50 61 |GoalStri|ng;...Pa|
|00005450| 77 6e 2e 62 57 61 6e 74 | 73 54 6f 43 72 6f 75 63 |wn.bWant|sToCrouc|
|00005460| 68 20 3d 20 50 61 77 6e | 2e 62 49 73 43 72 6f 75 |h = Pawn|.bIsCrou|
|00005470| 63 68 65 64 3b 0d 0a 09 | 69 66 20 28 20 54 65 73 |ched;...|if ( Tes|
|00005480| 74 44 69 72 65 63 74 69 | 6f 6e 28 57 61 6e 64 65 |tDirecti|on(Wande|
|00005490| 72 44 69 72 2c 44 65 73 | 74 69 6e 61 74 69 6f 6e |rDir,Des|tination|
|000054a0| 29 20 29 0d 0a 09 09 47 | 6f 74 6f 53 74 61 74 65 |) )....G|otoState|
|000054b0| 28 27 52 65 73 74 46 6f | 72 6d 61 74 69 6f 6e 27 |('RestFo|rmation'|
|000054c0| 2c 20 27 4d 6f 76 69 6e | 67 27 29 3b 0d 0a 09 65 |, 'Movin|g');...e|
|000054d0| 6c 73 65 0d 0a 09 09 47 | 6f 74 6f 53 74 61 74 65 |lse....G|otoState|
|000054e0| 28 27 52 65 73 74 46 6f | 72 6d 61 74 69 6f 6e 27 |('RestFo|rmation'|
|000054f0| 2c 20 27 42 65 67 69 6e | 27 29 3b 0d 0a 7d 0d 0a |, 'Begin|');..}..|
|00005500| 0d 0a 65 76 65 6e 74 20 | 62 6f 6f 6c 20 4e 6f 74 |..event |bool Not|
|00005510| 69 66 79 42 75 6d 70 28 | 61 63 74 6f 72 20 4f 74 |ifyBump(|actor Ot|
|00005520| 68 65 72 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |her)..{.|..local |
|00005530| 50 61 77 6e 20 50 3b 0d | 0a 0d 0a 09 44 69 73 61 |Pawn P;.|....Disa|
|00005540| 62 6c 65 28 27 4e 6f 74 | 69 66 79 42 75 6d 70 27 |ble('Not|ifyBump'|
|00005550| 29 3b 0d 0a 09 50 20 3d | 20 50 61 77 6e 28 4f 74 |);...P =| Pawn(Ot|
|00005560| 68 65 72 29 3b 0d 0a 09 | 69 66 20 28 20 28 50 20 |her);...|if ( (P |
|00005570| 3d 3d 20 4e 6f 6e 65 29 | 20 7c 7c 20 28 50 2e 43 |== None)| || (P.C|
|00005580| 6f 6e 74 72 6f 6c 6c 65 | 72 20 3d 3d 20 4e 6f 6e |ontrolle|r == Non|
|00005590| 65 29 20 7c 7c 20 28 45 | 6e 65 6d 79 20 3d 3d 20 |e) || (E|nemy == |
|000055a0| 50 29 20 29 0d 0a 09 09 | 72 65 74 75 72 6e 20 66 |P) )....|return f|
|000055b0| 61 6c 73 65 3b 0d 0a 09 | 69 66 20 28 20 53 65 74 |alse;...|if ( Set|
|000055c0| 45 6e 65 6d 79 28 50 29 | 20 29 0d 0a 09 7b 0d 0a |Enemy(P)| )...{..|
|000055d0| 09 09 57 68 61 74 54 6f | 44 6f 4e 65 78 74 28 34 |..WhatTo|DoNext(4|
|000055e0| 29 3b 0d 0a 09 09 72 65 | 74 75 72 6e 20 66 61 6c |);....re|turn fal|
|000055f0| 73 65 3b 0d 0a 09 7d 0d | 0a 0d 0a 09 69 66 20 28 |se;...}.|....if (|
|00005600| 20 45 6e 65 6d 79 20 3d | 3d 20 50 20 29 0d 0a 09 | Enemy =|= P )...|
|00005610| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0a |.return |false;..|
|00005620| 0d 0a 09 69 66 20 28 20 | 21 41 64 6a 75 73 74 41 |...if ( |!AdjustA|
|00005630| 72 6f 75 6e 64 28 50 29 | 20 29 0d 0a 09 09 43 61 |round(P)| )....Ca|
|00005640| 6e 63 65 6c 43 61 6d 70 | 46 6f 72 28 50 2e 43 6f |ncelCamp|For(P.Co|
|00005650| 6e 74 72 6f 6c 6c 65 72 | 29 3b 0d 0a 09 72 65 74 |ntroller|);...ret|
|00005660| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 7d 0d 0a 0d |urn fals|e;..}...|
|00005670| 0a 66 75 6e 63 74 69 6f | 6e 20 53 65 74 46 61 6c |.functio|n SetFal|
|00005680| 6c 28 29 0d 0a 7b 0d 0a | 09 69 66 20 28 50 61 77 |l()..{..|.if (Paw|
|00005690| 6e 2e 62 43 61 6e 46 6c | 79 29 0d 0a 09 7b 0d 0a |n.bCanFl|y)...{..|
|000056a0| 09 09 50 61 77 6e 2e 53 | 65 74 50 68 79 73 69 63 |..Pawn.S|etPhysic|
|000056b0| 73 28 50 48 59 53 5f 46 | 6c 79 69 6e 67 29 3b 0d |s(PHYS_F|lying);.|
|000056c0| 0a 09 09 72 65 74 75 72 | 6e 3b 0d 0a 09 7d 0d 0a |...retur|n;...}..|
|000056d0| 09 69 66 20 28 20 50 61 | 77 6e 2e 62 4e 6f 4a 75 |.if ( Pa|wn.bNoJu|
|000056e0| 6d 70 41 64 6a 75 73 74 | 20 29 0d 0a 09 7b 0d 0a |mpAdjust| )...{..|
|000056f0| 09 09 50 61 77 6e 2e 62 | 4e 6f 4a 75 6d 70 41 64 |..Pawn.b|NoJumpAd|
|00005700| 6a 75 73 74 20 3d 20 66 | 61 6c 73 65 3b 0d 0a 09 |just = f|alse;...|
|00005710| 09 72 65 74 75 72 6e 3b | 0d 0a 09 7d 0d 0a 09 65 |.return;|...}...e|
|00005720| 6c 73 65 0d 0a 09 7b 0d | 0a 09 09 50 61 77 6e 2e |lse...{.|...Pawn.|
|00005730| 56 65 6c 6f 63 69 74 79 | 20 3d 20 45 41 64 6a 75 |Velocity| = EAdju|
|00005740| 73 74 4a 75 6d 70 28 50 | 61 77 6e 2e 56 65 6c 6f |stJump(P|awn.Velo|
|00005750| 63 69 74 79 2e 5a 2c 50 | 61 77 6e 2e 47 72 6f 75 |city.Z,P|awn.Grou|
|00005760| 6e 64 53 70 65 65 64 29 | 3b 0d 0a 09 09 50 61 77 |ndSpeed)|;....Paw|
|00005770| 6e 2e 41 63 63 65 6c 65 | 72 61 74 69 6f 6e 20 3d |n.Accele|ration =|
|00005780| 20 76 65 63 74 28 30 2c | 30 2c 30 29 3b 0d 0a 09 | vect(0,|0,0);...|
|00005790| 7d 0d 0a 7d 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |}..}....|function|
|000057a0| 20 62 6f 6f 6c 20 4e 6f | 74 69 66 79 4c 61 6e 64 | bool No|tifyLand|
|000057b0| 65 64 28 76 65 63 74 6f | 72 20 48 69 74 4e 6f 72 |ed(vecto|r HitNor|
|000057c0| 6d 61 6c 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |mal)..{.|..local |
|000057d0| 76 65 63 74 6f 72 20 56 | 65 6c 32 44 3b 0d 0a 0d |vector V|el2D;...|
|000057e0| 0a 09 69 66 20 28 20 4d | 6f 76 65 54 61 72 67 65 |..if ( M|oveTarge|
|000057f0| 74 20 21 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 7b 0d |t != Non|e )...{.|
|00005800| 0a 09 09 56 65 6c 32 44 | 20 3d 20 50 61 77 6e 2e |...Vel2D| = Pawn.|
|00005810| 56 65 6c 6f 63 69 74 79 | 3b 0d 0a 09 09 56 65 6c |Velocity|;....Vel|
|00005820| 32 44 2e 5a 20 3d 20 30 | 3b 0d 0a 09 09 69 66 20 |2D.Z = 0|;....if |
|00005830| 28 20 28 56 65 6c 32 44 | 20 44 6f 74 20 28 4d 6f |( (Vel2D| Dot (Mo|
|00005840| 76 65 54 61 72 67 65 74 | 2e 4c 6f 63 61 74 69 6f |veTarget|.Locatio|
|00005850| 6e 20 2d 20 50 61 77 6e | 2e 4c 6f 63 61 74 69 6f |n - Pawn|.Locatio|
|00005860| 6e 29 29 20 3c 20 30 20 | 29 0d 0a 09 09 7b 0d 0a |n)) < 0 |)....{..|
|00005870| 09 09 09 50 61 77 6e 2e | 41 63 63 65 6c 65 72 61 |...Pawn.|Accelera|
|00005880| 74 69 6f 6e 20 3d 20 76 | 65 63 74 28 30 2c 30 2c |tion = v|ect(0,0,|
|00005890| 30 29 3b 0d 0a 09 09 09 | 69 66 20 28 20 4e 61 76 |0);.....|if ( Nav|
|000058a0| 69 67 61 74 69 6f 6e 50 | 6f 69 6e 74 28 4d 6f 76 |igationP|oint(Mov|
|000058b0| 65 54 61 72 67 65 74 29 | 20 21 3d 20 4e 6f 6e 65 |eTarget)| != None|
|000058c0| 20 29 0d 0a 09 09 09 09 | 50 61 77 6e 2e 41 6e 63 | )......|Pawn.Anc|
|000058d0| 68 6f 72 20 3d 20 4e 61 | 76 69 67 61 74 69 6f 6e |hor = Na|vigation|
|000058e0| 50 6f 69 6e 74 28 4d 6f | 76 65 54 61 72 67 65 74 |Point(Mo|veTarget|
|000058f0| 29 3b 0d 0a 09 09 09 4d | 6f 76 65 54 69 6d 65 72 |);.....M|oveTimer|
|00005900| 20 3d 20 2d 31 3b 0d 0a | 09 09 7d 0d 0a 09 7d 0d | = -1;..|..}...}.|
|00005910| 0a 09 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d |..return| false;.|
|00005920| 0a 7d 0d 0a 0d 0a 2f 2a | 20 46 69 6e 64 42 65 73 |.}..../*| FindBes|
|00005930| 74 50 61 74 68 54 6f 77 | 61 72 64 28 29 0d 0a 41 |tPathTow|ard()..A|
|00005940| 73 73 75 6d 65 73 20 74 | 68 65 20 64 65 73 69 72 |ssumes t|he desir|
|00005950| 65 64 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 20 69 |ed desti|nation i|
|00005960| 73 20 6e 6f 74 20 64 69 | 72 65 63 74 6c 79 20 72 |s not di|rectly r|
|00005970| 65 61 63 68 61 62 6c 65 | 2e 0d 0a 49 74 20 74 72 |eachable|...It tr|
|00005980| 69 65 73 20 74 6f 20 73 | 65 74 20 44 65 73 74 69 |ies to s|et Desti|
|00005990| 6e 61 74 69 6f 6e 20 74 | 6f 20 74 68 65 20 6c 6f |nation t|o the lo|
|000059a0| 63 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 62 65 |cation o|f the be|
|000059b0| 73 74 20 77 61 79 70 6f | 69 6e 74 2c 20 61 6e 64 |st waypo|int, and|
|000059c0| 20 72 65 74 75 72 6e 73 | 20 74 72 75 65 20 69 66 | returns| true if|
|000059d0| 20 73 75 63 63 65 73 73 | 66 75 6c 0d 0a 2a 2f 0d | success|ful..*/.|
|000059e0| 0a 66 75 6e 63 74 69 6f | 6e 20 62 6f 6f 6c 20 46 |.functio|n bool F|
|000059f0| 69 6e 64 42 65 73 74 50 | 61 74 68 54 6f 77 61 72 |indBestP|athTowar|
|00005a00| 64 28 41 63 74 6f 72 20 | 41 2c 20 62 6f 6f 6c 20 |d(Actor |A, bool |
|00005a10| 62 43 68 65 63 6b 65 64 | 52 65 61 63 68 2c 20 62 |bChecked|Reach, b|
|00005a20| 6f 6f 6c 20 62 41 6c 6c | 6f 77 44 65 74 6f 75 72 |ool bAll|owDetour|
|00005a30| 29 0d 0a 7b 0d 0a 09 69 | 66 20 28 20 21 62 43 68 |)..{...i|f ( !bCh|
|00005a40| 65 63 6b 65 64 52 65 61 | 63 68 20 26 26 20 41 63 |eckedRea|ch && Ac|
|00005a50| 74 6f 72 52 65 61 63 68 | 61 62 6c 65 28 41 29 20 |torReach|able(A) |
|00005a60| 29 0d 0a 09 09 4d 6f 76 | 65 54 61 72 67 65 74 20 |)....Mov|eTarget |
|00005a70| 3d 20 41 3b 0d 0a 09 65 | 6c 73 65 0d 0a 09 09 4d |= A;...e|lse....M|
|00005a80| 6f 76 65 54 61 72 67 65 | 74 20 3d 20 46 69 6e 64 |oveTarge|t = Find|
|00005a90| 50 61 74 68 54 6f 77 61 | 72 64 28 41 2c 66 61 6c |PathTowa|rd(A,fal|
|00005aa0| 73 65 29 3b 0d 0a 0d 0a | 09 69 66 20 28 20 4d 6f |se);....|.if ( Mo|
|00005ab0| 76 65 54 61 72 67 65 74 | 20 21 3d 20 4e 6f 6e 65 |veTarget| != None|
|00005ac0| 20 29 0d 0a 09 09 72 65 | 74 75 72 6e 20 74 72 75 | )....re|turn tru|
|00005ad0| 65 3b 0d 0a 09 65 6c 73 | 65 0d 0a 09 7b 0d 0a 09 |e;...els|e...{...|
|00005ae0| 09 69 66 20 28 20 28 41 | 20 3d 3d 20 45 6e 65 6d |.if ( (A| == Enem|
|00005af0| 79 29 20 26 26 20 28 41 | 20 21 3d 20 4e 6f 6e 65 |y) && (A| != None|
|00005b00| 29 20 29 0d 0a 09 09 7b | 0d 0a 09 09 09 46 61 69 |) )....{|.....Fai|
|00005b10| 6c 65 64 48 75 6e 74 54 | 69 6d 65 20 3d 20 4c 65 |ledHuntT|ime = Le|
|00005b20| 76 65 6c 2e 54 69 6d 65 | 53 65 63 6f 6e 64 73 3b |vel.Time|Seconds;|
|00005b30| 0d 0a 09 09 09 46 61 69 | 6c 65 64 48 75 6e 74 45 |.....Fai|ledHuntE|
|00005b40| 6e 65 6d 79 20 3d 20 45 | 6e 65 6d 79 3b 0d 0a 09 |nemy = E|nemy;...|
|00005b50| 09 7d 0d 0a 09 09 69 66 | 20 28 20 62 53 6f 61 6b |.}....if| ( bSoak|
|00005b60| 69 6e 67 20 26 26 20 28 | 50 68 79 73 69 63 73 20 |ing && (|Physics |
|00005b70| 21 3d 20 50 48 59 53 5f | 46 61 6c 6c 69 6e 67 29 |!= PHYS_|Falling)|
|00005b80| 20 29 0d 0a 09 09 09 53 | 6f 61 6b 53 74 6f 70 28 | ).....S|oakStop(|
|00005b90| 22 43 4f 55 4c 44 4e 27 | 54 20 46 49 4e 44 20 42 |"COULDN'|T FIND B|
|00005ba0| 45 53 54 20 50 41 54 48 | 20 54 4f 20 22 24 41 29 |EST PATH| TO "$A)|
|00005bb0| 3b 0d 0a 09 7d 0d 0a 09 | 72 65 74 75 72 6e 20 66 |;...}...|return f|
|00005bc0| 61 6c 73 65 3b 0d 0a 7d | 0d 0a 0d 0a 66 75 6e 63 |alse;..}|....func|
|00005bd0| 74 69 6f 6e 20 62 6f 6f | 6c 20 4e 65 65 64 54 6f |tion boo|l NeedTo|
|00005be0| 54 75 72 6e 28 76 65 63 | 74 6f 72 20 74 61 72 67 |Turn(vec|tor targ|
|00005bf0| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 76 65 63 |)..{...l|ocal vec|
|00005c00| 74 6f 72 20 4c 6f 6f 6b | 44 69 72 2c 41 69 6d 44 |tor Look|Dir,AimD|
|00005c10| 69 72 3b 0d 0a 09 4c 6f | 6f 6b 44 69 72 20 3d 20 |ir;...Lo|okDir = |
|00005c20| 56 65 63 74 6f 72 28 50 | 61 77 6e 2e 52 6f 74 61 |Vector(P|awn.Rota|
|00005c30| 74 69 6f 6e 29 3b 0d 0a | 09 4c 6f 6f 6b 44 69 72 |tion);..|.LookDir|
|00005c40| 2e 5a 20 3d 20 30 3b 0d | 0a 09 4c 6f 6f 6b 44 69 |.Z = 0;.|..LookDi|
|00005c50| 72 20 3d 20 4e 6f 72 6d | 61 6c 28 4c 6f 6f 6b 44 |r = Norm|al(LookD|
|00005c60| 69 72 29 3b 0d 0a 09 41 | 69 6d 44 69 72 20 3d 20 |ir);...A|imDir = |
|00005c70| 74 61 72 67 20 2d 20 50 | 61 77 6e 2e 4c 6f 63 61 |targ - P|awn.Loca|
|00005c80| 74 69 6f 6e 3b 0d 0a 09 | 41 69 6d 44 69 72 2e 5a |tion;...|AimDir.Z|
|00005c90| 20 3d 20 30 3b 0d 0a 09 | 41 69 6d 44 69 72 20 3d | = 0;...|AimDir =|
|00005ca0| 20 4e 6f 72 6d 61 6c 28 | 41 69 6d 44 69 72 29 3b | Normal(|AimDir);|
|00005cb0| 0d 0a 0d 0a 09 72 65 74 | 75 72 6e 20 28 28 4c 6f |.....ret|urn ((Lo|
|00005cc0| 6f 6b 44 69 72 20 44 6f | 74 20 41 69 6d 44 69 72 |okDir Do|t AimDir|
|00005cd0| 29 20 3c 20 30 2e 39 33 | 29 3b 0d 0a 7d 0d 0a 0d |) < 0.93|);..}...|
|00005ce0| 0a 2f 2a 20 4e 65 61 72 | 57 61 6c 6c 28 29 0d 0a |./* Near|Wall()..|
|00005cf0| 72 65 74 75 72 6e 73 20 | 74 72 75 65 20 69 66 20 |returns |true if |
|00005d00| 74 68 65 72 65 20 69 73 | 20 61 20 6e 65 61 72 62 |there is| a nearb|
|00005d10| 79 20 62 61 72 72 69 65 | 72 20 61 74 20 65 79 65 |y barrie|r at eye|
|00005d20| 68 65 69 67 68 74 2c 20 | 61 6e 64 0d 0a 63 68 61 |height, |and..cha|
|00005d30| 6e 67 65 73 20 46 6f 63 | 61 6c 50 6f 69 6e 74 20 |nges Foc|alPoint |
|00005d40| 74 6f 20 61 20 73 75 67 | 67 65 73 74 65 64 20 70 |to a sug|gested p|
|00005d50| 6c 61 63 65 20 74 6f 20 | 6c 6f 6f 6b 0d 0a 2a 2f |lace to |look..*/|
|00005d60| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 62 6f 6f 6c 20 |..functi|on bool |
|00005d70| 4e 65 61 72 57 61 6c 6c | 28 66 6c 6f 61 74 20 77 |NearWall|(float w|
|00005d80| 61 6c 6c 64 69 73 74 29 | 0d 0a 7b 0d 0a 09 6c 6f |alldist)|..{...lo|
|00005d90| 63 61 6c 20 61 63 74 6f | 72 20 48 69 74 41 63 74 |cal acto|r HitAct|
|00005da0| 6f 72 3b 0d 0a 09 6c 6f | 63 61 6c 20 76 65 63 74 |or;...lo|cal vect|
|00005db0| 6f 72 20 48 69 74 4c 6f | 63 61 74 69 6f 6e 2c 20 |or HitLo|cation, |
|00005dc0| 48 69 74 4e 6f 72 6d 61 | 6c 2c 20 56 69 65 77 53 |HitNorma|l, ViewS|
|00005dd0| 70 6f 74 2c 20 56 69 65 | 77 44 69 73 74 2c 20 4c |pot, Vie|wDist, L|
|00005de0| 6f 6f 6b 44 69 72 3b 0d | 0a 0d 0a 09 4c 6f 6f 6b |ookDir;.|....Look|
|00005df0| 44 69 72 20 3d 20 76 65 | 63 74 6f 72 28 52 6f 74 |Dir = ve|ctor(Rot|
|00005e00| 61 74 69 6f 6e 29 3b 0d | 0a 09 56 69 65 77 53 70 |ation);.|..ViewSp|
|00005e10| 6f 74 20 3d 20 50 61 77 | 6e 2e 4c 6f 63 61 74 69 |ot = Paw|n.Locati|
|00005e20| 6f 6e 20 2b 20 50 61 77 | 6e 2e 42 61 73 65 45 79 |on + Paw|n.BaseEy|
|00005e30| 65 48 65 69 67 68 74 20 | 2a 20 76 65 63 74 28 30 |eHeight |* vect(0|
|00005e40| 2c 30 2c 31 29 3b 0d 0a | 09 56 69 65 77 44 69 73 |,0,1);..|.ViewDis|
|00005e50| 74 20 3d 20 4c 6f 6f 6b | 44 69 72 20 2a 20 77 61 |t = Look|Dir * wa|
|00005e60| 6c 6c 64 69 73 74 3b 0d | 0a 09 48 69 74 41 63 74 |lldist;.|..HitAct|
|00005e70| 6f 72 20 3d 20 54 72 61 | 63 65 28 48 69 74 4c 6f |or = Tra|ce(HitLo|
|00005e80| 63 61 74 69 6f 6e 2c 20 | 48 69 74 4e 6f 72 6d 61 |cation, |HitNorma|
|00005e90| 6c 2c 20 56 69 65 77 53 | 70 6f 74 20 2b 20 56 69 |l, ViewS|pot + Vi|
|00005ea0| 65 77 44 69 73 74 2c 20 | 56 69 65 77 53 70 6f 74 |ewDist, |ViewSpot|
|00005eb0| 2c 20 66 61 6c 73 65 29 | 3b 0d 0a 09 69 66 20 28 |, false)|;...if (|
|00005ec0| 20 48 69 74 41 63 74 6f | 72 20 3d 3d 20 4e 6f 6e | HitActo|r == Non|
|00005ed0| 65 20 29 0d 0a 09 09 72 | 65 74 75 72 6e 20 66 61 |e )....r|eturn fa|
|00005ee0| 6c 73 65 3b 0d 0a 0d 0a | 09 56 69 65 77 44 69 73 |lse;....|.ViewDis|
|00005ef0| 74 20 3d 20 4e 6f 72 6d | 61 6c 28 48 69 74 4e 6f |t = Norm|al(HitNo|
|00005f00| 72 6d 61 6c 20 43 72 6f | 73 73 20 76 65 63 74 28 |rmal Cro|ss vect(|
|00005f10| 30 2c 30 2c 31 29 29 20 | 2a 20 77 61 6c 6c 64 69 |0,0,1)) |* walldi|
|00005f20| 73 74 3b 0d 0a 09 69 66 | 20 28 46 52 61 6e 64 28 |st;...if| (FRand(|
|00005f30| 29 20 3c 20 30 2e 35 29 | 0d 0a 09 09 56 69 65 77 |) < 0.5)|....View|
|00005f40| 44 69 73 74 20 2a 3d 20 | 2d 31 3b 0d 0a 0d 0a 09 |Dist *= |-1;.....|
|00005f50| 46 6f 63 75 73 20 3d 20 | 4e 6f 6e 65 3b 0d 0a 09 |Focus = |None;...|
|00005f60| 69 66 20 28 20 46 61 73 | 74 54 72 61 63 65 28 56 |if ( Fas|tTrace(V|
|00005f70| 69 65 77 53 70 6f 74 20 | 2b 20 56 69 65 77 44 69 |iewSpot |+ ViewDi|
|00005f80| 73 74 2c 20 56 69 65 77 | 53 70 6f 74 29 20 29 0d |st, View|Spot) ).|
|00005f90| 0a 09 7b 0d 0a 09 09 46 | 6f 63 61 6c 50 6f 69 6e |..{....F|ocalPoin|
|00005fa0| 74 20 3d 20 50 61 77 6e | 2e 4c 6f 63 61 74 69 6f |t = Pawn|.Locatio|
|00005fb0| 6e 20 2b 20 56 69 65 77 | 44 69 73 74 3b 0d 0a 09 |n + View|Dist;...|
|00005fc0| 09 72 65 74 75 72 6e 20 | 74 72 75 65 3b 0d 0a 09 |.return |true;...|
|00005fd0| 7d 0d 0a 0d 0a 09 69 66 | 20 28 20 46 61 73 74 54 |}.....if| ( FastT|
|00005fe0| 72 61 63 65 28 56 69 65 | 77 53 70 6f 74 20 2d 20 |race(Vie|wSpot - |
|00005ff0| 56 69 65 77 44 69 73 74 | 2c 20 56 69 65 77 53 70 |ViewDist|, ViewSp|
|00006000| 6f 74 29 20 29 0d 0a 09 | 7b 0d 0a 09 09 46 6f 63 |ot) )...|{....Foc|
|00006010| 61 6c 50 6f 69 6e 74 20 | 3d 20 50 61 77 6e 2e 4c |alPoint |= Pawn.L|
|00006020| 6f 63 61 74 69 6f 6e 20 | 2d 20 56 69 65 77 44 69 |ocation |- ViewDi|
|00006030| 73 74 3b 0d 0a 09 09 72 | 65 74 75 72 6e 20 74 72 |st;....r|eturn tr|
|00006040| 75 65 3b 0d 0a 09 7d 0d | 0a 0d 0a 09 46 6f 63 61 |ue;...}.|....Foca|
|00006050| 6c 50 6f 69 6e 74 20 3d | 20 50 61 77 6e 2e 4c 6f |lPoint =| Pawn.Lo|
|00006060| 63 61 74 69 6f 6e 20 2d | 20 4c 6f 6f 6b 44 69 72 |cation -| LookDir|
|00006070| 20 2a 20 33 30 30 3b 0d | 0a 09 72 65 74 75 72 6e | * 300;.|..return|
|00006080| 20 74 72 75 65 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 | true;..|}....// |
|00006090| 63 68 65 63 6b 20 66 6f | 72 20 6c 69 6e 65 20 6f |check fo|r line o|
|000060a0| 66 20 73 69 67 68 74 20 | 74 6f 20 74 61 72 67 65 |f sight |to targe|
|000060b0| 74 20 64 65 6c 74 61 74 | 69 6d 65 20 66 72 6f 6d |t deltat|ime from|
|000060c0| 20 6e 6f 77 2e 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 | now...f|unction |
|000060d0| 62 6f 6f 6c 20 43 68 65 | 63 6b 46 75 74 75 72 65 |bool Che|ckFuture|
|000060e0| 53 69 67 68 74 28 66 6c | 6f 61 74 20 64 65 6c 74 |Sight(fl|oat delt|
|000060f0| 61 74 69 6d 65 29 0d 0a | 7b 0d 0a 09 6c 6f 63 61 |atime)..|{...loca|
|00006100| 6c 20 76 65 63 74 6f 72 | 20 46 75 74 75 72 65 4c |l vector| FutureL|
|00006110| 6f 63 3b 0d 0a 0d 0a 09 | 69 66 20 28 20 54 61 72 |oc;.....|if ( Tar|
|00006120| 67 65 74 20 3d 3d 20 4e | 6f 6e 65 20 29 0d 0a 09 |get == N|one )...|
|00006130| 09 54 61 72 67 65 74 20 | 3d 20 45 6e 65 6d 79 3b |.Target |= Enemy;|
|00006140| 0d 0a 09 69 66 20 28 20 | 54 61 72 67 65 74 20 3d |...if ( |Target =|
|00006150| 3d 20 4e 6f 6e 65 20 29 | 0d 0a 09 09 72 65 74 75 |= None )|....retu|
|00006160| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 0d 0a 09 69 66 |rn false|;.....if|
|00006170| 20 28 20 50 61 77 6e 2e | 41 63 63 65 6c 65 72 61 | ( Pawn.|Accelera|
|00006180| 74 69 6f 6e 20 3d 3d 20 | 76 65 63 74 28 30 2c 30 |tion == |vect(0,0|
|00006190| 2c 30 29 20 29 0d 0a 09 | 09 46 75 74 75 72 65 4c |,0) )...|.FutureL|
|000061a0| 6f 63 20 3d 20 50 61 77 | 6e 2e 4c 6f 63 61 74 69 |oc = Paw|n.Locati|
|000061b0| 6f 6e 3b 0d 0a 09 65 6c | 73 65 0d 0a 09 09 46 75 |on;...el|se....Fu|
|000061c0| 74 75 72 65 4c 6f 63 20 | 3d 20 50 61 77 6e 2e 4c |tureLoc |= Pawn.L|
|000061d0| 6f 63 61 74 69 6f 6e 20 | 2b 20 50 61 77 6e 2e 47 |ocation |+ Pawn.G|
|000061e0| 72 6f 75 6e 64 53 70 65 | 65 64 20 2a 20 4e 6f 72 |roundSpe|ed * Nor|
|000061f0| 6d 61 6c 28 50 61 77 6e | 2e 41 63 63 65 6c 65 72 |mal(Pawn|.Acceler|
|00006200| 61 74 69 6f 6e 29 20 2a | 20 64 65 6c 74 61 54 69 |ation) *| deltaTi|
|00006210| 6d 65 3b 0d 0a 0d 0a 09 | 69 66 20 28 20 50 61 77 |me;.....|if ( Paw|
|00006220| 6e 2e 42 61 73 65 20 21 | 3d 20 4e 6f 6e 65 20 29 |n.Base !|= None )|
|00006230| 0d 0a 09 09 46 75 74 75 | 72 65 4c 6f 63 20 2b 3d |....Futu|reLoc +=|
|00006240| 20 50 61 77 6e 2e 42 61 | 73 65 2e 56 65 6c 6f 63 | Pawn.Ba|se.Veloc|
|00006250| 69 74 79 20 2a 20 64 65 | 6c 74 61 54 69 6d 65 3b |ity * de|ltaTime;|
|00006260| 0d 0a 09 2f 2f 6d 61 6b | 65 20 73 75 72 65 20 77 |...//mak|e sure w|
|00006270| 6f 6e 27 74 20 72 75 6e | 20 69 6e 74 6f 20 73 6f |on't run| into so|
|00006280| 6d 65 74 68 69 6e 67 0d | 0a 09 69 66 20 28 20 21 |mething.|..if ( !|
|00006290| 46 61 73 74 54 72 61 63 | 65 28 46 75 74 75 72 65 |FastTrac|e(Future|
|000062a0| 4c 6f 63 2c 20 50 61 77 | 6e 2e 4c 6f 63 61 74 69 |Loc, Paw|n.Locati|
|000062b0| 6f 6e 29 20 26 26 20 28 | 50 61 77 6e 2e 50 68 79 |on) && (|Pawn.Phy|
|000062c0| 73 69 63 73 20 21 3d 20 | 50 48 59 53 5f 46 61 6c |sics != |PHYS_Fal|
|000062d0| 6c 69 6e 67 29 20 29 0d | 0a 09 09 72 65 74 75 72 |ling) ).|...retur|
|000062e0| 6e 20 66 61 6c 73 65 3b | 0d 0a 0d 0a 09 2f 2f 63 |n false;|.....//c|
|000062f0| 68 65 63 6b 20 69 66 20 | 63 61 6e 20 73 74 69 6c |heck if |can stil|
|00006300| 6c 20 73 65 65 20 74 61 | 72 67 65 74 0d 0a 09 69 |l see ta|rget...i|
|00006310| 66 20 28 20 46 61 73 74 | 54 72 61 63 65 28 54 61 |f ( Fast|Trace(Ta|
|00006320| 72 67 65 74 2e 4c 6f 63 | 61 74 69 6f 6e 20 2b 20 |rget.Loc|ation + |
|00006330| 54 61 72 67 65 74 2e 56 | 65 6c 6f 63 69 74 79 20 |Target.V|elocity |
|00006340| 2a 20 64 65 6c 74 61 74 | 69 6d 65 2c 20 46 75 74 |* deltat|ime, Fut|
|00006350| 75 72 65 4c 6f 63 29 20 | 29 0d 0a 09 09 72 65 74 |ureLoc) |)....ret|
|00006360| 75 72 6e 20 74 72 75 65 | 3b 0d 0a 0d 0a 09 72 65 |urn true|;.....re|
|00006370| 74 75 72 6e 20 66 61 6c | 73 65 3b 0d 0a 7d 0d 0a |turn fal|se;..}..|
|00006380| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 66 6c 6f 61 74 |..functi|on float|
|00006390| 20 41 64 6a 75 73 74 41 | 69 6d 45 72 72 6f 72 28 | AdjustA|imError(|
|000063a0| 66 6c 6f 61 74 20 61 69 | 6d 65 72 72 6f 72 2c 20 |float ai|merror, |
|000063b0| 66 6c 6f 61 74 20 54 61 | 72 67 65 74 44 69 73 74 |float Ta|rgetDist|
|000063c0| 2c 20 62 6f 6f 6c 20 62 | 44 65 66 65 6e 64 4d 65 |, bool b|DefendMe|
|000063d0| 6c 65 65 2c 20 62 6f 6f | 6c 20 62 49 6e 73 74 61 |lee, boo|l bInsta|
|000063e0| 6e 74 50 72 6f 6a 2c 20 | 62 6f 6f 6c 20 62 4c 65 |ntProj, |bool bLe|
|000063f0| 61 64 54 61 72 67 65 74 | 4e 6f 77 20 29 0d 0a 7b |adTarget|Now )..{|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.