Page 1 of 1
Loot chest, mid air
Posted: Sun May 08, 2016 8:48 pm
by Gangrenous
What would cause loot chest to appear in mid-air?
Re: Loot chest, mid air
Posted: Sun May 08, 2016 9:04 pm
by Jabantiz
The chest appears at the exact x,y,z the mob dies at and even if the y (vertical) is off the client should drag it to the ground on its own, if it floats it seems like it would most likely be a bad grid so I would do /spawn details and /grid and compare the 2, if the grid is wrong then the grid on the dead npc will probably also be wrong. If it is not a grid issue then I have no clue, as I said the client usually drags objects to the ground unless they have an offset.
Re: Loot chest, mid air
Posted: Mon May 09, 2016 5:35 am
by Gangrenous
Verified the chest, body and my character are all in the same grid. I am thinking there is just something off with the entire zone. Originally I had to fix everything in Antonica, it all appeared above the ground, much like this chest is doing.
Re: Loot chest, mid air
Posted: Mon May 09, 2016 5:09 pm
by Gangrenous
Here is a screenshot of it. You will notice the grid is the exact same, so is the z-axis. But still the chest appear in mid-air. This does not happen in Frostfang.
Re: Loot chest, mid air
Posted: Mon May 09, 2016 5:30 pm
by Jabantiz
Does the Y match the players Y? I honestly have no clue why this is happening, the client always drags objects to the ground. The only solution I can think of would be to determine the actual location when the chest is created and not use the dead npc's location but that would require the server to know the level geometry and that is still a ways off before we get around to that.
Re: Loot chest, mid air
Posted: Mon May 09, 2016 5:43 pm
by Gangrenous
There is something funky with Antonica. I had to do a grid fix on every single npc when I first started populating it.
Another strange thing, mobs that die in cities with loot do not leave chest, loot remains on body. I could seriously do without chest if there is a way to just disable them in all the zones.
Re: Loot chest, mid air
Posted: Mon May 09, 2016 6:32 pm
by Gangrenous
It seems that the chest are about 1.5 off, here is a screenshot and code that I changed. Now to check other zones.
Code: Select all
chest->SetX(GetX());
chest->SetY(GetY()-1.5);
chest->SetZ(GetZ());
Re: Loot chest, mid air
Posted: Mon May 09, 2016 6:41 pm
by Gangrenous
I gave the Ry'Gorr some loot and the Y axis appears to be correct for there too.
Re: Loot chest, mid air
Posted: Mon May 09, 2016 7:44 pm
by Gangrenous
Well that did not work in every instance, the chest seem to vary in Y axis. I hate the chest anyway and they would get pulled on my server so I made a new rule TreasureChestDisabled and set it to true, added a check before the chest are ever created and the loot pulled off the body, works perfect. On to the next thing

Re: Loot chest, mid air
Posted: Tue May 10, 2016 2:33 pm
by Jabantiz
Never even crossed my mind to add a rule for chests, that is something I can add to the SVN code though.
Re: Loot chest, mid air
Posted: Tue May 10, 2016 4:23 pm
by Gangrenous
I can always suggest those, I am good at adding rules
