mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
r_part.c (R_EntityParticles): fix undefined behavior in the loop
init'ing avelocities, thanks to a -Waggressive-loop-optimizations warning from gcc-4.8. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@842 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
1aab55dd25
commit
d5c22884ab
1 changed files with 6 additions and 2 deletions
|
@ -202,8 +202,12 @@ void R_EntityParticles (entity_t *ent)
|
|||
|
||||
if (!avelocities[0][0])
|
||||
{
|
||||
for (i = 0; i < NUMVERTEXNORMALS*3; i++)
|
||||
avelocities[0][i] = (rand() & 255) * 0.01;
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++)
|
||||
{
|
||||
avelocities[i][0] = (rand() & 255) * 0.01;
|
||||
avelocities[i][1] = (rand() & 255) * 0.01;
|
||||
avelocities[i][2] = (rand() & 255) * 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++)
|
||||
|
|
Loading…
Reference in a new issue