Hello gents, if you ever happened to play on OSI servers you may have noticed how you can place stuff on low walls and (if memory doesn't fail me) under the arch tiles, I tried to reproduce the same behaviour, so here I am pasting the changes I made to Item.cs from rev 663, I'd like some feedback to see if it's proper or if I should seek another way.
So, here's what to change:
Item.cs
1)@3969
Change:
To:
This should help the item get the right z when being placed on walls you can walk through, like arches.
2)@4064,
Change:
To:
Now, what's bothering me is that I don't remember exactly the arch thing, if it was legit and if there was a shorter limit to how many items you could stack on it, I did this test 4-5 years ago... so can anyone up-to-date verify this ?
I tried running around placing item here and there, and it seemed to work right... but being a rookie at runuo devving I'd rather listen to an expert opinion.
So, here's what to change:
Item.cs
1)@3969
Change:
Code:
int checkZ = tile.Z;
int checkTop = checkZ + id.CalcHeight;
if ( checkTop == checkZ && !id.Surface )
++checkTop;
Rich (BB code):
int checkZ = tile.Z;
int checkTop = checkZ + id.CalcHeight;
if ( !id.Impassable && ( id.Flags & TileFlag.Wall ) != 0 )
checkTop = checkZ;
if ( checkTop == checkZ && !id.Surface )
++checkTop;
2)@4064,
Change:
Code:
if ( checkTop > z && (z + height) > checkZ )
return false;
else if ( (id.Surface || id.Impassable) && checkTop > surfaceZ && (z + height) > checkZ )
return false;
Rich (BB code):
if ( id.Impassable && checkTop > z && (z + height) > checkZ ) // To place items under arches or whatever
return false;
else if ( (id.Surface) && checkTop > surfaceZ && (z + height) > checkZ ) // To place items on low walls & co
return false;
Now, what's bothering me is that I don't remember exactly the arch thing, if it was legit and if there was a shorter limit to how many items you could stack on it, I did this test 4-5 years ago... so can anyone up-to-date verify this ?
I tried running around placing item here and there, and it seemed to work right... but being a rookie at runuo devving I'd rather listen to an expert opinion.