DEADSOFTWARE

uidmap for monsters, so we don't have to do linear searches
[d2df-sdl.git] / src / game / g_player.pas
index c1b7c087645cce6d7e413ff3237812e18e5a06ca..612a4fb0aee855f664ae797deb1113959ba59583 100644 (file)
@@ -3121,7 +3121,7 @@ begin
       end
     else if g_GetUIDType(SpawnerUID) = UID_MONSTER then
       begin // Óáèò ìîíñòðîì
-        mon := g_Monsters_Get(SpawnerUID);
+        mon := g_Monsters_ByUID(SpawnerUID);
         if mon = nil then
           s := '?'
         else
@@ -6393,7 +6393,7 @@ begin
         if (g_GetUIDType(Target.UID) = UID_MONSTER) and
             vsMonster then
           begin // Ìîíñòð
-            mon := g_Monsters_Get(Target.UID);
+            mon := g_Monsters_ByUID(Target.UID);
             if mon <> nil then
               begin
                 Target.X := mon.Obj.X;
@@ -6626,7 +6626,7 @@ begin
             end
           else
             begin // Öåëü - ìîíñòð
-              mon := g_Monsters_Get(Target.UID);
+              mon := g_Monsters_ByUID(Target.UID);
               if (mon = nil) or (not mon.Live) then
                 Target.UID := 0; // òî çàáûòü öåëü
             end;
@@ -7378,7 +7378,7 @@ begin
         if (g_GetUIDType(FLastSpawnerUID) = UID_MONSTER) and
            LongBool(gGameSettings.Options and GAME_OPTION_BOTVSMONSTER) then
         begin // Ìîíñòð
-          mon := g_Monsters_Get(FLastSpawnerUID);
+          mon := g_Monsters_ByUID(FLastSpawnerUID);
           ok := not TargetOnScreen(mon.Obj.X + mon.Obj.Rect.X,
                                    mon.Obj.Y + mon.Obj.Rect.Y);
         end;