For loop doesn't loop in particlegeo.cpp

A place to post suggestions for new features, new bugs, and comments about the existing code.
Post Reply
SpaceJunk
Posts: 759
Joined: Wed Apr 06, 2005 7:00 am
Location: Collision orbit

Post by SpaceJunk »

I was browsing the R6 source to see what could I understand from my experience with PHP, and noticed this in particlegeo.cpp for spark effects:

Code: Select all

// draw multiple copies of the effect to produce a blur effect
for (int i = 0; i < 1; i++)
That for isn't doing what the comment says, it just iterates once. Either x should be increased in i < x or the loop could be just removed, because it doesn't really loop.
Image
TurkeyXIII
Posts: 1460
Joined: Thu Dec 06, 2007 3:18 am
Location: Melbourne, Aus

Post by TurkeyXIII »

:lol:

Best for loop ever!
QUOTE (Randall Munroe)14.2: Turkey consumption rate of the average American in milligrams per minute[/quote]
Image
HSharp
Posts: 5192
Joined: Fri Aug 11, 2006 11:18 am
Location: Brum, UK

Post by HSharp »

A single lap round the circuit is still a loop :P
Image
Image
SpaceJunk
Posts: 759
Joined: Wed Apr 06, 2005 7:00 am
Location: Collision orbit

Post by SpaceJunk »

Will this completely outraging mistake be fixed? I want Allegiance to put sparks on my sparks.
Image
Clay_Pigeon
Posts: 3211
Joined: Tue Mar 29, 2005 8:00 am
Location: my pod

Post by Clay_Pigeon »

I suspect that the loop was put in place in case it was found that multiple iterations produced a better effect. Really, I doubt that the overhead is substantial.
Last edited by Clay_Pigeon on Thu Dec 30, 2010 7:43 pm, edited 1 time in total.
Image
"Therefore I will boast all the more gladly about my weaknesses, so that Christ's power may rest on me." -2 Cor 12:9
"Never know how long I've waited, anticipated your smile pressed against mine." -Running
Post Reply