guguinha12
New Member
Hello, I noticed a problem in the TFS source and it seems to be a common error that has never been solved.
As you can see in this image if a solid object is exactly in position 1, in front of the player, the spell is not sent (image 3).
Would anyone have an efficient solution for this?
I think the problem is related only to the validation of the tile exactly in front of the player
As you can see in this image if a solid object is exactly in position 1, in front of the player, the spell is not sent (image 3).
Would anyone have an efficient solution for this?
I think the problem is related only to the validation of the tile exactly in front of the player
C++:
bool Item::hasProperty(ITEMPROPERTY prop) const
{
const ItemType& it = items[id];
switch (prop) {
case CONST_PROP_BLOCKSOLID: return it.blockSolid;
case CONST_PROP_MOVEABLE: return it.moveable && !hasAttribute(ITEM_ATTRIBUTE_UNIQUEID);
case CONST_PROP_HASHEIGHT: return it.hasHeight;
case CONST_PROP_BLOCKPROJECTILE: return it.blockProjectile;
case CONST_PROP_BLOCKPATH: return it.blockPathFind;
case CONST_PROP_ISVERTICAL: return it.isVertical;
case CONST_PROP_ISHORIZONTAL: return it.isHorizontal;
case CONST_PROP_IMMOVABLEBLOCKSOLID: return it.blockSolid && (!it.moveable || hasAttribute(ITEM_ATTRIBUTE_UNIQUEID));
case CONST_PROP_IMMOVABLEBLOCKPATH: return it.blockPathFind && (!it.moveable || hasAttribute(ITEM_ATTRIBUTE_UNIQUEID));
case CONST_PROP_IMMOVABLENOFIELDBLOCKPATH: return !it.isMagicField() && it.blockPathFind && (!it.moveable || hasAttribute(ITEM_ATTRIBUTE_UNIQUEID));
case CONST_PROP_NOFIELDBLOCKPATH: return !it.isMagicField() && it.blockPathFind;
case CONST_PROP_SUPPORTHANGABLE: return it.isHorizontal || it.isVertical;
default: return false;
}
}
Last edited: