View Issue Details

IDProjectCategoryView StatusLast Update
0005038The Dark ModCodingpublic07.12.2019 14:33
Reportergrayman Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.08Fixed in VersionTDM 2.08 
Summary0005038: 'M' key (cycle maps) not behaving
DescriptionThe 'M' key appears to be broken in SVN. It works fine in 2.07.

According to the rules at

http://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_Gameplay#Inventory_Objects:_Maps_and_Readables

the 'M' key should display a map if you have one and whether it's the currently shown inventory item or not.

The key should also cycle through maps in the inventory if more than one exist.
Steps To ReproduceTested with The Warrens. After picking up the map on the column near the Watch officers near the start of the mission, hitting the 'M' key doesn't display the map when it's not the current inventory item.

This works correctly in 2.07.
TagsNo tags attached.

Relationships

related to 0002993 resolvedSTiFU Removing an inventory item can invalidate cursor, resulting in crash 

Activities

stgatilov

stgatilov

06.12.2019 16:36

administrator   ~0011894

Last edited: 06.12.2019 17:02

It was broken by StiFU in this change:
  https://bugs.thedarkmod.com/view.php?id=2993#c11593

UPDATE: Well, not exactly sure about it. But it is the most likely culprit yet =)

stgatilov

stgatilov

07.12.2019 05:10

administrator   ~0011895

Better FM to test is "TP6: Lich Queen's Demise". It has three maps from the start.
stgatilov

stgatilov

07.12.2019 14:31

administrator   ~0011896

Fixed in svn rev 8442.

I made several attempts to fix the old code with CInventoryCursor, but none of them worked. StiFU assumed that dummy item is always present in any cycled list, but this is not true for maps. Moreover, if I add a dummy to maps, then I guess a second "blank item" will appear in the global cycling list. Without a dummy, the new CInventoryCursor works very in strange way, frequently dropping its category. All of this is overcomplicated: it is very hard to understand what the code with cursor would work.
At the end, I have converted m_MapCursor from CInventoryCursor to simple int. After that it was trivial to fix the problem.

Issue History

Date Modified Username Field Change
29.05.2019 17:00 grayman New Issue
06.12.2019 16:34 stgatilov Relationship added related to 0002993
06.12.2019 16:36 stgatilov Note Added: 0011894
06.12.2019 17:02 stgatilov Note Edited: 0011894
07.12.2019 05:10 stgatilov Note Added: 0011895
07.12.2019 14:31 stgatilov Note Added: 0011896
07.12.2019 14:33 stgatilov Assigned To => stgatilov
07.12.2019 14:33 stgatilov Status new => resolved
07.12.2019 14:33 stgatilov Resolution open => fixed
07.12.2019 14:33 stgatilov Fixed in Version => TDM 2.08