+ tmp = 0.0f;
+ who->recieve_msg(MSG_RESPONSE_MAX_FLOW, this, &tmp);
+ if (in_on_zero == 1) {
+ if (in_ready == 0)
+ tmp = max_flow;
+ else
+ tmp = actual_flow/2.0f;
+ }
+ send_msg(OUT, MSG_QUERY_MAX_FLOW_OUT, &tmp);
+ } else {
+ switch (in_on_zero) {
+ case 0:
+ actual_flow = (m_data<actual_flow)?m_data:actual_flow;
+ actual_flow = (actual_flow<max_flow)?actual_flow:max_flow;
+ break;
+ case 1:
+ if (in_ready == 1)
+ actual_flow = actual_flow/2.0f;
+ else
+ actual_flow = max_flow/2.0f;
+ break;
+ case 2:
+ actual_flow = 0;
+ }
+ send_msg(OUT, MSG_QUERY_MAX_FLOW_OUT, &actual_flow);
+ tmp = (in_on_zero==0)?actual_flow/2.0f:actual_flow;
+ who->recieve_msg(MSG_RESPONSE_MAX_FLOW, this, &tmp);