Fix initial setup of IDPlayerPool
This commit is contained in:
@@ -21,6 +21,13 @@ std::string World::tangible_anim_debug_string(int64_t id) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string World::tangible_id_pool_debug_string(int64_t id) const {
|
||||||
|
const Tangible *t = tangible_get(id);
|
||||||
|
if (t == 0) return "no such tangible";
|
||||||
|
return t->id_player_pool_.debug_string();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string World::tangible_ids_debug_string() const {
|
std::string World::tangible_ids_debug_string() const {
|
||||||
util::IdVector idv;
|
util::IdVector idv;
|
||||||
for (const auto &pair : tangibles_) {
|
for (const auto &pair : tangibles_) {
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public:
|
|||||||
|
|
||||||
void update_plane_item();
|
void update_plane_item();
|
||||||
bool is_an_actor() { return (id_player_pool_.get_fifo_capacity() > 0); }
|
bool is_an_actor() { return (id_player_pool_.get_fifo_capacity() > 0); }
|
||||||
void configure_id_pool_for_actor() { id_player_pool_.set_fifo_capacity(20); }
|
void configure_id_pool_for_actor() { id_player_pool_.set_fifo_capacity(3); id_player_pool_.refill(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
using UniqueTangible = std::unique_ptr<Tangible>;
|
using UniqueTangible = std::unique_ptr<Tangible>;
|
||||||
@@ -295,6 +295,10 @@ public:
|
|||||||
//
|
//
|
||||||
std::string tangible_anim_debug_string(int64_t id) const;
|
std::string tangible_anim_debug_string(int64_t id) const;
|
||||||
|
|
||||||
|
// Get the tangible's ID Pool as a debug string.
|
||||||
|
//
|
||||||
|
std::string tangible_id_pool_debug_string(int64_t id) const;
|
||||||
|
|
||||||
// Get a list of all existing tangibles as a comma-separated string.
|
// Get a list of all existing tangibles as a comma-separated string.
|
||||||
//
|
//
|
||||||
std::string tangible_ids_debug_string() const;
|
std::string tangible_ids_debug_string() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user