Project

General

Profile

Revision 232

death of shooters

View differences:

proj.c
140 140
        ent_set_scale(DEFAULT_SCALE);
141 141

  
142 142
        gunner_t *shooter1 = gunner_ctor(bsp_shooter, bsp_pistol); if(shooter1 == NULL) printf("Failed to get shooter1\n");
143
        gunner_set_spawn(shooter1, 75, 75);
143 144
        gunner_set_pos(shooter1, 75, 75);
144 145

  
145 146
        gunner_t *shooter2 = gunner_ctor(bsp_shooter, bsp_nothing);
147
        gunner_set_spawn(shooter2, 975, 75);
146 148
        gunner_set_pos(shooter2, 775, 75);
147 149

  
148 150
        //bullet_t *bullet = bullet_ctor(get_bullet(), 400.0, 400.0, 2.0, -1.0);
......
184 186
                                if (no_interrupts % refresh_count_value == 0) {
185 187
                                    update_movement(map1, shooter1);
186 188
                                    //bullet_update_movement(bullet);
189

  
190
                                    if (no_interrupts % 180 == 0) gunner_set_pos(shooter2, 775, 75);
191

  
187 192
                                    update_game_state(map1, shooter2, bullet_list);
188 193

  
189 194
                                    if(map_collides_gunner(map1, shooter1)){
......
194 199
                                        printf("Bullet Collide with Shooter\n");
195 200
                                        gunner_set_curr_health(shooter1, gunner_get_curr_health(shooter1) - bullet_get_damage(bullet));
196 201
                                    }*/
197

  
198 202
                                    update_scale();
199 203

  
200 204
                                    ent_set_origin(gunner_get_x(shooter1)-ent_get_XLength()/2.0,

Also available in: Unified diff