Ecstacy
Mothafuckaaa
Hey,
I'm totally new to C++ so I need some help.
I want that player summons are able to walk on PZ tiles, but regular monsters aren't.
I have tried to change
to
But that makes monsters also able to walk on PZ tiles.
tile.cpp part
Thanks in advance,
unknown666
I'm totally new to C++ so I need some help.
I want that player summons are able to walk on PZ tiles, but regular monsters aren't.
I have tried to change
Code:
if(hasFlag(TILESTATE_PROTECTIONZONE))
return RET_NOTPOSSIBLE;
to
Code:
if(hasFlag(TILESTATE_PROTECTIONZONE))
return [B]RET_NOERROR[/B];
But that makes monsters also able to walk on PZ tiles.
tile.cpp part
Code:
if(const Monster* monster = creature->getMonster())
{
[B]if(hasFlag(TILESTATE_PROTECTIONZONE))
return RET_NOTPOSSIBLE;[/B]
if(floorChange() || positionChange())
return RET_NOTPOSSIBLE;
if(monster->canPushCreatures() && !monster->isSummon())
{
if(creatures)
{
Creature* tmp = NULL;
for(uint32_t i = 0; i < creatures->size(); ++i)
{
tmp = creatures->at(i);
if(creature->canWalkthrough(tmp))
continue;
if(!tmp->getMonster() || !tmp->isPushable() ||
(tmp->getMonster()->isSummon() &&
tmp->getMonster()->isPlayerSummon()))
return RET_NOTPOSSIBLE;
}
}
}
Thanks in advance,
unknown666