diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 9167af7bd3a34d88085e7006fc671d0d9ac12ec7..18a5696d9383a46c13361eef99112e5ae16fee06 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
MaxLength := 3;
end;
MaxLength := 3;
end;
- with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_ALLMAP], BoolNames[Data.ShotAllMap], True)] do
+ case Data.ShotAim of
+ 1: str := _lc[I_PROP_TR_SHOT_AIM_1];
+ 2: str := _lc[I_PROP_TR_SHOT_AIM_2];
+ 3: str := _lc[I_PROP_TR_SHOT_AIM_3];
+ else str := _lc[I_PROP_TR_SHOT_AIM_0];
+ end;
+ with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_AIM], str, True)-1] do
begin
EditStyle := esPickList;
ReadOnly := True;
begin
EditStyle := esPickList;
ReadOnly := True;
var
x, y: Integer;
a, b: Integer;
var
x, y: Integer;
a, b: Integer;
- ID: DWORD;
+ ID, PID: DWORD;
Width, Height: Word;
Rect: TRectWH;
ObjCount: Word;
Width, Height: Word;
Rect: TRectWH;
ObjCount: Word;
if not g_GetTexture(SelectedTexture(), ID) then
g_GetTexture('NOTEXTURE', ID);
g_GetTextureSizeByID(ID, Width, Height);
if not g_GetTexture(SelectedTexture(), ID) then
g_GetTexture('NOTEXTURE', ID);
g_GetTextureSizeByID(ID, Width, Height);
- e_DrawFillQuad(RenderPanel.Width-Width-2, RenderPanel.Height-Height-2,
- RenderPanel.Width-1, RenderPanel.Height-1,
- GetRValue(PreviewColor), GetGValue(PreviewColor), GetBValue(PreviewColor), 0);
- e_Draw(ID, RenderPanel.Width-Width-1, RenderPanel.Height-Height-1, 0, True, False);
+ if g_GetTexture('PREVIEW', PID) then
+ e_DrawFill(PID, RenderPanel.Width-Width, RenderPanel.Height-Height, Width div 16 + 1, Height div 16 + 1, 0, True, False);
+ e_Draw(ID, RenderPanel.Width-Width, RenderPanel.Height-Height, 0, True, False);
end;
// Подсказка при выборе точки Телепорта:
end;
// Подсказка при выборе точки Телепорта:
trigger.Data.ShotPanelID := -1;
trigger.Data.ShotTarget := 0;
trigger.Data.ShotIntSight := 0;
trigger.Data.ShotPanelID := -1;
trigger.Data.ShotTarget := 0;
trigger.Data.ShotIntSight := 0;
- trigger.Data.ShotAllMap := False;
+ trigger.Data.ShotAim := TRIGGER_SHOT_AIM_DEFAULT;
trigger.Data.ShotPos.X := trigger.X-64;
trigger.Data.ShotPos.Y := trigger.Y-64;
trigger.Data.ShotAngle := 0;
trigger.Data.ShotPos.X := trigger.X-64;
trigger.Data.ShotPos.Y := trigger.Y-64;
trigger.Data.ShotAngle := 0;
Values.Add(_lc[I_PROP_TR_SHOT_TO_5]);
Values.Add(_lc[I_PROP_TR_SHOT_TO_6]);
end
Values.Add(_lc[I_PROP_TR_SHOT_TO_5]);
Values.Add(_lc[I_PROP_TR_SHOT_TO_6]);
end
+ else if KeyName = _lc[I_PROP_TR_SHOT_AIM] then
+ begin
+ Values.Add(_lc[I_PROP_TR_SHOT_AIM_0]);
+ Values.Add(_lc[I_PROP_TR_SHOT_AIM_1]);
+ Values.Add(_lc[I_PROP_TR_SHOT_AIM_2]);
+ Values.Add(_lc[I_PROP_TR_SHOT_AIM_3]);
+ end
else if (KeyName = _lc[I_PROP_PANEL_BLEND]) or
(KeyName = _lc[I_PROP_DM_ONLY]) or
(KeyName = _lc[I_PROP_ITEM_FALLS]) or
else if (KeyName = _lc[I_PROP_PANEL_BLEND]) or
(KeyName = _lc[I_PROP_DM_ONLY]) or
(KeyName = _lc[I_PROP_ITEM_FALLS]) or
(KeyName = _lc[I_PROP_TR_SCORE_CON]) or
(KeyName = _lc[I_PROP_TR_SCORE_MSG]) or
(KeyName = _lc[I_PROP_TR_HEALTH_MAX]) or
(KeyName = _lc[I_PROP_TR_SCORE_CON]) or
(KeyName = _lc[I_PROP_TR_SCORE_MSG]) or
(KeyName = _lc[I_PROP_TR_HEALTH_MAX]) or
- (KeyName = _lc[I_PROP_TR_SHOT_ALLMAP]) or
(KeyName = _lc[I_PROP_TR_SHOT_SOUND]) or
(KeyName = _lc[I_PROP_TR_EFFECT_CENTER]) then
begin
(KeyName = _lc[I_PROP_TR_SHOT_SOUND]) or
(KeyName = _lc[I_PROP_TR_EFFECT_CENTER]) then
begin
Data.ShotTarget := 6;
Data.ShotIntSight := Min(Max(
StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_SIGHT]], 0), 0), 65535);
Data.ShotTarget := 6;
Data.ShotIntSight := Min(Max(
StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_SIGHT]], 0), 0), 65535);
- Data.ShotAllMap := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_ALLMAP]]);
+ Data.ShotAim := 0;
+ if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_AIM]] = _lc[I_PROP_TR_SHOT_AIM_1] then
+ Data.ShotAim := 1
+ else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_AIM]] = _lc[I_PROP_TR_SHOT_AIM_2] then
+ Data.ShotAim := 2
+ else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_AIM]] = _lc[I_PROP_TR_SHOT_AIM_3] then
+ Data.ShotAim := 3;
Data.ShotAngle := Min(
StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_ANGLE]], 0), 360);
Data.ShotWait := Min(Max(
Data.ShotAngle := Min(
StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_ANGLE]], 0), 360);
Data.ShotWait := Min(Max(