From f888443ed02a65274bfb4e0f7d31a4ad3c2c1620 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 2 Oct 2009 18:18:59 +0200 Subject: [PATCH] - Changed TLandscape.FOpenRequests to use TBits instead of a boolean array --- Client/ULandscape.pas | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Client/ULandscape.pas b/Client/ULandscape.pas index b61368c..045b124 100644 --- a/Client/ULandscape.pas +++ b/Client/ULandscape.pas @@ -140,7 +140,7 @@ type FOnStaticDeleted: TStaticChangedEvent; FOnStaticElevated: TStaticChangedEvent; FOnStaticHued: TStaticChangedEvent; - FOpenRequests: array of Boolean; + FOpenRequests: TBits; { Methods } function GetMapBlock(AX, AY: Word): TMapBlock; function GetMapCell(AX, AY: Word): TMapCell; @@ -504,10 +504,9 @@ begin FOnStaticElevated := nil; FOnStaticHued := nil; FOnStaticInserted := nil; - - SetLength(FOpenRequests, FWidth * FHeight); //TODO : TBits? - for blockID := 0 to Length(FOpenRequests) - 1 do - FOpenRequests[blockID] := False; + + FOpenRequests := TBits.Create(FWidth * FHeight); + FOpenRequests.Clearall; RegisterPacketHandler($04, TPacketHandler.Create(0, @OnBlocksPacket)); RegisterPacketHandler($06, TPacketHandler.Create(8, @OnDrawMapPacket));