[FIXED] Fish Steaks

Here we stuff all the bugs we've managed to squash/squish/squelch.
Locked
Kiff
UOX3 Apprentice
Posts: 100
Joined: Fri Mar 03, 2006 2:30 am
Has thanked: 0
Been thanked: 0

Fish Steaks

Post by Kiff »

When trying to cook fish steaks on a fire it says "You are too far away from the target"
Never Underestimate the Power of Stupid People in Large Groups
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

This should only happen if you are more than 3 tiles away or on a different plane (level) than the fire.
Scott
Kiff
UOX3 Apprentice
Posts: 100
Joined: Fri Mar 03, 2006 2:30 am
Has thanked: 0
Been thanked: 0

Post by Kiff »

Ahh my bad, I was doing all my tests on a dock which has a -z value of a few. Sorry :p
Never Underestimate the Power of Stupid People in Large Groups
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Was the fire on the same dock? Or quite a bit higher?

Basically, the Z distance allowed for is about 10, which is equal to the maximum increase or decrease in height one can have when moving.
Scott
Kiff
UOX3 Apprentice
Posts: 100
Joined: Fri Mar 03, 2006 2:30 am
Has thanked: 0
Been thanked: 0

Post by Kiff »

Same dock, I was standing on top of it.
Never Underestimate the Power of Stupid People in Large Groups
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Sounds like the z being returned by the targeting cursor is off, I'll have to look into it.
Scott
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 »

Yup, it's a bit off. When the campfire I tested with was at -2 Z (on the Britain main docks) , var targZ = tSock.GetByte( 16 ); returned 254 after I targeted the campfire :P
-= 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 »

Unusual, sounds like a signed/unsigned issue being returned. If it is > 127, you should do a GetByte() - 256 (that'll correct it). Probably should do a GetSByte() though, and make sure the method exists.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I'd be willing to bet that we don't have signed overloads for our Byte/Word/DWord messages in CSocket, let alone for the JavaScript engine.

Suppose we should implement a wrapper for the signed overloads, though, since JS uses var's.
Scott
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

GetSByte(), GetSWord(), and GetSDWord() will be in the next release.

Note that any time you are pulling a Z value in JS you will want to use GetSByte() rather than GetByte().
Scott
Locked