Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions code/weapon/beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3962,15 +3962,18 @@ void beam_handle_collisions(beam *b)
if (wi->flash_impact_weapon_expl_effect.isValid()) {
auto particleSource = particle::ParticleManager::get()->createSource(wi->flash_impact_weapon_expl_effect);
particleSource->setHost(beam_hit_make_effect_host(b, &Objects[target], b->f_collisions[idx].cinfo.hit_submodel, &b->f_collisions[idx].cinfo.hit_point_world, &b->f_collisions[idx].cinfo.hit_point));
particleSource->setNormal(worldNormal);
// TODO: Commenting out until the collision code can be enhanced to return a valid normal when a beam collides with an edge.
// (This can happen when a slash beam moves off the edge of a model; edge_hit will be true and hit_normal will be 0,0,0.)
// particleSource->setNormal(worldNormal);
particleSource->setTriggerRadius(width);
particleSource->finishCreation();
}

if(do_expl){
auto particleSource = particle::ParticleManager::get()->createSource(wi->impact_weapon_expl_effect);
particleSource->setHost(beam_hit_make_effect_host(b, &Objects[target], b->f_collisions[idx].cinfo.hit_submodel, &b->f_collisions[idx].cinfo.hit_point_world, &b->f_collisions[idx].cinfo.hit_point));
particleSource->setNormal(worldNormal);
// TODO: see comment above
// particleSource->setNormal(worldNormal);
particleSource->setTriggerRadius(width);
particleSource->finishCreation();
}
Expand Down Expand Up @@ -4026,7 +4029,8 @@ void beam_handle_collisions(beam *b)
auto particleSource = particle::ParticleManager::get()->createSource(wi->piercing_impact_effect);

particleSource->setHost(beam_hit_make_effect_host(b, &Objects[target], b->f_collisions[idx].cinfo.hit_submodel, &b->f_collisions[idx].cinfo.hit_point_world, &b->f_collisions[idx].cinfo.hit_point));
particleSource->setNormal(worldNormal);
// TODO: see comment above
// particleSource->setNormal(worldNormal);
particleSource->setTriggerRadius(width);
particleSource->finishCreation();
}
Expand Down
Loading