Fix thrown items duplicating

This commit is contained in:
IQuant 2024-05-14 15:29:55 +03:00
parent f23498ccdf
commit a05cd4be27
2 changed files with 12 additions and 11 deletions

View file

@ -123,16 +123,17 @@ local player_fns = {
controls_data.action = false
end
if(message.throw)then
ComponentSetValue2(controlsComp, "mButtonDownThrow", true)
if (not controls_data.throw) then
ComponentSetValue2(controlsComp, "mButtonFrameThrow", GameGetFrameNum() + 1)
end
controls_data.throw = true
else
ComponentSetValue2(controlsComp, "mButtonDownThrow", false)
controls_data.throw = false
end
-- Do not sync this one, as thrown items are handled by item_sync
-- if(message.throw)then
-- ComponentSetValue2(controlsComp, "mButtonDownThrow", true)
-- if (not controls_data.throw) then
-- ComponentSetValue2(controlsComp, "mButtonFrameThrow", GameGetFrameNum() + 1)
-- end
-- controls_data.throw = true
-- else
-- ComponentSetValue2(controlsComp, "mButtonDownThrow", false)
-- controls_data.throw = false
-- end
if(message.interact)then
ComponentSetValue2(controlsComp, "mButtonDownInteract", true)

View file

@ -11,7 +11,7 @@
- Общее золото
- Удаление лишних клиентов при загрузке игры
- intern pathnames in enemy sync
- Fix bottles and other items duplicating when thrown (on host?)
+ Fix bottles and other items duplicating when thrown (on host?)
- Fix weird no gui mode