larhalt82

Member
Hello,
if you have a monster on the second floor of house and you are at the first floor, you can be attacked.

Could you help to understand why or where I've to look for fix it?

Thank you :)
 
This occurs within addons / features that have been placed but not frozen.

ai1103.photobucket.com_albums_g466_Expansescreenies_SpellcrafterFor4.jpg

I created this particular build using pandora, and whilst it remained unfrozen, all spawn on the levels immediately below could attack from underneath/above. The same would occur if you placed an addon of some kind and the only real way to avoid this, is to freeze the build.
 
wouldn't it be possible to add a piece of code to check if the target is this.x, this.y, z +=5/-= 5? because really i can think of any situation where a target would be sitting directly on a Mob but but more than 5 above/below it. Except maybe being mounted or flying. Would need to check that.
 
this depends of the floor type i think, a house having a dirt floor = can hit people upstairs etc.
this also happens with bridge/docks floors (static 1997 etc (it also eats the money lol)).
Freezing means sending client patch files, so the idea to set a z cap is probably a good idea, but i would raise it to 12, as it is the z of the second wooden ladder, which means you need to be on the first ladder to attack.
Consider that if you fight someone stepping on a block on the side of a house (static 1928), you would not be able to attack him if he stands on a pile of horse dung. (raises the z of 1).

(detail lol)
 
I have same problem in a player House monster can attack from upstair floor.

I see it on New Tile of House ex Stygian Abyss Tile and not on Old ML House Tile.

I can test it sometimes for you.
 
Found this in MiningCart.cs of all things

Code:
if (!from.InRange(this.GetWorldLocation(), 2) || !from.InLOS(this) || !((from.Z - this.Z) > -3 && (from.Z - this.Z) < 3))
 
i have solve problem modifing InLos() Function on Mobile.cs


public bool InLOS(Mobile target)
{
if (m_Deleted || m_Map == null)
{
return false;
}
else if ( ( target.Z > this.Z + 12 || target.Z < this.Z - 12 ) && m_AccessLevel == AccessLevel.Player )
{
return false;
}
else if (target == this || IsStaff())
{
return true;
}

return m_Map.LineOfSight(this, target);
}
 
Found this in MiningCart.cs of all things

Code:
if (!from.InRange(this.GetWorldLocation(), 2) || !from.InLOS(this) || !((from.Z - this.Z) > -3 && (from.Z - this.Z) < 3))
Great code! It really should be included in Basecreature and Playermobile I think by default or the Courageous LOS System should come with ServUO, but perhaps that might be a bit "too realistic" for UO heh
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back