just to let you know... I'm on to something... i got flashers on missiles working... however it also solves the problem with flashers on subentities.
but these (the flashers) are rotated incorrectly, so it looks stupid.. And I wouldn't be surprised if there where alot of ships with flashers on their Subentities...
It was the draw distance that was the culprit... it is checked incorrectly and for a 2nd time in
ParticleEntity.m
Code: Select all
- (void) drawEntity:(BOOL) immediate:(BOOL) translucent;
{
if (UNIVERSE == nil || [UNIVERSE breakPatternHide]) return;
//if ((particle_type == PARTICLE_FLASHER)&&(zero_distance > no_draw_distance)) return; // TOO FAR AWAY TO SEE
//allready checked in drawSubEntity Frame...
if (translucent)
here you can see it with my fix... there is no need for this check as it is alreadt done correctly in
Code: Select all
- (void) drawSubEntity:(BOOL) immediate:(BOOL) translucent
{
if (particle_type == PARTICLE_EXHAUST)
{
if (translucent)
[self drawExhaust2];
return;
}
Entity *my_owner = [self owner];
if ([self isSubEntity] && my_owner)
{
// this test provides an opportunity to do simple LoD culling
zero_distance = [my_owner zeroDistance];
if (zero_distance > no_draw_distance)
return; // TOO FAR AWAY TO DRAW
}
also I removed the while loop. like this in ParticleEntity.m
Code: Select all
if (particle_type == PARTICLE_FLASHER && [self status] != STATUS_INACTIVE)
{
Vector abspos = position; // in control of it's own orientation
int view_dir = [UNIVERSE viewDirection];
Entity *last = nil;
Entity *father = my_owner;
OOMatrix r_mat;
OOMatrix temp_matrix;
//while ((father) && (father != last))
//{ orientation.w = -orientation.w; //test
r_mat = [father drawRotationMatrix];
abspos = vector_add(OOVectorMultiplyMatrix(abspos, r_mat), [father position]);
// last = father;
// father = [father owner];
//}
that activates the flashers on subentities... what exactly is going on inside that loop is a bit out of my understanding..
Either it rotates the flashers in such a manner that they are practically invisible... which is what I think is happening.. Now if only i knew how to flip them...
here is a picture of the incorrect rotated flashers
Here is a picture of a correct flasher trailed by an incorrect one.. attached to a missile launched by the player ship. not spawned as submunition...