]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/conduct.cpp
-Se conectan como trompada!!!!!
[z.facultad/75.42/plaqui.git] / Constructor / conduct.cpp
index b286e684ef6968c109f5c362ea353bc64586d285..2493f32a24fc3506ca94d14c9e1f7353fd80e696 100644 (file)
@@ -104,6 +104,7 @@ void Conduct::save(FILE *archivo)
 
 bool Conduct::check_connection()
 {
 
 bool Conduct::check_connection()
 {
+       ConnectorType aux;
        CItem *_item0, *_item1;
        switch (get_img_actual()) {
                        case 0:
        CItem *_item0, *_item1;
        switch (get_img_actual()) {
                        case 0:
@@ -115,6 +116,9 @@ bool Conduct::check_connection()
                                connect_vec[1].type = is_other_connection_area( get_position_x()+get_image()->get_width()+5, get_position_y()+16, &_item1);
        }
        if ( connect_vec[0].type != UNDEF && connect_vec[1].type != UNDEF ) {
                                connect_vec[1].type = is_other_connection_area( get_position_x()+get_image()->get_width()+5, get_position_y()+16, &_item1);
        }
        if ( connect_vec[0].type != UNDEF && connect_vec[1].type != UNDEF ) {
+               aux = connect_vec[0].type; 
+               connect_vec[0].type = connect_vec[1].type;
+               connect_vec[1].type = aux;
                connect_vec[0].id_dest = _item0->get_id();
                connect_vec[1].id_dest = _item1->get_id();
                return ( is_connected = (connect_vec[0].type != connect_vec[1].type) );
                connect_vec[0].id_dest = _item0->get_id();
                connect_vec[1].id_dest = _item1->get_id();
                return ( is_connected = (connect_vec[0].type != connect_vec[1].type) );