Skip to content

Commit

Permalink
fix warp flash option (#6494)
Browse files Browse the repository at this point in the history
  • Loading branch information
MjnMixael authored Dec 29, 2024
1 parent 755512c commit f1271cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions code/fireball/warpineffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ static auto WarpFlashOption __UNUSED = options::OptionBuilder<bool>("Graphics.Wa
.importance(65)
.finish();

bool warpin_show_flash() {
if (Using_in_game_options) {
return WarpFlashOption->getValue();
} else {
return Fireball_warp_flash;
}
}

void warpin_batch_draw_face( int texture, vertex *v1, vertex *v2, vertex *v3 )
{
vec3d norm;
Expand Down Expand Up @@ -76,7 +84,7 @@ void warpin_queue_render(model_draw_list *scene, object *obj, matrix *orient, ve
r *= (0.40f + Noise[noise_frame] * 0.30f);

// Bobboau's warp thingie, toggled by cmdline
if (Fireball_warp_flash) {
if (warpin_show_flash()) {
r += powf((2.0f * life_percent) - 1.0f, 24.0f) * max_radius * 1.5f;
}

Expand Down Expand Up @@ -159,7 +167,7 @@ void warpin_queue_render(model_draw_list *scene, object *obj, matrix *orient, ve
warpin_batch_draw_face( texture_bitmap_num, &verts[0], &verts[3], &verts[4] );
}

if (warp_ball_bitmap >= 0 && Fireball_warp_flash) {
if (warp_ball_bitmap >= 0 && warpin_show_flash()) {
flash_ball warp_ball(20, .1f,.25f, &orient->vec.fvec, pos, 4.0f, 0.5f);

float adg = (2.0f * life_percent) - 1.0f;
Expand Down

0 comments on commit f1271cd

Please sign in to comment.