Skip to content

Commit 02af79e

Browse files
committed
Fix map wnd for CS
1 parent 02fcc18 commit 02af79e

File tree

12 files changed

+64
-21
lines changed

12 files changed

+64
-21
lines changed

gamedata/configs/ixray_settings/default_controls.ltx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ bind_gamepad pda_tasks_filter_toggle cA
154154
bind_gamepad llookout cLB
155155
bind_gamepad rlookout cRB
156156
bind_gamepad wpn_zoom_inc cDPAD_UP
157-
bind_gamepad wpn_zoom_inc cDPAD_DOWN
157+
bind_gamepad wpn_zoom_dec cDPAD_DOWN

gamedata/configs/text/eng/ui_st_ixray.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,7 @@
669669
<string id="ui_tasks_filter_next">
670670
<text>$$ACTION_pda_tasks_filter_prev$$/$$ACTION_pda_tasks_filter_next$$ Spot filters</text>
671671
</string>
672+
<string id="ui_tasks_show_on_map_main">
673+
<text>$$ACTION_pda_tasks_filter_toggle$$ Show main task</text>
674+
</string>
672675
</string_table>

gamedata/configs/text/rus/ui_st_ixray.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,7 @@
669669
<string id="ui_tasks_filter_next">
670670
<text>$$ACTION_pda_tasks_filter_prev$$/$$ACTION_pda_tasks_filter_next$$ Ôèëüòð ìåòîê</text>
671671
</string>
672+
<string id="ui_tasks_show_on_map_main">
673+
<text>$$ACTION_pda_tasks_filter_toggle$$ Ïîêàçàòü ãëàâíîå çàäàíèå</text>
674+
</string>
672675
</string_table>

gamedata_cs/configs/ixray_settings/default_controls.ltx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ bind_gamepad pda_tasks_filter_toggle cA
154154
bind_gamepad llookout cLB
155155
bind_gamepad rlookout cRB
156156
bind_gamepad wpn_zoom_inc cDPAD_UP
157-
bind_gamepad wpn_zoom_inc cDPAD_DOWN
157+
bind_gamepad wpn_zoom_dec cDPAD_DOWN

gamedata_cs/configs/text/eng/ui_st_ixray.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,7 @@
669669
<string id="ui_tasks_filter_next">
670670
<text>$$ACTION_pda_tasks_filter_prev$$/$$ACTION_pda_tasks_filter_next$$ Spot filters</text>
671671
</string>
672+
<string id="ui_tasks_show_on_map_main">
673+
<text>$$ACTION_pda_tasks_filter_toggle$$ Show main task</text>
674+
</string>
672675
</string_table>

gamedata_cs/configs/text/rus/ui_st_ixray.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,7 @@
669669
<string id="ui_tasks_filter_next">
670670
<text>$$ACTION_pda_tasks_filter_prev$$/$$ACTION_pda_tasks_filter_next$$ Ôèëüòð ìåòîê</text>
671671
</string>
672+
<string id="ui_tasks_show_on_map_main">
673+
<text>$$ACTION_pda_tasks_filter_toggle$$ Ïîêàçàòü ãëàâíîå çàäàíèå</text>
674+
</string>
672675
</string_table>

gamedata_cs/scripts/_g.script

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -946,38 +946,53 @@ end
946946

947947

948948
-------------------------------------------------------------------------------------------
949+
function get_object_community(obj)
950+
if type(obj.id) == "function" then
951+
return character_community(obj)
952+
else
953+
return alife_character_community(obj)
954+
end
955+
end
956+
957+
function character_community (obj)
958+
if IsStalker(obj) then
959+
return obj:character_community()
960+
end
961+
return "monster"
962+
end
963+
964+
function alife_character_community (obj)
965+
if IsStalker(obj, obj:clsid()) then
966+
return obj:community()
967+
end
968+
return "monster"
969+
end
970+
971+
-- получить геймобжект по стори_айди.
949972
function level_object_by_sid( sid )
950973
local sim = alife()
951-
952974
if sim then
953975
local se_obj = sim:story_object( sid )
954976
if se_obj then
955977
return level.object_by_id( se_obj.id )
956978
end
957979
end
958-
959980
return nil
960981
end
961-
982+
-- Получить айдишник обьекта по стори айди.
962983
function id_by_sid( sid )
963984
local sim = alife()
964-
965985
if sim then
966986
local se_obj = sim:story_object( sid )
967987
if se_obj then
968988
return se_obj.id
969989
end
970990
end
971-
972991
return nil
973992
end
974993

975994
-- Крешнуть игру (после вывода сообщения об ошибке в лог)
976995
function abort(fmt, ...)
977-
local reason = string.format(fmt, ...)
978-
assert("ERROR: " .. reason)
979-
error_log("ERROR: " .. reason)
980-
log(string.format("%s",nil))
981996
end
982997

983998
function set_postprocess(name_ini_file)

gamedata_soc/configs/text/eng/ui_st_ixray.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,7 @@
669669
<string id="ui_tasks_filter_next">
670670
<text>$$ACTION_pda_tasks_filter_prev$$/$$ACTION_pda_tasks_filter_next$$ Spot filters</text>
671671
</string>
672+
<string id="ui_tasks_show_on_map_main">
673+
<text>$$ACTION_pda_tasks_filter_toggle$$ Show main task</text>
674+
</string>
672675
</string_table>

gamedata_soc/configs/text/rus/ui_st_ixray.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,7 @@
669669
<string id="ui_tasks_filter_next">
670670
<text>$$ACTION_pda_tasks_filter_prev$$/$$ACTION_pda_tasks_filter_next$$ Ôèëüòð ìåòîê</text>
671671
</string>
672+
<string id="ui_tasks_show_on_map_main">
673+
<text>$$ACTION_pda_tasks_filter_toggle$$ Ïîêàçàòü ãëàâíîå çàäàíèå</text>
674+
</string>
672675
</string_table>

src/xrGame/ui/UIMapWnd.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,9 @@ void CUIMapWnd::UpdateControllerCursor()
856856
{
857857
levelFrameParent = m_UIMainFrame;
858858
}
859-
cursorPos.add(levelFrameParent->GetWndPos());
860-
cursorPos.add(m_UILevelFrame->GetWndPos());
859+
Fvector2 absolutePos;
860+
m_UILevelFrame->GetAbsolutePos(absolutePos);
861+
cursorPos.add(absolutePos);
861862
cursorPos.add(Fvector2().set(m_controller_cursor->GetWidth() / 2, m_controller_cursor->GetHeight() / 2));
862863
GetUICursor().SetUICursorPosition(cursorPos);
863864
}

0 commit comments

Comments
 (0)