Classic control issue
I can't use any item inside any container/inventory using right click. Tested on 8.61 server and one random 9.7 server by backpack and food.
http://img51.imageshack.us/img51/6087/rjha.jpg
Tested on latest source, downloaded and compiled yesterday.
A lot of issues with 8.61, 8.60 works fine.
ERROR: ProtocolGame parse message exception (13 bytes unread, last opcode is 170, prev opcode is 131): unknown message mode 20
ERROR: ProtocolGame parse message exception (29 bytes unread, last opcode is 180, prev opcode is -1): unknown message mode 255
ERROR: no thing at pos:32368 32230 7, stackpos:2
at:
[C++]: ProtocolGame::getMappedThing
ERROR: no creature found to move
at:
[C++]: ProtocolGame::parseCreatureMove
ERROR: no thing at pos:32367 32230 7, stackpos:3
at:
[C++]: ProtocolGame::getMappedThing
ERROR: no thing
at:
[C++]: ProtocolGame::parseTileRemoveThing
Bugfix: \modules\game_interface\gameinterface.lua
Replace the else block for the classic control with:
--classic control
else
if useThing and keyboardModifiers == KeyboardNoModifier and mouseButton == MouseRightButton and not g_mouse.isPressed(MouseLeftButton) then
local player = g_game.getLocalPlayer()
if creatureThing and creatureThing ~= player and creatureThing:getPosition().z == autoWalkPos.z then
g_game.attack(creatureThing)
return true
elseif useThing:isContainer() then
if useThing:getParentContainer() then
g_game.open(useThing, useThing:getParentContainer())
return true
else
g_game.open(useThing)
return true
end
elseif useThing:isMultiUse() then
startUseWith(useThing)
return true
elseif useThing then
g_game.use(useThing)
elseif attackCreature and attackCreature ~= player then
g_game.attack(attackCreature)
return true
else
g_game.use(useThing)
return true
end
return true
elseif lookThing and keyboardModifiers == KeyboardShiftModifier and (mouseButton == MouseLeftButtuseon or mouseButton == MouseRightButton) then
g_game.look(lookThing)
return true
elseif lookThing and ((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or (g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
g_game.look(lookThing)
return true
elseif useThing and keyboardModifiers == KeyboardCtrlModifier and (mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
createThingMenu(menuPosition, lookThing, useThing, creatureThing)
return true
elseif attackCreature and g_keyboard.isAltPressed() and (mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
g_game.attack(attackCreature)
return true
elseif creatureThing and creatureThing:getPosition().z == autoWalkPos.z and g_keyboard.isAltPressed() and (mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
g_game.attack(creatureThing)
return true
end
end
Works with the latest source.
Thanks LordHepipud it should be a pull request :)
BTW Shift + left click don't work too, but now I can see how it's done, so maybe I will fix it by my self and put code here
@yrpen are you getting the same protocol errors as I posted above? Open the terminal (Ctrl + T) and see if you are getting the same errors in the 8.61 server. Cheers!
--- LordHepipud ---
OK "look" problem is fixed now
--- EDIT "look" problem itn't not fixed.
--- EDIT 2 --- Ok now "look" it's fixed in 100%
change this line: elseif lookThing and keyboardModifiers == KeyboardShiftModifier and (mouseButton == MouseLeftButtuseon or mouseButton == MouseRightButton) then
for this: elseif lookThing and keyboardModifiers == KeyboardShiftModifier and (mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
--- BeniS ---
I don't get any errors exept "op code", but it's normal I guess.
Everything I tested with Classic Controll works fine, so I will close it. Reopen if there is still a bug remaining.