HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

1.24 IsTerrainPathable?

08-05-2009, 04:29 AM#1
masda70
Since 1.24 IsTerrainPathable doesn't seem to work anymore! I had things that worked fine in 1.23 and all of the sudden they don't due to that native.

Example:
Collapse JASS:
 IsTerrainPathable(0.,0.,PATHING_TYPE_WALKABILITY)

returns false when used on the classic empty new map!
08-05-2009, 04:35 AM#2
Alevice
OH CRAP. Now that sucks.
08-05-2009, 04:35 AM#3
TotallyAwesome
Good job, Blizzard.
08-05-2009, 04:53 AM#4
Rising_Dusk
This is not true. The native has never worked as intended and has always returned strange results. Take a look at my TerrainPathability library, it was created because the native wasn't obvious. It has been updated to 1.24 and tested properly, it will tell you whether an (x,y) is walkable, land, shallow water, or deep water.
08-05-2009, 05:15 AM#5
masda70
One thing I know is that something was behaving differently in 1.23. But I may I have lost count of my map versions.

EDIT: I will test it again to be sure.

EDIT2: This is confusing me. Something is really bizarre in this thing. It seemed to be working in the previous patch, and now that I've downgraded it's not working anymore! The fun thing is that some people that played the latest 1.23 version have told me it was working...
08-05-2009, 03:44 PM#6
D4RK_G4ND4LF
this works for me (might not work to 100% but I never experienced any bug)
Collapse JASS:
function IsItemPathableXY takes real x, real y, item i, item i2 returns boolean
    call SetItemPosition( i, x, y )
    call SetItemPosition( i2, x, y )
    if ((x==GetItemX(i) and y==GetItemY(i))and(not (x==GetItemX(i2) and y==GetItemY(i2)))) then
        set i = null
        set i2 = null
        return true
    endif
    set i = null
    set i2 = null
    return false
endfunction

here is a testmape (to lazy to make a new map to test but the other stuff is cool too)
Attached Files
File type: w3xUltimateShowdown.w3x (96.0 KB)
08-05-2009, 04:06 PM#7
Vexorian
Quote:
Originally Posted by masda70
Since 1.24 IsTerrainPathable doesn't seem to work anymore! I had things that worked fine in 1.23 and all of the sudden they don't due to that native.

Example:
Collapse JASS:
 IsTerrainPathable(0.,0.,PATHING_TYPE_WALKABILITY)

returns false when used on the classic empty new map!
It would always return false on an empty map.

Could it be your functions relying on IsTerrainPathable are affected by the return bug detection?
08-05-2009, 05:01 PM#8
Captain Griffen
IsTerrainPathable actually returns whether it is NOT pathable. Blizzard suck like that. Always has been.