TomenetGame / tomenet

TomeNET is an online multiplayer roguelike role-playing game
https://www.tomenet.eu/
Other
69 stars 11 forks source link

Fix mind-linking packet errors? #30

Closed jezek closed 2 years ago

jezek commented 2 years ago

@CBlueGH said in #28

Hm, mindlink still causes packet error here, I just tried it on a local server, with client+server cleanly compiled from latest source, and source+target clients both using latest source, tested client mindlink linux->linux and windows->windows.

I think I've found the issue. I worked in golang before, there the cases in switch don't fall through by default. Forgot, that it is different here.

But I couldn't test. I tried to search in Guide, but I haven't figured out how to do that map mind linking. Please point me in the right direction (special race? name of spell?), how do I cast and test.

Also you can try to test too, but I really would like to know how to test, to be able to test the changes in #29 .

Thanks

CBlueGH commented 2 years ago

Hm, oops. I guess I merged too early again, lots of "jezek - ...." debug comments in the log :D

jezek commented 2 years ago

This was ok, ready to be merged after testing the mindlink. The #29 needs to be reverted. That one is ful of logs and was a draft.

CBlueGH commented 2 years ago

Yay, looks good.

jezek commented 2 years ago

Yay, looks good.

How do you do the mindlink test? I would like to know to be able to test #29 . Thx.

CBlueGH commented 2 years ago
players(p).esp_link = id
players(p).esp_link_type = 1
players(p).esp_link_end = 0
players(p).esp_link_flags = bor(players(p).esp_link_flags, 1 + 16 + 128)
player.esp_link_flags = bor(player.esp_link_flags, 256)
players(p).redraw2 = bor(players(p).redraw2, 1)

LUA -> C: players(p) is Players[Ind_target] and player is Players[Ind]