Error in T_ScGlobal_LoopTR

Type: 

Bug

Severity: 

Normal

Game version: 

Morrowind

Concerns: 

Tamriel_Data

Found in Version: 

Status: 

Description: 

This script incorrectly assigns the chunk of land between y=31 and y=34 within map 7 as map 3 instead of taking this out of map 6. It's already a problem for Nav Andaram and Aimrah, though I'm not sure if any dialogue there is actually affected.

The changes that should be made are in bold brackets.
 

 

Begin T_ScGlobal_LoopTR
; This script will keep track of which exterior cell the player character is, and also determine
; in which TR map the cell is. Bethesda land is considered as TR map 0.

float xpos
float ypos
short control

if ( CellChanged )
else
    return
endif

if ( MenuMode )
    return
endif

if ( GetPCCell "Mournhold" )
    set TR_MapPos to 0
endif

if ( GetInterior == 1 )
    return
endif

; if ( TR_Test )
;     Player->AddItem "T_TestSkull" 1
;     set TR_Test to 0
; endif

set xpos to ( Player->GetPos x )
set ypos to ( Player->GetPos y )

if ( xpos < 0 )
    set control to ( ( xpos / 8192 ) - 1 )
    set TR_CellX to control
else
    set control to ( xpos / 8192 )
    set TR_CellX to control
endif

if ( ypos < 0 )
    set control to ( ( ypos / 8192 ) - 1 )
    set TR_CellY to control
else
    set control to ( ypos / 8192 )
    set TR_CellY to control
endif

if ( TR_CellY < -30 )
    ; Southern maps
    if ( TR_CellX > 9 ) [< 10]
        set TR_MapPos to 6 [7]
        return
    else
         if ( TR_CellY > -35 )
            set TR_MapPos to 3
            return
        else
            set TR_MapPos to 7 [6]
            return
        endif
    endif
elseif ( TR_CellX < 5 )
    ; Western Maps
        if ( TR_CellY > -6 )
        set TR_MapPos to 5
        return
    else
        set TR_MapPos to 4
        return
    endif
else
    ; Eastern Maps
    if ( TR_CellY < -15 )
        set TR_MapPos to 3
        return
    elseif ( TR_CellY < 8)
        set TR_MapPos to 2
        return
    else
        set TR_MapPos to 1
        return
    endif
endif

End