Thread: /who all frog
View Single Post
  #1  
Old 02-17-2008, 11:51 AM
Knightly
Accomplished Programmer
 
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
Default /who all frog

I've been trying to track down why when you do a /who all, frogloks show up as piranhas.

I know that it is because /who all returns 74 instead of 330 for the race of the froglok but I'm not sure where to fix this. Can someone point me in the right direction?

Here's what I've found so far:
In clientlist.cpp, the following returns the number of the race:
plrace=cle->race();

This is defined in cliententry.h which has
inline int16 race() const { return prace; }

cliententry.h takes me to cliententry.cpp which has
prace = scl->race;

clienentry.cpp takes me to servertalk.h and that's where I get stuck:
struct ServerClientList_Struct {
int8 race;

But now I'm having trouble finding where this gets set.

I know that I can change clientlist.cpp from:
Code:
plrace=cle->race();
To:
Code:
plrace=((cle->race() == FROGLOK2) ? FROGLOK : cle->race());
And this will make them show up correctly, but it seems like this would be fixing it in the wrong place. It also doesn't make it so that I can do "/who all frog" since it is only fixing the display. I still have to do "/who all piran" to get the frogloks on the server.

I'm hoping that someone more familiar with this aspect of the code can save me some search time. Anyone know what I should be looking at?
Reply With Quote