Fix all remaining spots which give int-division warnings.
Spots commented with # warning-ignore:integer_division were upgraded to use the proper Godot 4 version of that command (@warning_ignore("integer_division")).
I'm assuming other erroring divisions were expected to divide as float, so any such spots have been upgraded with the required casts to make that happen.
A lot of these warnings came from spots that were using get_window().size. Many of them called this function multiple times per function, or even per line, and that seems a bit stinky...so I rewrote them to call once, convert to a float vector, then reuse the converted vector. Also saves horizontal real estate in the scripts.
Description of changes
Fix all remaining spots which give int-division warnings.
Spots commented with
# warning-ignore:integer_division
were upgraded to use the proper Godot 4 version of that command (@warning_ignore("integer_division")
).I'm assuming other erroring divisions were expected to divide as float, so any such spots have been upgraded with the required casts to make that happen.
A lot of these warnings came from spots that were using
get_window().size
. Many of them called this function multiple times per function, or even per line, and that seems a bit stinky...so I rewrote them to call once, convert to a float vector, then reuse the converted vector. Also saves horizontal real estate in the scripts.