storm-engine icon indicating copy to clipboard operation
storm-engine copied to clipboard

Ship icon instead of Sea on world map

Open LipsarJ opened this issue 2 years ago • 0 comments

Hello. I noticed, that in original COAS code textures for World Map Actions are confused. Exit to ship has sea icon's number and Exit to sea has ship icon's number. And I have bug on latest engine version. I always see Ship icon on world map instead of Sea icon. I tested it alot, and by logging WM_UpdateCurrentAction method I find that when we see sea icon, game logs out 1 in string sti(worldMap.encounter_type), but 1 means ShipEnc. And I find 3 ways to fix it: first one is changing 235 and 223 strings in file wdm_player_ship.cpp. I've replaced -1 by 0. The second one is adding Log_info in WM_UpdateCurrentAction method. And the last one is adding Log_info in WM_SetPossibleCommands method and pressing Enter once I on world map. Also, I find doubtful code in BI_MSG_REFRESH: if (m_pShipIcon) m_pShipIcon->SetUpdate(); It seems like bad way to fix Ship icon on world map.

To Reproduce Just change icons number to normal in WM_InitializeCommands method. Normal numeration u can see in /Textures/BATTLE_INTERFACE/WorldMapCommands.tga.tx.

Expected behavior Fix this problem by replacing -1 by 0 in engine scripts that I described. Also game developers should change texture numbers in scripts. Ship is 4 12 and Sea is 1 9. Screenshots https://drive.google.com/file/d/1V-2snzaKKnyuelkuzuybK9Gd9m-Ee0QT/view?usp=sharing https://drive.google.com/file/d/1UOjUk0rjMJzwLFDfBRg_axS7b4-3asUW/view?usp=sharing

LipsarJ avatar Jan 08 '22 17:01 LipsarJ