Project

General

Profile

Revision 330

dying after some time

View differences:

proj.c
410 410
    remote_info_dtor(remote_info);
411 411
    bullet_info_dtor(bullet_info);
412 412

  
413
    nctp_set_processor(NULL);
414

  
413 415
    timer_dtor(in_game_timer); in_game_timer = NULL;
414 416

  
415 417
    return 0;
......
467 469

  
468 470
                    //hltp_send_remote_info(remote_info);
469 471

  
470
                    gunner_set_pos(shooter1, host_info->remote_x, host_info->remote_y);
471
                    gunner_set_angle(shooter1, host_info->remote_angle);
472
                    gunner_set_health(shooter1, host_info->remote_health);
473
                    gunner_set_curr_health(shooter1, host_info->remote_current_health);
472
                    gunner_set_pos(shooter1, (double)host_info->remote_x, (double)host_info->remote_y);
473
                    gunner_set_angle(shooter1, (double)host_info->remote_angle);
474
                    gunner_set_health(shooter1, (double)host_info->remote_health);
475
                    gunner_set_curr_health(shooter1, (double)host_info->remote_current_health);
474 476

  
475
                    gunner_set_pos(shooter2, host_info->host_x, host_info->host_y);
476
                    gunner_set_angle(shooter2, host_info->host_angle);
477
                    gunner_set_health(shooter2, host_info->host_health);
478
                    gunner_set_curr_health(shooter2, host_info->host_current_health);
477
                    gunner_set_pos(shooter2, (double)host_info->host_x, (double)host_info->host_y);
478
                    gunner_set_angle(shooter2, (double)host_info->host_angle);
479
                    gunner_set_health(shooter2, (double)host_info->host_health);
480
                    gunner_set_curr_health(shooter2, (double)host_info->host_current_health);
479 481

  
480 482
                    ent_set_origin(gunner_get_x(shooter1)-ent_get_XLength()/2.0,
481 483
                                   gunner_get_y(shooter1)-ent_get_YLength()/2.0);
482 484

  
483 485
                    for (size_t j = 0; j < host_info->no_bullets; j++) {
484 486
                        if (host_info->bullets_shooter[j]) { // remote
485
                            bullet_t *bullet = bullet_ctor(shooter1, bsp_bullet, host_info->bullets_x[j], host_info->bullets_y[j], host_info->bullets_vx[j], host_info->bullets_vy[j]);
487
                            bullet_t *bullet = bullet_ctor(shooter1, bsp_bullet, (double)host_info->bullets_x[j], (double)host_info->bullets_y[j], (double)host_info->bullets_vx[j], (double)host_info->bullets_vy[j]);
486 488
                            list_insert(bullet_list, list_end(bullet_list), bullet);
487 489
                        } else { // host
488
                            bullet_t *bullet = bullet_ctor(shooter2, bsp_bullet, host_info->bullets_x[j], host_info->bullets_y[j], host_info->bullets_vx[j], host_info->bullets_vy[j]);
490
                            bullet_t *bullet = bullet_ctor(shooter2, bsp_bullet, (double)host_info->bullets_x[j], (double)host_info->bullets_y[j], (double)host_info->bullets_vx[j], (double)host_info->bullets_vy[j]);
489 491
                            list_insert(bullet_list, list_end(bullet_list), bullet);
490 492
                        }
491 493
                    }
......
547 549
    remote_info_dtor(remote_info);
548 550
    bullet_info_dtor(bullet_info);
549 551

  
552
    nctp_set_processor(NULL);
553

  
550 554
    timer_dtor(in_game_timer); in_game_timer = NULL;
551 555

  
552 556
    return 0;

Also available in: Unified diff