Project

General

Profile

Revision 214

fixed part of the problem with the bullet

View differences:

proj.c
109 109
    #endif
110 110

  
111 111
    #ifdef TELMO
112
        ent_set_scale(1.0);
112
        ent_set_scale(10.0);
113 113

  
114 114
        gunner_t *shooter1 = gunner_ctor(bsp_shooter, bsp_pistol); if(shooter1 == NULL) printf("Failed to get shooter1\n");
115 115
        gunner_set_pos(shooter1, 0, 0);
116
        ent_set_origin(gunner_get_x(shooter1)-ent_get_XLength()/2.0,
117
                       gunner_get_y(shooter1)-ent_get_YLength()/2.0);
118 116

  
119 117
        gunner_t *shooter2 = gunner_ctor(bsp_shooter, bsp_nothing);
120 118
        gunner_set_pos(shooter2, -50, -50);
......
122 120
        bullet_t *bullet = bullet_ctor(get_bullet());
123 121
        bullet_set_pos(bullet, 400, 400);
124 122

  
123
        ent_set_origin(bullet_get_x(bullet)-ent_get_XLength()/2.0,
124
                       bullet_get_y(bullet)-ent_get_YLength()/2.0);
125

  
125 126
        graph_clear_screen();
126 127
        gunner_draw(shooter1);
127 128
        sprite_draw(sp_crosshair);
......
161 162
                                if (no_interrupts % refresh_count_value == 0) {
162 163
                                    update_movement(shooter1);
163 164
                                    update_scale();
164
                                    ent_set_origin(gunner_get_x(shooter1)-ent_get_XLength()/2.0,
165
                                                   gunner_get_y(shooter1)-ent_get_YLength()/2.0);
166 165

  
166
                                    ent_set_origin(bullet_get_x(bullet)-ent_get_XLength()/2.0,
167
                                                   bullet_get_y(bullet)-ent_get_YLength()/2.0);
168

  
167 169
                                    sprite_set_pos(sp_crosshair, get_mouse_X(), get_mouse_Y());
168 170
                                    double angle = get_mouse_angle(shooter1);
169 171
                                    gunner_set_angle(shooter1, angle - M_PI_2);

Also available in: Unified diff