if(!spritehit&&player[j].dead&&sprites[i]->alivetime>.1){
where=sprites[i]->oldposition;
where-=player[j].coords;
- if(!player[j].skeleton.free)where=DoRotation(where,0,-player[j].rotation,0);
+ if(!player[j].skeleton.free)where=DoRotation(where,0,-player[j].yaw,0);
startpoint=where;
where=sprites[i]->position;
where-=player[j].coords;
- if(!player[j].skeleton.free)where=DoRotation(where,0,-player[j].rotation,0);
+ if(!player[j].skeleton.free)where=DoRotation(where,0,-player[j].yaw,0);
endpoint=where;
movepoint=0;
start=sprites[i]->oldposition;
end=sprites[i]->position;
if(!spritehit)
- if(objects.model[k].LineCheck(&start,&end,&colpoint,&objects.position[k],&objects.rotation[k])!=-1){
- if(detail==2||(detail==1&&abs(Random()%4)==0)||(detail==0&&abs(Random()%8)==0))objects.model[k].MakeDecal(blooddecalfast,DoRotation(colpoint-objects.position[k],0,-objects.rotation[k],0),sprites[i]->size*1.6/*+abs((float)(Random()%100))/2400*/,.5,Random()%360);
+ if(objects.model[k].LineCheck(&start,&end,&colpoint,&objects.position[k],&objects.yaw[k])!=-1){
+ if(detail==2||(detail==1&&abs(Random()%4)==0)||(detail==0&&abs(Random()%8)==0))objects.model[k].MakeDecal(blooddecalfast,DoRotation(colpoint-objects.position[k],0,-objects.yaw[k],0),sprites[i]->size*1.6/*+abs((float)(Random()%100))/2400*/,.5,Random()%360);
DeleteSprite(i);
spritehit=1;
}
void Sprite::clearTextures()
{
- if (toothtexture) glDeleteTextures( 1, &toothtexture );
- if (cloudtexture) glDeleteTextures( 1, &cloudtexture );
- if (cloudimpacttexture) glDeleteTextures( 1, &cloudimpacttexture );
- if (bloodtexture) glDeleteTextures( 1, &bloodtexture );
- if (flametexture) glDeleteTextures( 1, &flametexture );
- if (bloodflametexture) glDeleteTextures( 1, &bloodflametexture );
- if (smoketexture) glDeleteTextures( 1, &smoketexture );
- if (snowflaketexture) glDeleteTextures( 1, &snowflaketexture );
- if (shinetexture) glDeleteTextures( 1, &shinetexture );
- if (splintertexture) glDeleteTextures( 1, &splintertexture );
- if (leaftexture) glDeleteTextures( 1, &leaftexture );
+ glDeleteTextures( 1, &toothtexture );
+ glDeleteTextures( 1, &cloudtexture );
+ glDeleteTextures( 1, &cloudimpacttexture );
+ glDeleteTextures( 1, &bloodtexture );
+ glDeleteTextures( 1, &flametexture );
+ glDeleteTextures( 1, &bloodflametexture );
+ glDeleteTextures( 1, &smoketexture );
+ glDeleteTextures( 1, &snowflaketexture );
+ glDeleteTextures( 1, &shinetexture );
+ glDeleteTextures( 1, &splintertexture );
+ glDeleteTextures( 1, &leaftexture );
}