• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Spells with solid walls in front are not cast

guguinha12

New Member
Joined
Nov 24, 2009
Messages
6
Reaction score
0
Location
Brazil
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?

1598320903611.png

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;
    }
}

1598323063748.png
 
Last edited:
Back
Top