- Added more checks to statics loading and saving and replaced unnecessary LongInt casts

This commit is contained in:
2009-03-09 17:24:53 +01:00
parent 114c218ca6
commit 7e86c7400c
3 changed files with 383 additions and 384 deletions

View File

@@ -479,14 +479,14 @@ begin
FStaIdx.Position := ((AWorldBlock.X * FHeight) + AWorldBlock.Y) * 12;
index := TGenericIndex.Create(FStaIdx);
size := AWorldBlock.GetSize;
if (size > index.Size) or (index.Lookup = LongInt($FFFFFFFF)) then
if (size > index.Size) or (index.Lookup < 0) then
begin
FStatics.Position := FStatics.Size;
index.Lookup := FStatics.Position;
end;
index.Size := size;
if size = 0 then
index.Lookup := LongInt($FFFFFFFF)
index.Lookup := -1
else
begin
FStatics.Position := index.Lookup;

View File

@@ -1,12 +1,13 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<Version Value="6"/>
<Version Value="7"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
</General>
<VersionInfo>