edit sparkly fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2604 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-09-15 00:45:18 +00:00
parent c5836ced9a
commit 44cb59f383
+13 -7
View File
@@ -31,14 +31,20 @@ void renderent(entity &e)
void renderentities()
{
if(editmode)
if(editmode && !reflecting && !refracting && !stenciling)
{
loopv(ents)
static int lastsparkle = 0;
if(lastmillis - lastsparkle >= 20)
{
entity &e = ents[i];
if(e.type==NOTUSED) continue;
vec v(e.x, e.y, e.z);
particle_splash(2, 2, 40, v);
lastsparkle = lastmillis - (lastmillis%20);
loopv(ents)
{
entity &e = ents[i];
if(e.type==NOTUSED) continue;
vec v(e.x, e.y, e.z);
if(vec(v).sub(camera1->o).dot(camdir) < 0) continue;
particle_splash(2, 2, 40, v);
}
}
}
loopv(ents)
@@ -52,7 +58,7 @@ void renderentities()
}
else if(isitem(e.type))
{
if((!OUTBORD(e.x, e.y) && e.spawned) | editmode)
if((!OUTBORD(e.x, e.y) && e.spawned) || editmode)
{
renderent(e);
}