Is there a lines from source that always calling the pCharacters List?
I keep searching but I found nothing. Anyone know where to find this?
A function that keep calling the Characters List from game in every seconds or every 500 miliseconds.
This is the sample code
Code:
for (ZCharacterManager::iterator itor = pZCharacterManager->begin(); itor != pZCharacterManager->end(); ++itor)
Re: Is there a lines from source that always calling the pCharacters List?
Re: Is there a lines from source that always calling the pCharacters List?
I wanted to add something to my source inside that CODE, that's why I don't want to add a new function to call that CODE, I wanted to search from source-function that has that CODE and calling it every 500 miliseconds.. Just like the scoreboard, when player hold the Tab key, it call the pCharacters List and it PING Peer in every 3 seconds.
Code:
for (ZCharacterManager::iterator itor = pZCharacterManager->begin(); itor != pZCharacterManager->end(); ++itor)
{
pCharacter->GetStatus().CheckCrc();
pCharacter->GetStatus().Ref().nX += 1; //sample that I want to add inside the code
pCharacter->GetStatus().MakeCrc();
}
so that my runnable will run smoothly and will not call for pCharacters List more than twice in every 500 miliseconds or x.
Re: Is there a lines from source that always calling the pCharacters List?
Iterating through the characters map doesn't really require much processing power. Frankly, it's quite fast. It will probably not make a significant difference, if any, if you were to optimize it.