X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/a4fcf877753b034b1df7fa73d41388849fbc9000..e2a544ed0d4321fa6847389ea905f70b1655ee78:/Model/src/conduct.cpp?ds=sidebyside diff --git a/Model/src/conduct.cpp b/Model/src/conduct.cpp index 3628ac6..08098d4 100644 --- a/Model/src/conduct.cpp +++ b/Model/src/conduct.cpp @@ -53,9 +53,10 @@ void Conduct::recieve_msg(int msg, IConector *who, void *data) void Conduct::update(int dir) { // Si ya me actualice, no lo tengo que hacer de nuevo - if (updated) return; + if (updated) { + return; + } // Seteo mi actualizar en true para evitar entrar de nuevo - actual_flow = 99999; updated = true; actual_flow = max_flow; send_msg(OUT, MSG_QUERY_MAX_FLOW_OUT, (void *)&actual_flow); @@ -70,15 +71,11 @@ void Conduct::simulate() return; } - std::list::iterator i = in_list.begin(); - if (i != in_list.end()) { - PlantItem *o = (PlantItem *)(*i); - set_color( o->get_color() ); - } #ifdef DEBUG std::cout << name << "::Flujo actual = " << actual_flow << " de " << max_flow << std::endl; #endif updated = false; + color_updated = false; }