diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index c1bdcf1769f3e7d437e0683d6aa9168762ee589a..c83a8fa0d78e9577085fecbd707d82750bf45606 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
implementation
uses
implementation
uses
- g_gui, g_textures, r_graphics, g_game, g_map,
+ g_gui, r_textures, r_graphics, g_game, g_map,
g_base, g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPDEF, Math, g_saveload,
g_base, g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPDEF, Math, g_saveload,
TEAM_RED, TEAM_BLUE);
with TGUIModelView(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mvP1Model')) do
begin
TEAM_RED, TEAM_BLUE);
with TGUIModelView(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mvP1Model')) do
begin
- gPlayer1Settings.Model := Model.Name;
+ gPlayer1Settings.Model := Model.GetName();
gPlayer1Settings.Color := Model.Color;
end;
gPlayer1Settings.Color := Model.Color;
end;
TEAM_RED, TEAM_BLUE);
with TGUIModelView(g_GUI_GetWindow('OptionsPlayersP2Menu').GetControl('mvP2Model')) do
begin
TEAM_RED, TEAM_BLUE);
with TGUIModelView(g_GUI_GetWindow('OptionsPlayersP2Menu').GetControl('mvP2Model')) do
begin
- gPlayer2Settings.Model := Model.Name;
+ gPlayer2Settings.Model := Model.GetName();
gPlayer2Settings.Color := Model.Color;
end;
gPlayer2Settings.Color := Model.Color;
end;
procedure ProcOptionsPlayersMIMenu();
var
s, a: string;
procedure ProcOptionsPlayersMIMenu();
var
s, a: string;
- b: TModelInfo;
+ i: Integer;
begin
if g_ActiveWindow.Name = 'OptionsPlayersP1Menu' then s := 'P1' else s := 'P2';
begin
if g_ActiveWindow.Name = 'OptionsPlayersP1Menu' then s := 'P1' else s := 'P2';
if a = '' then Exit;
if a = '' then Exit;
- b := g_PlayerModel_GetInfo(a);
-
+ i := g_PlayerModel_GetIndex(a);
with TGUIMenu(g_GUI_GetWindow('OptionsPlayersMIMenu').GetControl('mOptionsPlayersMIMenu')) do
begin
with TGUIMenu(g_GUI_GetWindow('OptionsPlayersMIMenu').GetControl('mOptionsPlayersMIMenu')) do
begin
- TGUILabel(GetControl('lbName')).Text := b.Name;
- TGUILabel(GetControl('lbAuthor')).Text := b.Author;
- TGUIMemo(GetControl('meComment')).SetText(b.Description);
+ TGUILabel(GetControl('lbName')).Text := PlayerModelsArray[i].Name;
+ TGUILabel(GetControl('lbAuthor')).Text := PlayerModelsArray[i].Author;
+ TGUIMemo(GetControl('meComment')).SetText(PlayerModelsArray[i].Description);
- if b.HaveWeapon then
+ if PlayerModelsArray[i].HaveWeapon then
TGUILabel(GetControl('lbWeapon')).Text := _lc[I_MENU_YES]
else
TGUILabel(GetControl('lbWeapon')).Text := _lc[I_MENU_NO];
TGUILabel(GetControl('lbWeapon')).Text := _lc[I_MENU_YES]
else
TGUILabel(GetControl('lbWeapon')).Text := _lc[I_MENU_NO];
with TGUIModelView(g_ActiveWindow.GetControl('mv'+s+'Model')) do
begin
NextAnim();
with TGUIModelView(g_ActiveWindow.GetControl('mv'+s+'Model')) do
begin
NextAnim();
- Model.GetCurrentAnimation.Loop := True;
- Model.GetCurrentAnimationMask.Loop := True;
+ Model.AnimState.Loop := True;
end;
end;
end;
end;