Project

General

Profile

Revision 232

death of shooters

View differences:

proj_func.c
93 93
            list_node_t *aux = list_node_next(it);
94 94
            bullet = (bullet_t*)list_erase(bullet_list, it);
95 95
            gunner_set_curr_health(shooter, gunner_get_curr_health(shooter) - bullet_get_damage(bullet));
96
            if (gunner_get_curr_health(shooter) <= 0) {
97
                gunner_set_curr_health(shooter, gunner_get_health(shooter));
98
                gunner_set_pos(shooter, gunner_get_spawn_x(shooter), gunner_get_spawn_y(shooter));
99
            }
100

  
96 101
            free(bullet);
97 102
            it = aux;
98 103
            continue;

Also available in: Unified diff