Impassable & wall flag vs LOS

sahisahi

Well-Known Member
Jan 13, 2016
744
29
I added some custom landtile (cave) they have Impassable and Wall flags added.


then i created a custom mob that do certain things on his OnThink method, theres a LOS check, for some reason mob still sending the ebolt effect through wall.

Any clue?

if i add Item 74 (wall) to the game the mob just wall through unless i set it to non movable, is this even normal?

C#:
    public override void OnThink()
        {
            base.OnThink();
           
             if (Combatant == null)
             {
                this.CurrentSpeed = 0.1;
                return;
             }
           
if (this.Combatant.Player && Combatant.InLOS(this))
            {
               
                if ( Utility.Random( 58 ) == 1 )
            {
                SendEBolt( Combatant );
            }
cave.png
 

Visam

Well-Known Member
Mar 19, 2015
220
28
46
It looks like it might be a height issue. What's the tile's height?
 

Falkor

Well-Known Member
Apr 11, 2018
124
36
wpshard.com
Shard Name
Whispering Pines
If it's a relatively small area where you need to control LOS, you can always add LOSBlockers on top of the affected tiles.
 
  • Like
Reactions: Visam

Visam

Well-Known Member
Mar 19, 2015
220
28
46
yeah, what Falkor said.
I didn't pay enough attention to notice you were in the land tiles section. A land tile can't be used for los that way, because it has no height.
 
  • Like
Reactions: sahisahi

Falkor

Well-Known Member
Apr 11, 2018
124
36
wpshard.com
Shard Name
Whispering Pines
Another random idea -- is there a copy of your custom file (UOP or MUL) in both your client's folder and the folder that ServUO uses for client files? If the server doesn't have a copy of that file it doesn't know anything about the custom tile!