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: Sun Feb 03, 2008 10:17 am
Location: Ohio, USA
Contact:

MiniMap Bug & Fix

Post by leeor_net » Sun Apr 13, 2008 10:40 pm

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: Thu Aug 25, 2005 5:08 pm
Location: Germany

Re: MiniMap Bug & Fix

Post by Crush » Mon Apr 14, 2008 8:06 am

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: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Re: MiniMap Bug & Fix

Post by Bjørn » Mon Apr 14, 2008 8:17 am

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: Sun Feb 03, 2008 10:17 am
Location: Ohio, USA
Contact:

Re: MiniMap Bug & Fix

Post by leeor_net » Sun Apr 20, 2008 1:40 am

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