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:
Ahmed Samy
2013-08-27 03:39:07 +02:00
parent bbdeac2e33
commit 520baa28ea
9 changed files with 48 additions and 27 deletions

View File

@@ -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()))