Page 2 of 2

Re: HUDNavigation

Posted: Tue May 18, 2010 3:35 pm
by 1337
I have cleaned up HUDNavigation. You should make an svn up next you work on it or you will get lots of conflicts.

Re: HUDNavigation

Posted: Thu May 20, 2010 6:35 pm
by greenman
i merged your branch into the presentation3 branch (which is a merger branch for the presentation)
you will probably get a new branch soon, but if you want to commit something before you get the hudelements2 branch do the following before commiting:
- go into the directory where your local working copy is (i.e. .../orxonox/hudelements)
- do svn switch https://svn.orxonox.net/game/code/branc ... sentation3
- go into the build folder and do a make -j4
- test whether everything still works

then you can commit

Re: HUDNavigation

Posted: Sun May 23, 2010 8:36 pm
by sfluecki
hi again,

thx @ all for your efforts! i was away for a few days and am now back with working spirit ;-)
going to take a look at all your changes & cleanUps so i know where we stand atm.

first thing i notice in my hurry is that i cant compile:

Code: Select all

Revision: 6964
cc1plus: error: OverlaysPrecompiledHeaders.h: No such file or directory
but i think this is something on my end - gonna try again tomorrow and then post an update here.

thanks again.
sebastian

Re: HUDNavigation

Posted: Sun May 23, 2010 8:55 pm
by greenman
hm... actually this file should be located at src/modules/overlays/OverlaysPrecompiledHeaders.h ?!

Re: HUDNavigation

Posted: Sun May 23, 2010 8:56 pm
by sfluecki
just got it compiling. great work! a thousand thanks! going to figure out what exactly you changed tomorrow.
cheers sebastian

Re: HUDNavigation

Posted: Thu May 27, 2010 11:10 am
by sfluecki
some thoughts:

Code: Select all

    void HUDNavigation::changedOwner()
    {
 c316:       // TODO: Delete old objects?
what do you mean with old objects? changedOwner is called when you respawn,
so i guess you are talking about the objects that was indexed (in our map) during the
last sessino of playing just before the respawn? since when you die the destructor gets
called those objects already are deleted i guess.

idea to limit the markers.

in addOBject(): .

Code: Select all

	if (activeObjectList_.size() >= 5)           /
  return;    
to not ignore already dead objects a control line in the tick::

Code: Select all

	if((this->getOwner()->getScene()->getRadar()->getRadarObjects()).size() > activeObjectList_.size()){
	  
	  for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end();)
                removeObject((it++)->first);
	  changedOwner();
	}
so i compare the activeObjectList_ with the actual amount of objects.

the problem occurs when the game tries to erase (killBot X) a bot that is not in the
activeObjectList (was already full when adding it), out comes the following:

Code: Select all

        else
            COUT(2) << "Warning, HUDNavigation: Attempting to remove non-existent object" << std::endl;
from removeObject.

any tips?
for security reasons im not going to commit but just ask =)

Re: HUDNavigation

Posted: Thu May 27, 2010 6:31 pm
by sfluecki
works. done. 8)

the limit can be set in HUDNavigation.h ' static const unsigned int markerLimit_'.

if possible it would be nice to set this via console ingame ?

Re: HUDNavigation

Posted: Sat May 29, 2010 2:33 pm
by solex
sfluecki wrote: if possible it would be nice to set this via console ingame ?
Setting it via console is really easily and fast done.
Here is how to do it: http://www.orxonox.net/wiki/ConsoleCommand

Re: HUDNavigation

Posted: Sat May 29, 2010 4:49 pm
by greenman
or instead use config values (they can also be set via the console): http://www.orxonox.net/wiki/howto/ConfigValue

they have also been used in the tutorial, if you need more examples