~ubuntu-branches/ubuntu/trusty/hedgewars/trusty-proposed

« back to all changes in this revision

Viewing changes to hedgewars/uTeams.pas

  • Committer: Package Import Robot
  • Author(s): Dmitry E. Oboukhov
  • Date: 2011-11-20 18:31:17 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20111120183117-pjhz1n2pvnmxa246
Tags: 0.9.17-1
* [Paul Wise]
 * Mention the homing bee in the package description (Closes: #577092)
 * Also install the hwengine desktop file (LP: #811770)
 * Depend on ttf-dejavu-core since it is smaller
 * Depend on ttf-wqy-zenhei instead of embedding a copy of it
* [Dmitry E. Oboukhov]
 * New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
427
427
with Team do
428
428
    for i:= 0 to cMaxHHIndex do
429
429
        with Hedgehogs[i] do
 
430
            begin
 
431
            if Hedgehogs[i].GearHidden <> nil then
 
432
                RestoreHog(@Hedgehogs[i]);
 
433
 
430
434
            if Gear <> nil then
431
435
                begin
432
436
                Gear^.Invulnerable:= false;
433
 
                Gear^.Damage:= Gear^.Health
 
437
                Gear^.Damage:= Gear^.Health;
 
438
                Gear^.State:= (Gear^.State or gstHHGone) and not gstHHDriven
434
439
                end
 
440
            end
435
441
end;
436
442
 
437
443
procedure chAddHH(var id: shortstring);
536
542
end;
537
543
 
538
544
 
 
545
procedure chFinish(var s:shortstring);
 
546
var t: LongInt;
 
547
begin
 
548
// avoid compiler hint
 
549
s:= s;
 
550
 
 
551
t:= 0;
 
552
while (t < cMaxTeams) and (TeamsArray[t] <> nil) do
 
553
    begin
 
554
    TeamsArray[t]^.hasGone:= true;
 
555
    inc(t);
 
556
    end;
 
557
 
 
558
AddChatString('** Good-bye!');
 
559
RecountAllTeamsHealth();
 
560
end;
 
561
 
539
562
procedure initModule;
540
563
begin
541
564
    RegisterVariable('addhh', vtCommand, @chAddHH, false);
543
566
    RegisterVariable('hhcoords', vtCommand, @chSetHHCoords, false);
544
567
    RegisterVariable('bind', vtCommand, @chBind, true );
545
568
    RegisterVariable('teamgone', vtCommand, @chTeamGone, true );
 
569
    RegisterVariable('finish', vtCommand, @chFinish, true ); // all teams gone
546
570
 
547
571
    CurrentTeam:= nil;
548
572
    PreviousTeam:= nil;