741 ParseCommand('/teamback s' + s, true); |
741 ParseCommand('/teamback s' + s, true); |
742 end; |
742 end; |
743 end; |
743 end; |
744 |
744 |
745 |
745 |
746 procedure chFinish(var s:shortstring); |
|
747 var t: LongInt; |
|
748 begin |
|
749 // avoid compiler hint |
|
750 s:= s; |
|
751 |
|
752 isPaused:= false; |
|
753 |
|
754 t:= 0; |
|
755 while t < TeamsCount do |
|
756 begin |
|
757 TeamsArray[t]^.hasGone:= true; |
|
758 inc(t) |
|
759 end; |
|
760 |
|
761 AddChatString(#7 + '* Good-bye!'); |
|
762 RecountAllTeamsHealth(); |
|
763 end; |
|
764 |
|
765 procedure SwitchCurrentHedgehog(newHog: PHedgehog); |
746 procedure SwitchCurrentHedgehog(newHog: PHedgehog); |
766 var oldCI, newCI: boolean; |
747 var oldCI, newCI: boolean; |
767 oldHH: PHedgehog; |
748 oldHH: PHedgehog; |
768 begin |
749 begin |
769 if (CurrentHedgehog <> nil) and (CurrentHedgehog^.CurAmmoType = amKnife) then |
750 if (CurrentHedgehog <> nil) and (CurrentHedgehog^.CurAmmoType = amKnife) then |
841 RegisterVariable('addteam', @chAddTeam, false); |
822 RegisterVariable('addteam', @chAddTeam, false); |
842 RegisterVariable('hhcoords', @chSetHHCoords, false); |
823 RegisterVariable('hhcoords', @chSetHHCoords, false); |
843 RegisterVariable('bind', @chBind, true ); |
824 RegisterVariable('bind', @chBind, true ); |
844 RegisterVariable('teamgone', @chTeamGone, true ); |
825 RegisterVariable('teamgone', @chTeamGone, true ); |
845 RegisterVariable('teamback', @chTeamBack, true ); |
826 RegisterVariable('teamback', @chTeamBack, true ); |
846 RegisterVariable('finish', @chFinish, true ); // all teams gone |
|
847 RegisterVariable('fort' , @chFort , false); |
827 RegisterVariable('fort' , @chFort , false); |
848 RegisterVariable('grave' , @chGrave , false); |
828 RegisterVariable('grave' , @chGrave , false); |
849 RegisterVariable('hat' , @chSetHat , false); |
829 RegisterVariable('hat' , @chSetHat , false); |
850 RegisterVariable('flag' , @chFlag , false); |
830 RegisterVariable('flag' , @chFlag , false); |
851 RegisterVariable('owner' , @chOwner , false); |
831 RegisterVariable('owner' , @chOwner , false); |