Got rid of AnimView, added Gui
This commit is contained in:
@@ -76,23 +76,14 @@ Tangible *World::tangible_get(int64_t id) {
|
||||
}
|
||||
}
|
||||
|
||||
void World::update_view_map(AnimViewMap *vm, int64_t player_id, float radius) {
|
||||
vm->clear_updated_bits();
|
||||
|
||||
// Update the player's AnimView first.
|
||||
vm->update_one(tangible_get(player_id)->anim_queue_);
|
||||
const AnimView *player_view = vm->get_one(player_id);
|
||||
|
||||
std::vector<int64_t> World::get_near(int64_t player_id, float radius) {
|
||||
Tangible *player = tangible_get(player_id);
|
||||
|
||||
// Find out where's the center of the world.
|
||||
std::string plane = player_view->get_plane();
|
||||
util::XYZ xyz = player_view->get_xyz();
|
||||
|
||||
// Update AnimViews for every tangible near the player.
|
||||
for (int64_t id : plane_map_.scan_radius(plane, xyz.x, xyz.y, 100.0)) {
|
||||
vm->update_one(tangible_get(id)->anim_queue_);
|
||||
}
|
||||
|
||||
vm->delete_non_updated();
|
||||
std::string plane = player->anim_queue_.get_plane();
|
||||
util::XYZ xyz = player->anim_queue_.get_xyz();
|
||||
|
||||
return plane_map_.scan_radius(plane, xyz.x, xyz.y, radius, player_id);
|
||||
}
|
||||
|
||||
Tangible *World::tangible_make(lua_State *L, int64_t id, bool pushdb) {
|
||||
|
||||
Reference in New Issue
Block a user