Thread: Inspect code
View Single Post
  #5  
Old 03-10-2002, 04:49 PM
theCoder
Sarnak
 
Join Date: Jan 2002
Posts: 90
Default function in Mob?

I'm still trying to learn how the EMU code works (mostly be looking at it when I can and lurking on the dev board ), so this may have implications I don't understand. But the OO side of me thinks that it would be easier to put the consider code into a function on the Mob class. Something like

int Mob::consider(Mob* target)
{
// Merkur's code here
}

Then in the processing function, replace most of the code with
con->level = this->consider(entity_list.GetMob(conin->targetid));

This wouldn't add any functionality, but it might make the code a little easier to manage (especially since the Client::Process function is over 2000 lines long already)
Reply With Quote