Break coding style
This commit is contained in:
parent
8c864c6ac9
commit
b50656f505
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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)
|
||||
|
@ -40,6 +40,4 @@ namespace main_context
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// vim: set noet ts=4 sw=4:
|
||||
|
||||
|
@ -61,8 +61,8 @@ struct Module: public interface::Module, public main_context::Interface
|
||||
magic::SharedPtr<magic::Context> m_context;
|
||||
magic::SharedPtr<magic::Engine> m_engine;
|
||||
magic::SharedPtr<magic::Scene> m_scene;
|
||||
sm_<Event::Type, magic::SharedPtr<interface::MagicEventHandler>>
|
||||
m_magic_event_handlers;
|
||||
sm_<Event::Type, magic::SharedPtr<interface::MagicEventHandler>
|
||||
> 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()
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -421,7 +421,7 @@ struct Module: public interface::Module, public voxelworld::Interface
|
||||
const PODVector<unsigned char> &rawbuf = var.GetBuffer();
|
||||
ss_ data((const char*)&rawbuf[0], rawbuf.Size());
|
||||
up_<pv::RawVolume<VoxelInstance>> 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<unsigned char> &buf = var.GetBuffer();
|
||||
ss_ data((const char*)&buf[0], buf.Size());
|
||||
up_<pv::RawVolume<VoxelInstance>> 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 "
|
||||
|
@ -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_);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ struct CThread: public Thread
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
|
||||
void start()
|
||||
{
|
||||
interface::MutexScope ms(m_mutex);
|
||||
|
@ -70,3 +70,4 @@ namespace interface
|
||||
}
|
||||
};
|
||||
}
|
||||
// vim: set noet ts=4 sw=4:
|
||||
|
@ -9,4 +9,3 @@ namespace interface
|
||||
typedef server::Config ServerConfig;
|
||||
}
|
||||
// vim: set noet ts=4 sw=4:
|
||||
|
||||
|
@ -11,8 +11,8 @@ static inline void usleep(unsigned int us)
|
||||
// Prefer using mingw-w64 with pthreads!
|
||||
#ifdef __WINPTHREADS_VERSION
|
||||
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#else
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -70,3 +70,4 @@ ss_ hash_files(const sv_<ss_> &paths)
|
||||
}
|
||||
|
||||
}
|
||||
// vim: set noet ts=4 sw=4:
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user