home *** CD-ROM | disk | FTP | other *** search
Unknown | 2004-05-10 | 4.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.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 74 42 63 6c 61 73 73 20 |........|tBclass |
|00000010| 54 75 72 72 65 74 43 6f | 6e 74 72 6f 6c 6c 65 72 |TurretCo|ntroller|
|00000020| 20 65 78 74 65 6e 64 73 | 20 41 49 43 6f 6e 74 72 | extends| AIContr|
|00000030| 6f 6c 6c 65 72 3b 0d 0a | 0d 0a 66 75 6e 63 74 69 |oller;..|..functi|
|00000040| 6f 6e 20 72 6f 74 61 74 | 6f 72 20 41 64 6a 75 73 |on rotat|or Adjus|
|00000050| 74 41 69 6d 28 46 69 72 | 65 50 72 6f 70 65 72 74 |tAim(Fir|ePropert|
|00000060| 69 65 73 20 46 69 72 65 | 64 41 6d 6d 75 6e 69 74 |ies Fire|dAmmunit|
|00000070| 69 6f 6e 2c 20 76 65 63 | 74 6f 72 20 70 72 6f 6a |ion, vec|tor proj|
|00000080| 53 74 61 72 74 2c 20 69 | 6e 74 20 61 69 6d 65 72 |Start, i|nt aimer|
|00000090| 72 6f 72 29 0d 0a 7b 0d | 0a 09 69 66 20 28 20 28 |ror)..{.|..if ( (|
|000000a0| 46 52 61 6e 64 28 29 20 | 3c 20 30 2e 32 29 20 26 |FRand() |< 0.2) &|
|000000b0| 26 20 28 45 6e 65 6d 79 | 20 21 3d 20 4e 6f 6e 65 |& (Enemy| != None|
|000000c0| 29 20 26 26 20 28 45 6e | 65 6d 79 2e 43 6f 6e 74 |) && (En|emy.Cont|
|000000d0| 72 6f 6c 6c 65 72 20 21 | 3d 20 4e 6f 6e 65 29 20 |roller !|= None) |
|000000e0| 29 0d 0a 09 09 45 6e 65 | 6d 79 2e 43 6f 6e 74 72 |)....Ene|my.Contr|
|000000f0| 6f 6c 6c 65 72 2e 52 65 | 63 65 69 76 65 57 61 72 |oller.Re|ceiveWar|
|00000100| 6e 69 6e 67 28 50 61 77 | 6e 2c 20 2d 31 2c 20 76 |ning(Paw|n, -1, v|
|00000110| 65 63 74 6f 72 28 52 6f | 74 61 74 69 6f 6e 29 29 |ector(Ro|tation))|
|00000120| 3b 20 0d 0a 0d 0a 20 20 | 20 20 72 65 74 75 72 6e |; .... | return|
|00000130| 20 52 6f 74 61 74 69 6f | 6e 3b 0d 0a 7d 0d 0a 0d | Rotatio|n;..}...|
|00000140| 0a 66 75 6e 63 74 69 6f | 6e 20 50 6f 73 73 65 73 |.functio|n Posses|
|00000150| 73 28 50 61 77 6e 20 61 | 50 61 77 6e 29 0d 0a 7b |s(Pawn a|Pawn)..{|
|00000160| 0d 0a 09 73 75 70 65 72 | 2e 50 6f 73 73 65 73 73 |...super|.Possess|
|00000170| 28 20 61 50 61 77 6e 20 | 29 3b 0d 0a 0d 0a 09 69 |( aPawn |);.....i|
|00000180| 66 20 28 20 4c 65 76 65 | 6c 2e 4e 65 74 4d 6f 64 |f ( Leve|l.NetMod|
|00000190| 65 20 21 3d 20 4e 4d 5f | 53 74 61 6e 64 61 6c 6f |e != NM_|Standalo|
|000001a0| 6e 65 20 29 0d 0a 09 7b | 0d 0a 09 09 53 6b 69 6c |ne )...{|....Skil|
|000001b0| 6c 20 3d 20 36 3b 0d 0a | 09 09 46 6f 63 75 73 4c |l = 6;..|..FocusL|
|000001c0| 65 61 64 20 3d 20 30 2e | 30 30 30 30 34 32 3b 0d |ead = 0.|000042;.|
|000001d0| 0a 09 7d 0d 0a 09 65 6c | 73 65 0d 0a 09 7b 0d 0a |..}...el|se...{..|
|000001e0| 09 09 53 6b 69 6c 6c 20 | 3d 20 4c 65 76 65 6c 2e |..Skill |= Level.|
|000001f0| 47 61 6d 65 2e 47 61 6d | 65 44 69 66 66 69 63 75 |Game.Gam|eDifficu|
|00000200| 6c 74 79 3b 0d 0a 09 09 | 0d 0a 09 09 69 66 20 28 |lty;....|....if (|
|00000210| 20 53 6b 69 6c 6c 20 3e | 20 33 20 29 0d 0a 09 09 | Skill >| 3 )....|
|00000220| 09 46 6f 63 75 73 4c 65 | 61 64 20 3d 20 28 30 2e |.FocusLe|ad = (0.|
|00000230| 30 37 20 2a 20 46 4d 69 | 6e 28 53 6b 69 6c 6c 2c |07 * FMi|n(Skill,|
|00000240| 37 29 29 2f 31 30 30 30 | 30 3b 20 0d 0a 09 7d 0d |7))/1000|0; ...}.|
|00000250| 0a 7d 0d 0a 0d 0a 73 69 | 6d 75 6c 61 74 65 64 20 |.}....si|mulated |
|00000260| 66 75 6e 63 74 69 6f 6e | 20 69 6e 74 20 47 65 74 |function| int Get|
|00000270| 54 65 61 6d 4e 75 6d 28 | 29 0d 0a 7b 0d 0a 09 69 |TeamNum(|)..{...i|
|00000280| 66 20 28 20 56 65 68 69 | 63 6c 65 28 50 61 77 6e |f ( Vehi|cle(Pawn|
|00000290| 29 20 21 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 09 72 |) != Non|e )....r|
|000002a0| 65 74 75 72 6e 20 56 65 | 68 69 63 6c 65 28 50 61 |eturn Ve|hicle(Pa|
|000002b0| 77 6e 29 2e 54 65 61 6d | 3b 0d 0a 09 09 0d 0a 09 |wn).Team|;.......|
|000002c0| 72 65 74 75 72 6e 20 73 | 75 70 65 72 2e 47 65 74 |return s|uper.Get|
|000002d0| 54 65 61 6d 4e 75 6d 28 | 29 3b 0d 0a 7d 0d 0a 0d |TeamNum(|);..}...|
|000002e0| 0a 66 75 6e 63 74 69 6f | 6e 20 62 6f 6f 6c 20 49 |.functio|n bool I|
|000002f0| 73 54 61 72 67 65 74 52 | 65 6c 65 76 61 6e 74 28 |sTargetR|elevant(|
|00000300| 20 50 61 77 6e 20 54 61 | 72 67 65 74 20 29 0d 0a | Pawn Ta|rget )..|
|00000310| 7b 0d 0a 09 69 66 20 28 | 20 28 54 61 72 67 65 74 |{...if (| (Target|
|00000320| 20 21 3d 20 4e 6f 6e 65 | 29 20 26 26 20 28 54 61 | != None|) && (Ta|
|00000330| 72 67 65 74 2e 43 6f 6e | 74 72 6f 6c 6c 65 72 20 |rget.Con|troller |
|00000340| 21 3d 20 4e 6f 6e 65 29 | 20 26 26 20 21 53 61 6d |!= None)| && !Sam|
|00000350| 65 54 65 61 6d 41 73 28 | 54 61 72 67 65 74 2e 43 |eTeamAs(|Target.C|
|00000360| 6f 6e 74 72 6f 6c 6c 65 | 72 29 20 0d 0a 09 09 26 |ontrolle|r) ....&|
|00000370| 26 20 28 54 61 72 67 65 | 74 2e 48 65 61 6c 74 68 |& (Targe|t.Health|
|00000380| 20 3e 20 30 29 20 26 26 | 20 56 53 69 7a 65 28 54 | > 0) &&| VSize(T|
|00000390| 61 72 67 65 74 2e 4c 6f | 63 61 74 69 6f 6e 2d 50 |arget.Lo|cation-P|
|000003a0| 61 77 6e 2e 4c 6f 63 61 | 74 69 6f 6e 29 20 3c 20 |awn.Loca|tion) < |
|000003b0| 50 61 77 6e 2e 53 69 67 | 68 74 52 61 64 69 75 73 |Pawn.Sig|htRadius|
|000003c0| 2a 31 2e 32 35 20 29 0d | 0a 09 09 72 65 74 75 72 |*1.25 ).|...retur|
|000003d0| 6e 20 74 72 75 65 3b 0d | 0a 0d 0a 09 72 65 74 75 |n true;.|....retu|
|000003e0| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 7d 0d 0a 0d 0a |rn false|;..}....|
|000003f0| 2f 2f 20 46 49 58 4d 45 | 20 2d 2d 20 49 6d 70 6c |// FIXME| -- Impl|
|00000400| 65 6d 65 6e 74 20 74 68 | 69 73 20 69 6e 20 50 61 |ement th|is in Pa|
|00000410| 77 6e 20 74 6f 20 73 75 | 70 70 6f 72 74 20 4f 4e |wn to su|pport ON|
|00000420| 53 20 77 65 61 70 6f 6e | 20 73 79 73 74 65 6d 2e |S weapon| system.|
|00000430| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 62 6f 6f 6c 20 |..functi|on bool |
|00000440| 49 73 54 75 72 72 65 74 | 46 69 72 69 6e 67 28 29 |IsTurret|Firing()|
|00000450| 0d 0a 7b 0d 0a 09 69 66 | 20 28 20 28 50 61 77 6e |..{...if| ( (Pawn|
|00000460| 2e 57 65 61 70 6f 6e 20 | 21 3d 20 4e 6f 6e 65 29 |.Weapon |!= None)|
|00000470| 20 26 26 20 50 61 77 6e | 2e 57 65 61 70 6f 6e 2e | && Pawn|.Weapon.|
|00000480| 49 73 46 69 72 69 6e 67 | 28 29 20 29 0d 0a 09 09 |IsFiring|() )....|
|00000490| 72 65 74 75 72 6e 20 74 | 72 75 65 3b 0d 0a 0d 0a |return t|rue;....|
|000004a0| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0a |.return |false;..|
|000004b0| 7d 0d 0a 0d 0a 61 75 74 | 6f 20 73 74 61 74 65 20 |}....aut|o state |
|000004c0| 53 65 61 72 63 68 69 6e | 67 0d 0a 7b 0d 0a 09 65 |Searchin|g..{...e|
|000004d0| 76 65 6e 74 20 53 65 65 | 50 6c 61 79 65 72 28 50 |vent See|Player(P|
|000004e0| 61 77 6e 20 53 65 65 6e | 50 6c 61 79 65 72 29 0d |awn Seen|Player).|
|000004f0| 0a 09 7b 0d 0a 09 09 69 | 66 20 28 20 49 73 54 61 |..{....i|f ( IsTa|
|00000500| 72 67 65 74 52 65 6c 65 | 76 61 6e 74 28 20 53 65 |rgetRele|vant( Se|
|00000510| 65 6e 50 6c 61 79 65 72 | 20 29 20 29 0d 0a 09 09 |enPlayer| ) )....|
|00000520| 7b 0d 0a 09 09 09 45 6e | 65 6d 79 20 3d 20 53 65 |{.....En|emy = Se|
|00000530| 65 6e 50 6c 61 79 65 72 | 3b 0d 0a 09 09 09 47 6f |enPlayer|;.....Go|
|00000540| 74 6f 53 74 61 74 65 28 | 27 45 6e 67 61 67 65 64 |toState(|'Engaged|
|00000550| 27 29 3b 0d 0a 09 09 7d | 09 0d 0a 09 7d 0d 0a 0d |');....}|....}...|
|00000560| 0a 09 66 75 6e 63 74 69 | 6f 6e 20 53 63 61 6e 52 |..functi|on ScanR|
|00000570| 6f 74 61 74 69 6f 6e 28 | 29 0d 0a 09 7b 0d 0a 09 |otation(|)...{...|
|00000580| 09 6c 6f 63 61 6c 20 61 | 63 74 6f 72 20 48 69 74 |.local a|ctor Hit|
|00000590| 41 63 74 6f 72 3b 0d 0a | 09 09 6c 6f 63 61 6c 20 |Actor;..|..local |
|000005a0| 76 65 63 74 6f 72 20 48 | 69 74 4c 6f 63 61 74 69 |vector H|itLocati|
|000005b0| 6f 6e 2c 20 48 69 74 4e | 6f 72 6d 61 6c 2c 20 44 |on, HitN|ormal, D|
|000005c0| 69 72 3b 0d 0a 09 09 6c | 6f 63 61 6c 20 66 6c 6f |ir;....l|ocal flo|
|000005d0| 61 74 20 42 65 73 74 44 | 69 73 74 2c 20 44 69 73 |at BestD|ist, Dis|
|000005e0| 74 3b 0d 0a 09 09 6c 6f | 63 61 6c 20 72 6f 74 61 |t;....lo|cal rota|
|000005f0| 74 6f 72 20 50 69 63 6b | 3b 0d 0a 09 09 0d 0a 09 |tor Pick|;.......|
|00000600| 09 44 65 73 69 72 65 64 | 52 6f 74 61 74 69 6f 6e |.Desired|Rotation|
|00000610| 2e 59 61 77 20 3d 20 30 | 3b 0d 0a 09 09 44 65 73 |.Yaw = 0|;....Des|
|00000620| 69 72 65 64 52 6f 74 61 | 74 69 6f 6e 2e 50 69 74 |iredRota|tion.Pit|
|00000630| 63 68 20 3d 20 52 6f 74 | 61 74 69 6f 6e 2e 50 69 |ch = Rot|ation.Pi|
|00000640| 74 63 68 20 2b 20 31 36 | 33 38 34 20 2b 20 52 61 |tch + 16|384 + Ra|
|00000650| 6e 64 28 33 32 37 36 38 | 29 3b 20 0d 0a 09 09 44 |nd(32768|); ....D|
|00000660| 69 72 20 3d 20 76 65 63 | 74 6f 72 28 44 65 73 69 |ir = vec|tor(Desi|
|00000670| 72 65 64 52 6f 74 61 74 | 69 6f 6e 29 3b 0d 0a 09 |redRotat|ion);...|
|00000680| 09 0d 0a 09 09 2f 2f 20 | 63 68 65 63 6b 20 6e 65 |.....// |check ne|
|00000690| 77 20 70 69 74 63 68 20 | 6e 6f 74 20 61 20 62 6c |w pitch |not a bl|
|000006a0| 6f 63 6b 65 64 20 64 69 | 72 65 63 74 69 6f 6e 0d |ocked di|rection.|
|000006b0| 0a 09 09 48 69 74 41 63 | 74 6f 72 20 3d 20 54 72 |...HitAc|tor = Tr|
|000006c0| 61 63 65 28 48 69 74 4c | 6f 63 61 74 69 6f 6e 2c |ace(HitL|ocation,|
|000006d0| 48 69 74 4e 6f 72 6d 61 | 6c 2c 50 61 77 6e 2e 4c |HitNorma|l,Pawn.L|
|000006e0| 6f 63 61 74 69 6f 6e 20 | 2b 20 32 30 30 30 20 2a |ocation |+ 2000 *|
|000006f0| 20 44 69 72 2c 50 61 77 | 6e 2e 4c 6f 63 61 74 69 | Dir,Paw|n.Locati|
|00000700| 6f 6e 2c 66 61 6c 73 65 | 29 3b 0d 0a 09 09 69 66 |on,false|);....if|
|00000710| 20 28 20 48 69 74 41 63 | 74 6f 72 20 3d 3d 20 4e | ( HitAc|tor == N|
|00000720| 6f 6e 65 20 29 0d 0a 09 | 09 09 72 65 74 75 72 6e |one )...|..return|
|00000730| 3b 0d 0a 09 09 42 65 73 | 74 44 69 73 74 20 3d 20 |;....Bes|tDist = |
|00000740| 76 73 69 7a 65 28 48 69 | 74 4c 6f 63 61 74 69 6f |vsize(Hi|tLocatio|
|00000750| 6e 20 2d 20 50 61 77 6e | 2e 4c 6f 63 61 74 69 6f |n - Pawn|.Locatio|
|00000760| 6e 29 3b 0d 0a 09 09 50 | 69 63 6b 20 3d 20 44 65 |n);....P|ick = De|
|00000770| 73 69 72 65 64 52 6f 74 | 61 74 69 6f 6e 3b 0d 0a |siredRot|ation;..|
|00000780| 09 09 0d 0a 09 09 44 65 | 73 69 72 65 64 52 6f 74 |......De|siredRot|
|00000790| 61 74 69 6f 6e 2e 50 69 | 74 63 68 20 2b 3d 20 33 |ation.Pi|tch += 3|
|000007a0| 32 37 36 38 3b 0d 0a 09 | 09 44 69 72 20 3d 20 76 |2768;...|.Dir = v|
|000007b0| 65 63 74 6f 72 28 44 65 | 73 69 72 65 64 52 6f 74 |ector(De|siredRot|
|000007c0| 61 74 69 6f 6e 29 3b 0d | 0a 09 09 2f 2f 20 63 68 |ation);.|...// ch|
|000007d0| 65 63 6b 20 6e 65 77 20 | 70 69 74 63 68 20 6e 6f |eck new |pitch no|
|000007e0| 74 20 61 20 62 6c 6f 63 | 6b 65 64 20 64 69 72 65 |t a bloc|ked dire|
|000007f0| 63 74 69 6f 6e 0d 0a 09 | 09 48 69 74 41 63 74 6f |ction...|.HitActo|
|00000800| 72 20 3d 20 54 72 61 63 | 65 28 48 69 74 4c 6f 63 |r = Trac|e(HitLoc|
|00000810| 61 74 69 6f 6e 2c 48 69 | 74 4e 6f 72 6d 61 6c 2c |ation,Hi|tNormal,|
|00000820| 50 61 77 6e 2e 4c 6f 63 | 61 74 69 6f 6e 20 2b 20 |Pawn.Loc|ation + |
|00000830| 32 30 30 30 20 2a 20 44 | 69 72 2c 50 61 77 6e 2e |2000 * D|ir,Pawn.|
|00000840| 4c 6f 63 61 74 69 6f 6e | 2c 66 61 6c 73 65 29 3b |Location|,false);|
|00000850| 0d 0a 09 09 69 66 20 28 | 20 48 69 74 41 63 74 6f |....if (| HitActo|
|00000860| 72 20 3d 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 09 09 |r == Non|e ).....|
|00000870| 72 65 74 75 72 6e 3b 0d | 0a 09 09 44 69 73 74 20 |return;.|...Dist |
|00000880| 3d 20 76 73 69 7a 65 28 | 48 69 74 4c 6f 63 61 74 |= vsize(|HitLocat|
|00000890| 69 6f 6e 20 2d 20 50 61 | 77 6e 2e 4c 6f 63 61 74 |ion - Pa|wn.Locat|
|000008a0| 69 6f 6e 29 3b 0d 0a 09 | 09 69 66 20 28 20 44 69 |ion);...|.if ( Di|
|000008b0| 73 74 20 3e 20 42 65 73 | 74 44 69 73 74 20 29 0d |st > Bes|tDist ).|
|000008c0| 0a 09 09 7b 0d 0a 09 09 | 09 42 65 73 74 44 69 73 |...{....|.BestDis|
|000008d0| 74 20 3d 20 44 69 73 74 | 3b 0d 0a 09 09 09 50 69 |t = Dist|;.....Pi|
|000008e0| 63 6b 20 3d 20 44 65 73 | 69 72 65 64 52 6f 74 61 |ck = Des|iredRota|
|000008f0| 74 69 6f 6e 3b 0d 0a 09 | 09 7d 0d 0a 09 09 0d 0a |tion;...|.}......|
|00000900| 09 09 44 65 73 69 72 65 | 64 52 6f 74 61 74 69 6f |..Desire|dRotatio|
|00000910| 6e 2e 50 69 74 63 68 20 | 2b 3d 20 31 36 33 38 34 |n.Pitch |+= 16384|
|00000920| 3b 0d 0a 09 09 44 69 72 | 20 3d 20 76 65 63 74 6f |;....Dir| = vecto|
|00000930| 72 28 44 65 73 69 72 65 | 64 52 6f 74 61 74 69 6f |r(Desire|dRotatio|
|00000940| 6e 29 3b 0d 0a 09 09 2f | 2f 20 63 68 65 63 6b 20 |n);..../|/ check |
|00000950| 6e 65 77 20 70 69 74 63 | 68 20 6e 6f 74 20 61 20 |new pitc|h not a |
|00000960| 62 6c 6f 63 6b 65 64 20 | 64 69 72 65 63 74 69 6f |blocked |directio|
|00000970| 6e 0d 0a 09 09 48 69 74 | 41 63 74 6f 72 20 3d 20 |n....Hit|Actor = |
|00000980| 54 72 61 63 65 28 48 69 | 74 4c 6f 63 61 74 69 6f |Trace(Hi|tLocatio|
|00000990| 6e 2c 48 69 74 4e 6f 72 | 6d 61 6c 2c 50 61 77 6e |n,HitNor|mal,Pawn|
|000009a0| 2e 4c 6f 63 61 74 69 6f | 6e 20 2b 20 32 30 30 30 |.Locatio|n + 2000|
|000009b0| 20 2a 20 44 69 72 2c 50 | 61 77 6e 2e 4c 6f 63 61 | * Dir,P|awn.Loca|
|000009c0| 74 69 6f 6e 2c 66 61 6c | 73 65 29 3b 0d 0a 09 09 |tion,fal|se);....|
|000009d0| 69 66 20 28 20 48 69 74 | 41 63 74 6f 72 20 3d 3d |if ( Hit|Actor ==|
|000009e0| 20 4e 6f 6e 65 20 29 0d | 0a 09 09 09 72 65 74 75 | None ).|....retu|
|000009f0| 72 6e 3b 0d 0a 09 09 44 | 69 73 74 20 3d 20 76 73 |rn;....D|ist = vs|
|00000a00| 69 7a 65 28 48 69 74 4c | 6f 63 61 74 69 6f 6e 20 |ize(HitL|ocation |
|00000a10| 2d 20 50 61 77 6e 2e 4c | 6f 63 61 74 69 6f 6e 29 |- Pawn.L|ocation)|
|00000a20| 3b 0d 0a 09 09 69 66 20 | 28 20 44 69 73 74 20 3e |;....if |( Dist >|
|00000a30| 20 42 65 73 74 44 69 73 | 74 20 29 0d 0a 09 09 7b | BestDis|t )....{|
|00000a40| 0d 0a 09 09 09 42 65 73 | 74 44 69 73 74 20 3d 20 |.....Bes|tDist = |
|00000a50| 44 69 73 74 3b 0d 0a 09 | 09 09 50 69 63 6b 20 3d |Dist;...|..Pick =|
|00000a60| 20 44 65 73 69 72 65 64 | 52 6f 74 61 74 69 6f 6e | Desired|Rotation|
|00000a70| 3b 0d 0a 09 09 7d 0d 0a | 0d 0a 09 09 44 65 73 69 |;....}..|....Desi|
|00000a80| 72 65 64 52 6f 74 61 74 | 69 6f 6e 2e 50 69 74 63 |redRotat|ion.Pitc|
|00000a90| 68 20 2b 3d 20 33 32 37 | 36 38 3b 0d 0a 09 09 44 |h += 327|68;....D|
|00000aa0| 69 72 20 3d 20 76 65 63 | 74 6f 72 28 44 65 73 69 |ir = vec|tor(Desi|
|00000ab0| 72 65 64 52 6f 74 61 74 | 69 6f 6e 29 3b 0d 0a 09 |redRotat|ion);...|
|00000ac0| 09 2f 2f 20 63 68 65 63 | 6b 20 6e 65 77 20 70 69 |.// chec|k new pi|
|00000ad0| 74 63 68 20 6e 6f 74 20 | 61 20 62 6c 6f 63 6b 65 |tch not |a blocke|
|00000ae0| 64 20 64 69 72 65 63 74 | 69 6f 6e 0d 0a 09 09 48 |d direct|ion....H|
|00000af0| 69 74 41 63 74 6f 72 20 | 3d 20 54 72 61 63 65 28 |itActor |= Trace(|
|00000b00| 48 69 74 4c 6f 63 61 74 | 69 6f 6e 2c 48 69 74 4e |HitLocat|ion,HitN|
|00000b10| 6f 72 6d 61 6c 2c 50 61 | 77 6e 2e 4c 6f 63 61 74 |ormal,Pa|wn.Locat|
|00000b20| 69 6f 6e 20 2b 20 32 30 | 30 30 20 2a 20 44 69 72 |ion + 20|00 * Dir|
|00000b30| 2c 50 61 77 6e 2e 4c 6f | 63 61 74 69 6f 6e 2c 66 |,Pawn.Lo|cation,f|
|00000b40| 61 6c 73 65 29 3b 0d 0a | 09 09 69 66 20 28 20 48 |alse);..|..if ( H|
|00000b50| 69 74 41 63 74 6f 72 20 | 3d 3d 20 4e 6f 6e 65 20 |itActor |== None |
|00000b60| 29 0d 0a 09 09 09 72 65 | 74 75 72 6e 3b 0d 0a 09 |).....re|turn;...|
|00000b70| 09 44 69 73 74 20 3d 20 | 76 73 69 7a 65 28 48 69 |.Dist = |vsize(Hi|
|00000b80| 74 4c 6f 63 61 74 69 6f | 6e 20 2d 20 50 61 77 6e |tLocatio|n - Pawn|
|00000b90| 2e 4c 6f 63 61 74 69 6f | 6e 29 3b 0d 0a 09 09 69 |.Locatio|n);....i|
|00000ba0| 66 20 28 20 44 69 73 74 | 20 3e 20 42 65 73 74 44 |f ( Dist| > BestD|
|00000bb0| 69 73 74 20 29 0d 0a 09 | 09 7b 0d 0a 09 09 09 42 |ist )...|.{.....B|
|00000bc0| 65 73 74 44 69 73 74 20 | 3d 20 44 69 73 74 3b 0d |estDist |= Dist;.|
|00000bd0| 0a 09 09 09 50 69 63 6b | 20 3d 20 44 65 73 69 72 |....Pick| = Desir|
|00000be0| 65 64 52 6f 74 61 74 69 | 6f 6e 3b 0d 0a 09 09 7d |edRotati|on;....}|
|00000bf0| 0d 0a 09 09 0d 0a 09 09 | 44 65 73 69 72 65 64 52 |........|DesiredR|
|00000c00| 6f 74 61 74 69 6f 6e 20 | 3d 20 50 69 63 6b 3b 0d |otation |= Pick;.|
|00000c10| 0a 09 7d 09 0d 0a 0d 0a | 09 66 75 6e 63 74 69 6f |..}.....|.functio|
|00000c20| 6e 20 42 65 67 69 6e 53 | 74 61 74 65 28 29 0d 0a |n BeginS|tate()..|
|00000c30| 09 7b 0d 0a 09 09 45 6e | 65 6d 79 20 3d 20 4e 6f |.{....En|emy = No|
|00000c40| 6e 65 3b 0d 0a 09 09 46 | 6f 63 75 73 20 3d 20 4e |ne;....F|ocus = N|
|00000c50| 6f 6e 65 3b 0d 0a 09 09 | 53 74 6f 70 46 69 72 69 |one;....|StopFiri|
|00000c60| 6e 67 28 29 3b 0d 0a 09 | 7d 0d 0a 09 0d 0a 42 65 |ng();...|}.....Be|
|00000c70| 67 69 6e 3a 0d 0a 09 53 | 63 61 6e 52 6f 74 61 74 |gin:...S|canRotat|
|00000c80| 69 6f 6e 28 29 3b 09 0d | 0a 09 46 6f 63 61 6c 50 |ion();..|..FocalP|
|00000c90| 6f 69 6e 74 20 3d 20 50 | 61 77 6e 2e 4c 6f 63 61 |oint = P|awn.Loca|
|00000ca0| 74 69 6f 6e 20 2b 20 31 | 30 30 30 20 2a 20 76 65 |tion + 1|000 * ve|
|00000cb0| 63 74 6f 72 28 44 65 73 | 69 72 65 64 52 6f 74 61 |ctor(Des|iredRota|
|00000cc0| 74 69 6f 6e 29 3b 0d 0a | 09 53 6c 65 65 70 28 32 |tion);..|.Sleep(2|
|00000cd0| 20 2b 20 33 2a 46 52 61 | 6e 64 28 29 29 3b 0d 0a | + 3*FRa|nd());..|
|00000ce0| 09 47 6f 74 6f 28 27 42 | 65 67 69 6e 27 29 3b 0d |.Goto('B|egin');.|
|00000cf0| 0a 7d 0d 0a 0d 0a 0d 0a | 73 74 61 74 65 20 45 6e |.}......|state En|
|00000d00| 67 61 67 65 64 0d 0a 7b | 0d 0a 09 66 75 6e 63 74 |gaged..{|...funct|
|00000d10| 69 6f 6e 20 45 6e 65 6d | 79 4e 6f 74 56 69 73 69 |ion Enem|yNotVisi|
|00000d20| 62 6c 65 28 29 0d 0a 09 | 7b 0d 0a 09 09 69 66 20 |ble()...|{....if |
|00000d30| 28 20 49 73 54 61 72 67 | 65 74 52 65 6c 65 76 61 |( IsTarg|etReleva|
|00000d40| 6e 74 28 20 45 6e 65 6d | 79 20 29 20 29 0d 0a 09 |nt( Enem|y ) )...|
|00000d50| 09 7b 0d 0a 09 09 09 46 | 6f 63 75 73 20 3d 20 4e |.{.....F|ocus = N|
|00000d60| 6f 6e 65 3b 0d 0a 09 09 | 09 46 6f 63 61 6c 50 6f |one;....|.FocalPo|
|00000d70| 69 6e 74 20 3d 20 4c 61 | 73 74 53 65 65 6e 50 6f |int = La|stSeenPo|
|00000d80| 73 3b 0d 0a 09 09 09 47 | 6f 74 6f 53 74 61 74 65 |s;.....G|otoState|
|00000d90| 28 27 57 61 69 74 46 6f | 72 54 61 72 67 65 74 27 |('WaitFo|rTarget'|
|00000da0| 29 3b 0d 0a 09 09 09 72 | 65 74 75 72 6e 3b 0d 0a |);.....r|eturn;..|
|00000db0| 09 09 7d 0d 0a 09 09 47 | 6f 74 6f 53 74 61 74 65 |..}....G|otoState|
|00000dc0| 28 27 53 65 61 72 63 68 | 69 6e 67 27 29 3b 0d 0a |('Search|ing');..|
|00000dd0| 09 7d 0d 0a 0d 0a 09 66 | 75 6e 63 74 69 6f 6e 20 |.}.....f|unction |
|00000de0| 42 65 67 69 6e 53 74 61 | 74 65 28 29 0d 0a 09 7b |BeginSta|te()...{|
|00000df0| 0d 0a 09 09 46 6f 63 75 | 73 20 3d 20 45 6e 65 6d |....Focu|s = Enem|
|00000e00| 79 2e 47 65 74 41 69 6d | 54 61 72 67 65 74 28 29 |y.GetAim|Target()|
|00000e10| 3b 0d 0a 09 09 54 61 72 | 67 65 74 20 3d 20 45 6e |;....Tar|get = En|
|00000e20| 65 6d 79 3b 0d 0a 09 09 | 62 46 69 72 65 20 3d 20 |emy;....|bFire = |
|00000e30| 31 3b 0d 0a 09 09 69 66 | 20 28 20 50 61 77 6e 2e |1;....if| ( Pawn.|
|00000e40| 57 65 61 70 6f 6e 20 21 | 3d 20 4e 6f 6e 65 20 29 |Weapon !|= None )|
|00000e50| 09 0d 0a 09 09 09 50 61 | 77 6e 2e 57 65 61 70 6f |......Pa|wn.Weapo|
|00000e60| 6e 2e 42 6f 74 46 69 72 | 65 28 66 61 6c 73 65 29 |n.BotFir|e(false)|
|00000e70| 3b 0d 0a 09 7d 0d 0a 09 | 0d 0a 42 65 67 69 6e 3a |;...}...|..Begin:|
|00000e80| 0d 0a 09 53 6c 65 65 70 | 28 31 2e 30 29 3b 0d 0a |...Sleep|(1.0);..|
|00000e90| 09 69 66 20 28 20 21 49 | 73 54 61 72 67 65 74 52 |.if ( !I|sTargetR|
|00000ea0| 65 6c 65 76 61 6e 74 28 | 20 45 6e 65 6d 79 20 29 |elevant(| Enemy )|
|00000eb0| 20 7c 7c 20 21 49 73 54 | 75 72 72 65 74 46 69 72 | || !IsT|urretFir|
|00000ec0| 69 6e 67 28 29 20 29 0d | 0a 09 09 47 6f 74 6f 53 |ing() ).|...GotoS|
|00000ed0| 74 61 74 65 28 27 53 65 | 61 72 63 68 69 6e 67 27 |tate('Se|arching'|
|00000ee0| 29 3b 0d 0a 09 47 6f 74 | 6f 28 27 42 65 67 69 6e |);...Got|o('Begin|
|00000ef0| 27 29 3b 0d 0a 7d 0d 0a | 0d 0a 53 74 61 74 65 20 |');..}..|..State |
|00000f00| 57 61 69 74 46 6f 72 54 | 61 72 67 65 74 0d 0a 7b |WaitForT|arget..{|
|00000f10| 0d 0a 09 65 76 65 6e 74 | 20 53 65 65 50 6c 61 79 |...event| SeePlay|
|00000f20| 65 72 28 50 61 77 6e 20 | 53 65 65 6e 50 6c 61 79 |er(Pawn |SeenPlay|
|00000f30| 65 72 29 0d 0a 09 7b 0d | 0a 09 09 69 66 20 28 20 |er)...{.|...if ( |
|00000f40| 49 73 54 61 72 67 65 74 | 52 65 6c 65 76 61 6e 74 |IsTarget|Relevant|
|00000f50| 28 20 53 65 65 6e 50 6c | 61 79 65 72 20 29 20 29 |( SeenPl|ayer ) )|
|00000f60| 0d 0a 09 09 7b 0d 0a 09 | 09 09 45 6e 65 6d 79 20 |....{...|..Enemy |
|00000f70| 3d 20 53 65 65 6e 50 6c | 61 79 65 72 3b 0d 0a 09 |= SeenPl|ayer;...|
|00000f80| 09 09 47 6f 74 6f 53 74 | 61 74 65 28 27 45 6e 67 |..GotoSt|ate('Eng|
|00000f90| 61 67 65 64 27 29 3b 0d | 0a 09 09 7d 09 0d 0a 09 |aged');.|...}....|
|00000fa0| 7d 0d 0a 0d 0a 09 66 75 | 6e 63 74 69 6f 6e 20 42 |}.....fu|nction B|
|00000fb0| 65 67 69 6e 53 74 61 74 | 65 28 29 0d 0a 09 7b 0d |eginStat|e()...{.|
|00000fc0| 0a 09 09 54 61 72 67 65 | 74 20 3d 20 45 6e 65 6d |...Targe|t = Enem|
|00000fd0| 79 3b 0d 0a 09 09 62 46 | 69 72 65 20 3d 20 31 3b |y;....bF|ire = 1;|
|00000fe0| 0d 0a 09 09 69 66 20 28 | 20 50 61 77 6e 2e 57 65 |....if (| Pawn.We|
|00000ff0| 61 70 6f 6e 20 21 3d 20 | 4e 6f 6e 65 20 29 09 0d |apon != |None )..|
|00001000| 0a 09 09 09 50 61 77 6e | 2e 57 65 61 70 6f 6e 2e |....Pawn|.Weapon.|
|00001010| 42 6f 74 46 69 72 65 28 | 66 61 6c 73 65 29 3b 0d |BotFire(|false);.|
|00001020| 0a 09 7d 0d 0a 0d 0a 42 | 65 67 69 6e 3a 0d 0a 09 |..}....B|egin:...|
|00001030| 53 6c 65 65 70 28 20 47 | 65 74 57 61 69 74 46 6f |Sleep( G|etWaitFo|
|00001040| 72 54 61 72 67 65 74 54 | 69 6d 65 28 29 20 29 3b |rTargetT|ime() );|
|00001050| 0d 0a 09 47 6f 74 6f 53 | 74 61 74 65 28 27 53 65 |...GotoS|tate('Se|
|00001060| 61 72 63 68 69 6e 67 27 | 29 3b 20 0d 0a 7d 0d 0a |arching'|); ..}..|
|00001070| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 66 6c 6f 61 74 |..functi|on float|
|00001080| 20 47 65 74 57 61 69 74 | 46 6f 72 54 61 72 67 65 | GetWait|ForTarge|
|00001090| 74 54 69 6d 65 28 29 0d | 0a 7b 0d 0a 09 72 65 74 |tTime().|.{...ret|
|000010a0| 75 72 6e 20 28 33 20 2b | 20 35 20 2a 20 46 52 61 |urn (3 +| 5 * FRa|
|000010b0| 6e 64 28 29 29 3b 0d 0a | 7d 0d 0a 0d 0a 00 |nd());..|}..... |
+--------+-------------------------+-------------------------+--------+--------+