X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_weapons.pas;h=5f3f99a2565ec8ec56a67399680ed9ac866071df;hb=67023422af537f9f22a2ac11a1b4845c42c63bbc;hp=311b18cbc344dbb78b83a7ad0d4c3053a858c9d9;hpb=d7d166dc3cd287276202e862746208892c4cc89f;p=d2df-sdl.git diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index 311b18c..5f3f99a 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -118,7 +118,7 @@ uses g_console, g_options, g_game, g_triggers, MAPDEF, e_log, g_monsters, g_saveload, g_language, g_netmsg, g_grid, - binheap, hashtable, utils, xstreams; + geom, binheap, hashtable, utils, xstreams; type TWaterPanel = record @@ -157,8 +157,13 @@ type x, y: Integer; end; + TBinHeapKeyHitTime = class + public + class function less (const a, b: Integer): Boolean; inline; + end; + // indicies in `wgunHitTime` array - TBinaryHeapHitTimes = specialize TBinaryHeapBase; + TBinaryHeapHitTimes = specialize TBinaryHeapBase; var WaterMap: array of array of DWORD = nil; @@ -168,7 +173,7 @@ var wgunHitTimeUsed: Integer = 0; -function hitTimeLess (a, b: Integer): Boolean; +class function TBinHeapKeyHitTime.less (const a, b: Integer): Boolean; var hta, htb: PHitTime; begin @@ -1155,7 +1160,7 @@ begin g_Texture_CreateWADEx('TEXTURE_SHELL_SHELL', GameWAD+':TEXTURES\ESHELL'); //wgunMonHash := hashNewIntInt(); - wgunHitHeap := TBinaryHeapHitTimes.Create(hitTimeLess); + wgunHitHeap := TBinaryHeapHitTimes.Create(); end; procedure g_Weapon_FreeData();