33 |
33 |
34 implementation |
34 implementation |
35 uses uConsts, uVariables, uFloat, uAmmos, uSound, uCaptions, |
35 uses uConsts, uVariables, uFloat, uAmmos, uSound, uCaptions, |
36 uCommands, uLocale, uUtils, uStats, uIO, uScript, |
36 uCommands, uLocale, uUtils, uStats, uIO, uScript, |
37 uGearsList, uCollisions, uRandom, uStore, uTeams, |
37 uGearsList, uCollisions, uRandom, uStore, uTeams, |
38 uGearsUtils, uVisualGearsList; |
38 uGearsUtils, uVisualGearsList, uChat; |
39 |
39 |
40 var GHStepTicks: LongWord = 0; |
40 var GHStepTicks: LongWord = 0; |
|
41 |
|
42 procedure AFKSkip; |
|
43 var |
|
44 t: byte; |
|
45 begin |
|
46 t:= 0; |
|
47 while (TeamsArray[t] <> CurrentTeam) do inc(t); |
|
48 |
|
49 SendHogSpeech(#1 + char(t) + 'AFK'); |
|
50 |
|
51 ParseCommand('/skip', true) |
|
52 end; |
41 |
53 |
42 // Shouldn't more of this ammo switching stuff be moved to uAmmos ? |
54 // Shouldn't more of this ammo switching stuff be moved to uAmmos ? |
43 function ChangeAmmo(HHGear: PGear): boolean; |
55 function ChangeAmmo(HHGear: PGear): boolean; |
44 var slot, i: Longword; |
56 var slot, i: Longword; |
45 ammoidx: LongInt; |
57 ammoidx: LongInt; |
1054 if HHGear^.Damage > 0 then |
1066 if HHGear^.Damage > 0 then |
1055 HHGear^.State:= HHGear^.State and (not (gstHHJumping or gstHHHJump)); |
1067 HHGear^.State:= HHGear^.State and (not (gstHHJumping or gstHHHJump)); |
1056 exit |
1068 exit |
1057 end; |
1069 end; |
1058 |
1070 |
|
1071 if isAFK and (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then |
|
1072 begin |
|
1073 AFKSkip; |
|
1074 exit |
|
1075 end; |
|
1076 |
1059 if (HHGear^.State and gstAnimation) <> 0 then |
1077 if (HHGear^.State and gstAnimation) <> 0 then |
1060 begin |
1078 begin |
1061 HHGear^.Message:= 0; |
1079 HHGear^.Message:= 0; |
1062 if (HHGear^.Pos = Wavez[TWave(HHGear^.Tag)].VoiceDelay) and (HHGear^.Timer = 0) then |
1080 if (HHGear^.Pos = Wavez[TWave(HHGear^.Tag)].VoiceDelay) and (HHGear^.Timer = 0) then |
1063 PlaySoundV(Wavez[TWave(HHGear^.Tag)].Voice, Hedgehog^.Team^.voicepack); |
1081 PlaySoundV(Wavez[TWave(HHGear^.Tag)].Voice, Hedgehog^.Team^.voicepack); |
1294 if (Gear^.Message and gmDestroy) <> 0 then |
1312 if (Gear^.Message and gmDestroy) <> 0 then |
1295 begin |
1313 begin |
1296 DeleteGear(Gear); |
1314 DeleteGear(Gear); |
1297 exit |
1315 exit |
1298 end; |
1316 end; |
1299 if GameTicks mod 100 = 0 then CheckIce(Gear); |
1317 if GameTicks mod 128 = 0 then CheckIce(Gear); |
1300 (* |
1318 (* |
1301 if Gear^.Hedgehog^.Effects[heFrozen] > 0 then |
1319 if Gear^.Hedgehog^.Effects[heFrozen] > 0 then |
1302 begin |
1320 begin |
1303 if (Gear^.Hedgehog^.Effects[heFrozen] > 256) and (CurrentHedgehog^.Team^.Clan <> Gear^.Hedgehog^.Team^.Clan) then |
1321 if (Gear^.Hedgehog^.Effects[heFrozen] > 256) and (CurrentHedgehog^.Team^.Clan <> Gear^.Hedgehog^.Team^.Clan) then |
1304 dec(Gear^.Hedgehog^.Effects[heFrozen]) |
1322 dec(Gear^.Hedgehog^.Effects[heFrozen]) |