ttyborg / castlesand

Automatically exported from code.google.com/p/castlesand
0 stars 0 forks source link

Patch for /trunk/src/units/KM_UnitGroups.pas #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!
After some more research, I think that properly preventing the Actions.UnitKill 
bug I reported earlier would be more difficult than just doing this edit.

This seems to correctly fix the bug.

-Esthlos

Original issue reported on code.google.com by Paperini...@gmail.com on 1 Feb 2015 at 12:22

Attachments:

GoogleCodeExporter commented 9 years ago
Except I just found one more case in which it doesn't. -.-"

Original comment by Paperini...@gmail.com on 1 Feb 2015 at 12:26

GoogleCodeExporter commented 9 years ago
Ok, this seems to work in that case too:

  if SomeoneHungry then
    begin
      if Members[I].IsDeadOrDying then
      begin
        fMembers.Delete(I);
        UnitsPerRow := fUnitsPerRow;
        UpdateHungerMessage;
        Exit;
      end else Break;
    end; 

Original comment by Paperini...@gmail.com on 1 Feb 2015 at 12:36