| 2449 | } |
| 2450 | |
| 2451 | void BattleView::debugShot(Vec3<float> velocity) |
| 2452 | { |
| 2453 | auto blaster = StateRef<AEquipmentType>(state.get(), "AEQUIPMENTTYPE_DEBUGGER_CANNON"); |
| 2454 | fw().soundBackend->playSample(blaster->fire_sfx, selectedTilePosition); |
| 2455 | velocity *= blaster->speed * PROJECTILE_VELOCITY_MULTIPLIER; |
| 2456 | Vec3<float> position = {0.5f, 0.5f, 0.5f}; |
| 2457 | position += selectedTilePosition; |
| 2458 | auto p = mksp<Projectile>( |
| 2459 | blaster->guided ? Projectile::Type::Missile : Projectile::Type::Beam, |
| 2460 | StateRef<BattleUnit>(state.get(), state->current_battle->units.begin()->first), |
| 2461 | StateRef<BattleUnit>(), position + velocity, position, velocity, blaster->turn_rate, |
| 2462 | blaster->ttl, blaster->damage, blaster->projectile_delay, blaster->explosion_depletion_rate, |
| 2463 | blaster->tail_size, blaster->projectile_sprites, blaster->impact_sfx, |
| 2464 | blaster->explosion_graphic, blaster->damage_type); |
| 2465 | state->current_battle->map->addObjectToMap(p); |
| 2466 | state->current_battle->projectiles.insert(p); |
| 2467 | } |
| 2468 | |
| 2469 | void BattleView::orderMove(Vec3<int> target, bool strafe, bool demandGiveWay) |
| 2470 | { |
nothing calls this directly
no test coverage detected