• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Walkable ocean tiles crash client

X X X

Newb
Joined
Jul 26, 2015
Messages
148
Reaction score
13
Hey everyone, I've searched but can't find anyone else who's reported anything similar..
I'm using OTX3 7.72 and for some reason the "walkable ocean" tiles crash the client when you try and walk on them. In items.xml they look like this:

XML:
    <item fromid="4820" toid="4825" name="shallow water">
        <attribute key="effect" value="bluebubble" />
        <attribute key="allowpickupable" value="1" />
        <attribute key="fluidSource" value="water" />
    </item>

These tiles already existed in version 7.72, no idea why they would be causing the crash. I've even added additional custom ground tiles to the server (quara/underwater ocean floor tiles) and I was able to do that just fine without making the client crash. I double checked items.otb and items.dat and the walkable ocean tiles have the correct flags (ground, walkable) as they should. When I place them in RME, they look normal and when I show pathing they look the same as other walkable ground tiles.

The debug assertion when walking on a walkable ocean tile is this:

Code:
Debug Assertion 7.72 Container.h 178
Sat Jan 23 16:28:30 2021
Windows Version: 6.2 build 9200 on 2
Graphic Engine: 2
Last Packet Types: 162 142 104 109 109 107 160 160 103 109
Last Packet: 088 000 109 238 002 216 000 007 001 237 002 216 000 007 104 031
Player Position: [749,216,7]
Player.cpp 383: exception occurred, reason:
Player.cpp 456: exception occurred, reason:
Control.cpp 1560: exception occurred (Type = 0), reason:
Control.cpp 366: exception occurred (Force?1:0 = 0), reason:
MainWindow.cpp 127: exception occurred (Surface = 1), reason:
GUI.cpp 1408: exception occurred (Surface = 1), reason:
MapWindow.cpp 834: exception occurred (Surface = 1), reason:
MapWindow.cpp 527: exception occurred (Obj = 4601), reason:
MapWindow.cpp 1062: exception occurred (posx = 160) (posy = 128), reason:
MapWindow.cpp 927: exception occurred, reason:
Objects.cpp 484: exception occurred (Number = 267) (Flag = 24), reason:
Container.h 178: index out of range (original i: 267, i: 266, min: 1, d: 254)
Comment:

here is a link to the container.h: mattyx14/otxserver (https://github.com/mattyx14/otxserver/blob/otxserv3/path_7_7/src/container.h)
 
Solution
I can almost guarantee you the problem here is in swimming.lua:

Lua:
local outfit = {lookType = 267, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}

function onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return false
    end

    doSetCreatureOutfit(creature, outfit, -1)
    return true
end

function onStepOut(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if player == nil then
        return false
    end

    player:removeCondition(CONDITION_OUTFIT)
    return true
end

The idiots who downgraded this version left the movement script for swimming in the game which tries to set your outfit to the "swimmer"...
I can almost guarantee you the problem here is in swimming.lua:

Lua:
local outfit = {lookType = 267, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}

function onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return false
    end

    doSetCreatureOutfit(creature, outfit, -1)
    return true
end

function onStepOut(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if player == nil then
        return false
    end

    player:removeCondition(CONDITION_OUTFIT)
    return true
end

The idiots who downgraded this version left the movement script for swimming in the game which tries to set your outfit to the "swimmer" outfit (looktype = 267) which did not exist in the 7.6 client. The result is the crash you get. Simple fix is to delete or comment out the lines in movements.xml:

XML:
<movevent event="StepIn" fromid="4620" toid="4625" script="swimming.lua" />
<movevent event="StepOut" fromid="4620" toid="4625" script="swimming.lua" />
<movevent event="StepIn" fromid="4820" toid="4825" script="swimming.lua" />
<movevent event="StepOut" fromid="4820" toid="4825" script="swimming.lua" />
 
Last edited:
Solution

Similar threads

Back
Top