Send items only visible to GMs - only to GMs

If Wishes were UOX Coders, we'd be done by now ;P Post your wishes/suggestions for UOX3 changes/improvements here.
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Send items only visible to GMs - only to GMs

Post by Xuri »

I'm not sure if this is already happening or not, but it would be a nice feature if items with a visible setting of 3 (Visible to GMs only, according to the command docs) were only sent to GM characters.

Thus a number of items would never be sent to normal players (who wouldn't need to have those items sent in any case), like hidden item-based spawners and other items only GMs would ever have to see.

Though that would mean visible setting 3 couldn't be used for things like hidden walls put there to block player movement. Or would the server disallow walking there in any case, since it sees the wall?
-= Ho Eyo He Hum =-
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

The server sees everything, and if it's blocking, people won't be able to walk through it (note this behaviour would happen, for instance, if the client "forgot" the items and you tried to walk there, hence the need for 'resend). And from a quick glance at the code, it seems that if it's not visible (ie property not 0), it shouldn't be sent at all, unless it's 1 and you're the item owner.

Though from a quick squiz, I'm not seeing anything where visible == 3 is explicitly shown to a GM, either, though it's a quick glance only.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hm. I tried 'SET OWNER <target object> <target owner>, but the item with visibility level 1 still didn't show up for that character (normal player). Either there's a bug with the 'SET OWNER command, or with the code that checks the ownership status/sends the item.

enums.h contains

Code: Select all

enum VisibleTypes
{
	VT_VISIBLE			= 0,	// Visible to All
	VT_TEMPHIDDEN,				// Hidden (With Skill) / Visible To Item Owner
	VT_INVISIBLE,				// Magically Hidden
	VT_PERMHIDDEN				// Permanent Hidden (GM Hidden)
};
But I'm not sure what would be the difference between 1 and 3 if the character isn't the owner of the object. Hrm. :P

Anyway, the absence of the "rubber-band" effect when my normal player character tried to move through a hidden wall was kind of suspicious and led me to assume that the item did get sent but not shown by the client somehow... though I guess the client doesn't really have a concept of "hidden" and "visible" - it either gets sent the item or not?
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Well, actually it's quite the opposite, Xuri.

The problem is that while your client wasn't receiving information about the item (otherwise it would have blocked you - and you'd be seeing the item as gray), the server knows the item is there and isn't checking if it's visible when it looks to see if it will block your movement.

Thus the client attempts to walk (because it doesn't know about the item) and the server denys the client, and you rubberband.

So this should be changed to a bug report that invisible items are still blocking players.
Scott
Post Reply