equal
deleted
inserted
replaced
37 procedure IPCCheckSock; |
37 procedure IPCCheckSock; |
38 procedure NetGetNextCmd; |
38 procedure NetGetNextCmd; |
39 procedure doPut(putX, putY: LongInt; fromAI: boolean); |
39 procedure doPut(putX, putY: LongInt; fromAI: boolean); |
40 |
40 |
41 implementation |
41 implementation |
42 uses uConsole, uConsts, uVariables, uCommands, uUtils, uDebug, uLocale; |
42 uses uConsole, uConsts, uVariables, uCommands, uUtils, uDebug, uLocale, uSound; |
43 |
43 |
44 const |
44 const |
45 cSendEmptyPacketTime = 1000; |
45 cSendEmptyPacketTime = 1000; |
46 cSendBufferSize = 1024; |
46 cSendBufferSize = 1024; |
47 |
47 |
510 end; |
510 end; |
511 |
511 |
512 with CurrentHedgehog^.Gear^, |
512 with CurrentHedgehog^.Gear^, |
513 CurrentHedgehog^ do |
513 CurrentHedgehog^ do |
514 if (State and gstChooseTarget) <> 0 then |
514 if (State and gstChooseTarget) <> 0 then |
|
515 if ((((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackInMove) <> 0) or ((State and gstMoving) = 0)) or ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) = 0)) then |
515 begin |
516 begin |
516 if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoTargetAfter) <> 0 then |
517 if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoTargetAfter) <> 0 then |
517 isCursorVisible:= false; |
518 isCursorVisible:= false; |
518 if not CurrentTeam^.ExtDriven then |
519 if not CurrentTeam^.ExtDriven then |
519 begin |
520 begin |
541 AddFileLog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y)); |
542 AddFileLog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y)); |
542 State:= State and (not gstChooseTarget); |
543 State:= State and (not gstChooseTarget); |
543 if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then |
544 if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then |
544 Message:= Message or (gmAttack and InputMask); |
545 Message:= Message or (gmAttack and InputMask); |
545 end |
546 end |
|
547 else |
|
548 PlaySound(sndDenied) |
546 else |
549 else |
547 if CurrentTeam^.ExtDriven then |
550 if CurrentTeam^.ExtDriven then |
548 OutError('Got /put while not being in choose target mode', false) |
551 OutError('Got /put while not being in choose target mode', false) |
549 end; |
552 end; |
550 |
553 |