mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 16:07:12 +01:00
Move "getNPC" that was introduced in commit
00729bbc2e
from Spawn to CreatureType
I didn't have a closer look at how his code was structured, what he
basically did
is that he set all creatures in a spawn as NPC's even if it's a monster
which is
so erroneous.
Highlights:
- Add branch prediction macros
- Minor code style fixes & some others
Hopefully the branch prediction thing will speed up OTB since it's
awfully slow.
This commit is contained in:
@@ -390,7 +390,7 @@ void Map::removeCreatureById(uint32 id)
|
||||
|
||||
void Map::removeUnawareThings()
|
||||
{
|
||||
// remove creatures from tiles that we are not aware anymore
|
||||
// remove creatures from tiles that we are not aware of anymore
|
||||
for(const auto& pair : m_knownCreatures) {
|
||||
const CreaturePtr& creature = pair.second;
|
||||
if(!isAwareOfPosition(creature->getPosition()))
|
||||
|
||||
Reference in New Issue
Block a user