MiniMap Bug & Fix

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
leeor_net
Novice
Novice
Posts: 180
Joined: 03 Feb 2008, 10:17
Location: Ohio, USA
Contact:

MiniMap Bug & Fix

Post by leeor_net » 13 Apr 2008, 22:40

I noticed a bug in the Minimap while testing the SVN Client (0.1.0 trunk). I haven't noticed this being addressed in any of the SVN updates and the change to the code is so small I didn't think a patch would be necessary:

File: gui/minimap.cpp -- Line: 108 -- Function: void Minimap::draw(gcn::Graphics *graphics)

Code: Select all

            case Being::NPC:
                graphics->setColor( gcn::Color(255, 255, 0) );
                break;

            default:
                // If we're here we missed something
                assert( (being->getType() == Being::PLAYER) || (being->getType() == Being::MONSTER) || (being->getType() == Being::NPC) );
                break;
Hope that helps.
- Leeor

"Oh, no thanks. I ate a boulder on the way in." - Shrek
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: MiniMap Bug & Fix

Post by Crush » 14 Apr 2008, 08:06

Thanks for reporting and fixing. Unfortunately I can't take care of this right now. So I'll put it on the bugtracker nevertheless because otherwise it will most likely be forgotten.

Just curious: What exactly is the bug?
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Re: MiniMap Bug & Fix

Post by Bjørn » 14 Apr 2008, 08:17

I don't see any reason to add an assertion, since that would just cause the program to terminate for no good reason (supposing we had missed something). Other than that I understand you're having NPCs drawn in yellow, while before their color was defined by the last thing drawn before the NPC.
User avatar
leeor_net
Novice
Novice
Posts: 180
Joined: 03 Feb 2008, 10:17
Location: Ohio, USA
Contact:

Re: MiniMap Bug & Fix

Post by leeor_net » 20 Apr 2008, 01:40

Bjørn wrote:I don't see any reason to add an assertion, since that would just cause the program to terminate for no good reason (supposing we had missed something). Other than that I understand you're having NPCs drawn in yellow, while before their color was defined by the last thing drawn before the NPC.
Assertions on Win32 still allows a program to keep moving -- I forgot it doesn't work like that on *nix systems. Actually, I'm not sure why I found it necessary to put it there.

As for the NPC's being drawn as the last being drawn, that would be the 'bug'. Why would you want NPC dots to be drawn in Red while near monsters or Blue while near players? As for the color itself, I just thought anything contrasting would work.
- Leeor

"Oh, no thanks. I ate a boulder on the way in." - Shrek
Post Reply