From: Challenge9 Date: Tue, 25 Apr 2023 20:55:53 +0000 (+0300) Subject: Fix model override option not changing bots' models X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=da8df84535336b0d9b582c36638cce7475372553;p=d2df-sdl.git Fix model override option not changing bots' models --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 92e2902..a7afb5c 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -857,6 +857,8 @@ begin gPlayers[a].FActualModelName := ModelName; gPlayers[a].SetModel(ModelName); + if Bot and (g_Force_Model_Get() <> 0) then + gPlayers[a].SetModel(g_Forced_Model_GetName()); // Íåò ìîäåëè - ñîçäàíèå íå âîçìîæíî: if gPlayers[a].FModel = nil then @@ -925,7 +927,11 @@ begin // create entity and load state if Bot then - gPlayers[a] := TBot.Create() + begin + gPlayers[a] := TBot.Create(); + if (g_Force_Model_Get() <> 0) then + gPlayers[a].SetModel(g_Forced_Model_GetName()); + end else gPlayers[a] := TPlayer.Create(); gPlayers[a].FPhysics := True; // ???