diff --git a/builtin/client_file/client_file.cpp b/builtin/client_file/client_file.cpp index 42d69f5..764ecaa 100644 --- a/builtin/client_file/client_file.cpp +++ b/builtin/client_file/client_file.cpp @@ -338,7 +338,7 @@ void FileWatchThread::run(interface::Thread *thread) client_file::access(m_module->m_server, [&](client_file::Interface *iclient_file) { - for(int fd : active_sockets){ + for(int fd: active_sockets){ m_module->handle_active_socket(fd); } }); diff --git a/builtin/ground_plane_lighting/ground_plane_lighting.cpp b/builtin/ground_plane_lighting/ground_plane_lighting.cpp index 46d9601..40d9a4f 100644 --- a/builtin/ground_plane_lighting/ground_plane_lighting.cpp +++ b/builtin/ground_plane_lighting/ground_plane_lighting.cpp @@ -283,7 +283,8 @@ struct Module: public interface::Module, public ground_plane_lighting::Interface { interface::VoxelRegistry *voxel_reg = ivoxelworld->get_voxel_reg(); //const auto &chunk_size_voxels = ivoxelworld->get_chunk_size_voxels(); - pv::Region chunk_region = ivoxelworld->get_chunk_region_voxels(chunk_p); + pv::Region chunk_region = + ivoxelworld->get_chunk_region_voxels(chunk_p); ground_plane_lighting::access(m_server, [&](ground_plane_lighting::Interface *igpl) diff --git a/builtin/main_context/api.h b/builtin/main_context/api.h index 880786a..5ce5047 100644 --- a/builtin/main_context/api.h +++ b/builtin/main_context/api.h @@ -40,6 +40,4 @@ namespace main_context }); } } - // vim: set noet ts=4 sw=4: - diff --git a/builtin/main_context/main_context.cpp b/builtin/main_context/main_context.cpp index 883e08b..2d7b0d1 100644 --- a/builtin/main_context/main_context.cpp +++ b/builtin/main_context/main_context.cpp @@ -61,8 +61,8 @@ struct Module: public interface::Module, public main_context::Interface magic::SharedPtr m_context; magic::SharedPtr m_engine; magic::SharedPtr m_scene; - sm_> - m_magic_event_handlers; + sm_ + > m_magic_event_handlers; uint64_t profiler_last_print_us = 0; @@ -152,7 +152,7 @@ struct Module: public interface::Module, public main_context::Interface magic_cache->SetResourceRouter( new BuildatResourceRouter(m_context, m_server)); - sub_magic_event(magic::E_LOGMESSAGE, + sub_magic_event(magic::E_LOGMESSAGE, Event::t("urho3d_log_redirect:message")); m_server->sub_event(this, Event::t("urho3d_log_redirect:message")); } @@ -224,7 +224,7 @@ struct Module: public interface::Module, public main_context::Interface { m_magic_event_handlers[buildat_event_type] = new interface::MagicEventHandler( - m_context, m_server, event_type, buildat_event_type); + m_context, m_server, event_type, buildat_event_type); } void* get_interface() diff --git a/builtin/network/network.cpp b/builtin/network/network.cpp index ae7be6d..c939548 100644 --- a/builtin/network/network.cpp +++ b/builtin/network/network.cpp @@ -331,7 +331,7 @@ void NetworkThread::run(interface::Thread *thread) (void)ok; // Unused network::access(m_module->m_server, [&](network::Interface *inetwork){ - for(int fd : active_sockets){ + for(int fd: active_sockets){ m_module->handle_active_socket(fd); } }); diff --git a/builtin/voxelworld/voxelworld.cpp b/builtin/voxelworld/voxelworld.cpp index 68c9512..fe331dc 100644 --- a/builtin/voxelworld/voxelworld.cpp +++ b/builtin/voxelworld/voxelworld.cpp @@ -421,7 +421,7 @@ struct Module: public interface::Module, public voxelworld::Interface const PODVector &rawbuf = var.GetBuffer(); ss_ data((const char*)&rawbuf[0], rawbuf.Size()); up_> volume = - interface::deserialize_volume(data); + interface::deserialize_volume(data); // Update collision shape interface::mesh::set_voxel_physics_boxes(n, context, *volume, m_voxel_reg.get()); @@ -832,7 +832,7 @@ struct Module: public interface::Module, public voxelworld::Interface const PODVector &buf = var.GetBuffer(); ss_ data((const char*)&buf[0], buf.Size()); up_> volume = - interface::deserialize_volume(data); + interface::deserialize_volume(data); pv::Vector3DInt32 voxel_p( p.getX() - chunk_p.getX() * m_chunk_size_voxels.getX(), @@ -888,7 +888,7 @@ struct Module: public interface::Module, public voxelworld::Interface // Set in buffer ChunkBuffer &buf = section->get_buffer(chunk_p, m_server, - &m_total_buffers_loaded); + &m_total_buffers_loaded); if(!buf.volume){ log_(disable_warnings ? LOG_DEBUG : LOG_WARNING, MODULE, "set_voxel() p=" PV3I_FORMAT ", v=%i: Couldn't get " @@ -1042,7 +1042,7 @@ struct Module: public interface::Module, public voxelworld::Interface // Get from buffer ChunkBuffer &buf = section->get_buffer(chunk_p, m_server, - &m_total_buffers_loaded); + &m_total_buffers_loaded); if(!buf.volume){ log_(disable_warnings ? LOG_DEBUG : LOG_WARNING, MODULE, "get_voxel() p=" PV3I_FORMAT ": Couldn't get " diff --git a/games/digger/main/main.cpp b/games/digger/main/main.cpp index 3de3ccf..19428af 100644 --- a/games/digger/main/main.cpp +++ b/games/digger/main/main.cpp @@ -282,7 +282,7 @@ struct Module: public interface::Module { /*main_context::access(m_server, [&](main_context::Interface *imc) { - Scene *scene = imc->get_scene(); + Scene *scene = imc->get_scene(); Node *n = scene->GetChild("Testbox"); auto p = n->GetPosition(); log_v(MODULE, "Testbox: (%f, %f, %f)", p.x_, p.y_, p.z_); diff --git a/src/impl/mesh.cpp b/src/impl/mesh.cpp index 803bd22..075bc77 100644 --- a/src/impl/mesh.cpp +++ b/src/impl/mesh.cpp @@ -844,6 +844,10 @@ void generate_voxel_physics_boxes( if(!def) throw Exception(ss_()+"Undefined voxel: "+itos(v_orig.get_id())); + + + + uint8_t v = (def && def->physically_solid); volume.setVoxelAt(x, y, z, v); } diff --git a/src/impl/thread.cpp b/src/impl/thread.cpp index 9315a51..b8dddf8 100644 --- a/src/impl/thread.cpp +++ b/src/impl/thread.cpp @@ -62,7 +62,7 @@ struct CThread: public Thread } // Interface - + void start() { interface::MutexScope ms(m_mutex); diff --git a/src/interface/magic_event_handler.h b/src/interface/magic_event_handler.h index 9be2c43..5aef147 100644 --- a/src/interface/magic_event_handler.h +++ b/src/interface/magic_event_handler.h @@ -70,3 +70,4 @@ namespace interface } }; } +// vim: set noet ts=4 sw=4: diff --git a/src/interface/server_config.h b/src/interface/server_config.h index 1c53dd8..f18aa91 100644 --- a/src/interface/server_config.h +++ b/src/interface/server_config.h @@ -9,4 +9,3 @@ namespace interface typedef server::Config ServerConfig; } // vim: set noet ts=4 sw=4: - diff --git a/src/ports/windows_compat.h b/src/ports/windows_compat.h index b681e5a..6cb64ae 100644 --- a/src/ports/windows_compat.h +++ b/src/ports/windows_compat.h @@ -11,8 +11,8 @@ static inline void usleep(unsigned int us) // Prefer using mingw-w64 with pthreads! #ifdef __WINPTHREADS_VERSION -#include -#include + #include + #include #else diff --git a/src/server/main.cpp b/src/server/main.cpp index 37c75fb..7647de4 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) next_tick_us = current_us; } interface::Event event("core:tick", - new interface::TickEvent(t_per_tick / 1e6)); + new interface::TickEvent(t_per_tick / 1e6)); state->emit_event(std::move(event)); } diff --git a/src/server/rccpp_util.cpp b/src/server/rccpp_util.cpp index 312eaa5..a4c65d7 100644 --- a/src/server/rccpp_util.cpp +++ b/src/server/rccpp_util.cpp @@ -70,3 +70,4 @@ ss_ hash_files(const sv_ &paths) } } +// vim: set noet ts=4 sw=4: diff --git a/src/server/urho3d_log_redirect.h b/src/server/urho3d_log_redirect.h index c4b8738..7808961 100644 --- a/src/server/urho3d_log_redirect.h +++ b/src/server/urho3d_log_redirect.h @@ -29,7 +29,7 @@ namespace urho3d_log_redirect void init() { - m_server->sub_magic_event(this, magic::E_LOGMESSAGE, + m_server->sub_magic_event(this, magic::E_LOGMESSAGE, Event::t("urho3d_log_redirect:message")); } @@ -42,7 +42,8 @@ namespace urho3d_log_redirect void on_message(const interface::MagicEvent &event) { int magic_level = event.magic_data.Find("Level")->second_.GetInt(); - ss_ message = event.magic_data.Find("Message")->second_.GetString().CString(); + ss_ message = + event.magic_data.Find("Message")->second_.GetString().CString(); int core_level = LOG_ERROR; if(magic_level == magic::LOG_DEBUG) core_level = LOG_DEBUG; @@ -56,3 +57,4 @@ namespace urho3d_log_redirect } }; } // urho3d_log_redirect +// vim: set noet ts=4 sw=4: