fix item tracking in battle/challenge modes
This commit is contained in:
+1
-1
@@ -955,7 +955,7 @@ static void server_command_what(shared_ptr<ServerState>, shared_ptr<Lobby> l,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(l->flags & Lobby::Flag::ITEM_TRACKING_ENABLED)) {
|
if (!(l->flags & Lobby::Flag::ITEM_TRACKING_ENABLED)) {
|
||||||
send_text_message(c, u"$C4Item tracking is off");
|
send_text_message(c, u"$C4Item tracking is\nnot available");
|
||||||
} else {
|
} else {
|
||||||
float min_dist2 = 0.0f;
|
float min_dist2 = 0.0f;
|
||||||
uint32_t nearest_item_id = 0xFFFFFFFF;
|
uint32_t nearest_item_id = 0xFFFFFFFF;
|
||||||
|
|||||||
@@ -3101,7 +3101,14 @@ shared_ptr<Lobby> create_game_generic(
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool item_tracking_enabled = (c->version() == GameVersion::BB) | s->item_tracking_enabled;
|
// TODO: We disable item tracking for battle and challenge mode because
|
||||||
|
// players' inventories are reset when they start the quests, and the server
|
||||||
|
// is not notified when this happens. We'll have to implement this anyway for
|
||||||
|
// BB, but for now we ignore it.
|
||||||
|
bool item_tracking_enabled =
|
||||||
|
(c->version() == GameVersion::BB) |
|
||||||
|
(s->item_tracking_enabled &&
|
||||||
|
!(flags & (Lobby::Flag::BATTLE_MODE | Lobby::Flag::CHALLENGE_MODE)));
|
||||||
|
|
||||||
shared_ptr<Lobby> game = s->create_lobby();
|
shared_ptr<Lobby> game = s->create_lobby();
|
||||||
game->name = name;
|
game->name = name;
|
||||||
|
|||||||
@@ -1405,7 +1405,7 @@ subcommand_handler_t subcommand_handlers[0x100] = {
|
|||||||
/* 87 */ nullptr,
|
/* 87 */ nullptr,
|
||||||
/* 88 */ on_subcommand_forward_check_size_game,
|
/* 88 */ on_subcommand_forward_check_size_game,
|
||||||
/* 89 */ on_subcommand_forward_check_size_game,
|
/* 89 */ on_subcommand_forward_check_size_game,
|
||||||
/* 8A */ nullptr,
|
/* 8A */ on_subcommand_forward_check_size_game,
|
||||||
/* 8B */ nullptr,
|
/* 8B */ nullptr,
|
||||||
/* 8C */ nullptr,
|
/* 8C */ nullptr,
|
||||||
/* 8D */ on_subcommand_forward_check_size_client,
|
/* 8D */ on_subcommand_forward_check_size_client,
|
||||||
|
|||||||
Reference in New Issue
Block a user