diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 3d8b2e9d11e0fbc8ae5540ef1de1b187d24cc50a..5f3f99a2565ec8ec56a67399680ed9ac866071df 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
x, y: Integer;
end;
x, y: Integer;
end;
+ TBinHeapKeyHitTime = class
+ public
+ class function less (const a, b: Integer): Boolean; inline;
+ end;
+
// indicies in `wgunHitTime` array
// indicies in `wgunHitTime` array
- TBinaryHeapHitTimes = specialize TBinaryHeapBase<Integer>;
+ TBinaryHeapHitTimes = specialize TBinaryHeapBase<Integer, TBinHeapKeyHitTime>;
var
WaterMap: array of array of DWORD = nil;
var
WaterMap: array of array of DWORD = nil;
wgunHitTimeUsed: Integer = 0;
wgunHitTimeUsed: Integer = 0;
-function hitTimeLess (a, b: Integer): Boolean;
+class function TBinHeapKeyHitTime.less (const a, b: Integer): Boolean;
var
hta, htb: PHitTime;
begin
var
hta, htb: PHitTime;
begin
g_Texture_CreateWADEx('TEXTURE_SHELL_SHELL', GameWAD+':TEXTURES\ESHELL');
//wgunMonHash := hashNewIntInt();
g_Texture_CreateWADEx('TEXTURE_SHELL_SHELL', GameWAD+':TEXTURES\ESHELL');
//wgunMonHash := hashNewIntInt();
- wgunHitHeap := TBinaryHeapHitTimes.Create(hitTimeLess);
+ wgunHitHeap := TBinaryHeapHitTimes.Create();
end;
procedure g_Weapon_FreeData();
end;
procedure g_Weapon_FreeData();