Skip to content

Commit

Permalink
Fix packet missing error.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfence committed Sep 29, 2024
1 parent 44298dc commit 34bdaae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions games/devtest/mods/unittests/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,12 @@ local function run_player_hotbar_clamp_tests(player)
player:hud_set_hotbar_itemcount(old_bar_size)
end
unittests.register("test_player_hotbar_clamp", run_player_hotbar_clamp_tests, {player=true})

unittests.register("test_player_node_visual", function (player)
local visual = player:get_node_visual("testnodes:variant_facedir")
player:set_node_visual("testnodes:variant_facedir",
{variant_offset = 5})
local set_visual = player:get_node_visual("testnodes:variant_facedir")
assert(set_visual.variant_offset == 5)
player:set_node_visual("testnodes:variant_facedir", visual)
end, {player = true})
2 changes: 1 addition & 1 deletion src/network/serveropcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] =
{ "TOCLIENT_SET_MOON", 0, true }, // 0x5b
{ "TOCLIENT_SET_STARS", 0, true }, // 0x5c
{ "TOCLIENT_MOVE_PLAYER_REL", 0, true }, // 0x5d
null_command_factory, // 0x5e
{ "TOCLIENT_SET_NODE_VISUAL", 0, true }, // 0x5e
null_command_factory, // 0x5f
{ "TOCLIENT_SRP_BYTES_S_B", 0, true }, // 0x60
{ "TOCLIENT_FORMSPEC_PREPEND", 0, true }, // 0x61
Expand Down

0 comments on commit 34bdaae

Please sign in to comment.