Skip to content

Commit f2bc71c

Browse files
committed
small optimization
1 parent f88e5c4 commit f2bc71c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/fireball/fireballs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,12 +1151,12 @@ static float cutscene_wormhole(float t) {
11511151
float fireball_wormhole_intensity(fireball *fb)
11521152
{
11531153
float t = fb->time_elapsed;
1154-
1155-
float rad = cutscene_wormhole(t / fb->warp_open_duration);
1154+
float rad;
11561155

11571156
fireball_info* fi = &Fireball_info[fb->fireball_info_index];
11581157

11591158
if (fi->warp_model_style == warp_style::CINEMATIC) {
1159+
rad = cutscene_wormhole(t / fb->warp_open_duration);
11601160
rad *= cutscene_wormhole((fb->total_time - t) / fb->warp_close_duration);
11611161
rad /= cutscene_wormhole(fb->total_time / (2.0f * fb->warp_open_duration));
11621162
rad /= cutscene_wormhole(fb->total_time / (2.0f * fb->warp_close_duration));

0 commit comments

Comments
 (0)