blue-nebula / base

Main repository of Blue Nebula, a fast-paced shooter with a unique parkour system. It is a fork of Red Eclipse and is free software.
https://blue-nebula.org
15 stars 6 forks source link

Remove variable `frameloops` #216

Open robalni opened 3 years ago

robalni commented 3 years ago

It was hard to understand what it meant and it was only used for determining whether the loop was in the first frame/iteration. Therefore I replaced it with variable first_frame which has a clearer purpose.

TheAssassin commented 3 years ago

The purpose of the new variable is indeed clearer. However, I ask myself, can't we just get rid of these ifs completely? Perhaps by moving the stuff outside the ifs before the loop (risking some code duplication, but I could imagine not all calls might be needed in the first frame anyway)?

voidanix commented 1 year ago

I think the question should really be _what is the actual purpose of frameloops aka first_frame_?

Removing the variable with its if-statements altogether results in the exact same behavior; plus, considering the int frames parameter does absolutely nothing, it could very likely be a remnant from old code.

If this can be dropped without regressions, then better take that route.