Revision 342
identified error
proj_func.c | ||
---|---|---|
44 | 44 |
ret->remote_health = (int16_t)gunner_get_health (remote); |
45 | 45 |
ret->remote_current_health = (int16_t)gunner_get_curr_health(remote); |
46 | 46 |
|
47 |
ret->no_bullets = 0; |
|
47 |
//ret->no_bullets = 0;
|
|
48 | 48 |
|
49 | 49 |
return ret; |
50 | 50 |
} |
51 | 51 |
|
52 | 52 |
void host_info_dtor(host_info_t *p) { |
53 | 53 |
if (p==NULL) return; |
54 |
|
|
54 |
/* |
|
55 | 55 |
if ((p->bullets_x) != NULL){ free(p->bullets_x); p->bullets_x = NULL; } |
56 | 56 |
|
57 | 57 |
if ((p->bullets_y) != NULL){ free(p->bullets_y); p->bullets_y = NULL; } |
... | ... | |
61 | 61 |
if ((p->bullets_vy) != NULL){ free(p->bullets_vy); p->bullets_vy = NULL; } |
62 | 62 |
|
63 | 63 |
if ((p->bullets_shooter) != NULL){ free(p->bullets_shooter); p->bullets_shooter = NULL; } |
64 |
|
|
64 |
*/ |
|
65 | 65 |
free(p); |
66 | 66 |
} |
67 | 67 |
|
... | ... | |
318 | 318 |
return atan2(gunner_get_y_screen(p) - mouse_y, mouse_x - gunner_get_x_screen(p)); |
319 | 319 |
} |
320 | 320 |
|
321 |
void build_host_structure(host_info_t *p, gunner_t *host, gunner_t *remote, list_t *bullet_list) {
|
|
321 |
void build_host_structure(host_info_t *p, gunner_t *host, gunner_t *remote) { |
|
322 | 322 |
// host |
323 | 323 |
p->host_x = (int16_t)gunner_get_x (host); |
324 | 324 |
p->host_y = (int16_t)gunner_get_y (host); |
... | ... | |
332 | 332 |
p->remote_angle = (int16_t)gunner_get_angle (remote); |
333 | 333 |
p->remote_health = (int16_t)gunner_get_health (remote); |
334 | 334 |
p->remote_current_health = (int16_t)gunner_get_curr_health(remote); |
335 |
|
|
335 |
/* |
|
336 | 336 |
// bullets |
337 | 337 |
size_t sz = list_size(bullet_list); |
338 | 338 |
p->no_bullets = sz; |
... | ... | |
354 | 354 |
it = list_node_next(it); |
355 | 355 |
i++; |
356 | 356 |
} |
357 |
*/ |
|
357 | 358 |
} |
358 | 359 |
|
359 | 360 |
void build_remote_structure(remote_info_t *p, keys_t *keys, double angle) { |
Also available in: Unified diff