if you didnt notice no one really use's rs2dv anymore
|
|

There are many issue's which people keep finding in the current release of rs2dv. There are several people who have noticed when spawning item's or casting spells to certain locations they offset around 8 squares. Sometimes they offset too 15+ squares.
Lately I have been doing some extreme tests involving its point location system and its walking system. First up I printed all x,y,localx, localy, mapX, mapY coords from one location to another location for both rs2d and winterlove. I noticed that both wl and rs2dv local coords raised and lowered when you walked but rs2d's didn't make sence. I also noticed that rs2d map region raised and lowered every few steps but wl didn't raise until a new map region was loaded.
Here is where the two walking system's split. Rs2d calculates a new map region value every time you move, as you can see in the point class but winterlove carried the same region over and over and then added or subtracted 4 when a region update occurred. The reason why your item's, spells offset are because of the local coords changing and not changing to the correct value. Local coords are calculated using the absolute and the map region value's. So if the map region keeps changing when its not suppose to then the local coord is going to be messed. To overcome this problem I needed to find a way of keeping the mapregion coords the same until a new region was loaded then update them but I remembered about the knownRegions value's in the player class. Theese known region value's are only updated when a region update's.
This is a classic formula used in both rs2d and wl server's
instead of using that you SHOULD useCode:(x - 8 * regionX)
For the y Coord
For the x CoordCode:(y - 8 * player.getKnownRegion()[1])
Code:(x - 8 * player.getKnownRegion()[0])
Hope you understand what I have done here and how the regions/local coords work for rs2d!
ENJOY!




Nice, again a step closer to a bugfree version of rs2dv. Only big trouble is the packet spamming bug![]()

| « Looking to make an 'old school' pk server | XML is not faster » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |