Flashers on missiles don't work in 1.72.2 - FIXED

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Capt. Slog wrote:
Eric,
Think this might be my problem with Admiral hunting. Flashers broken - broken subentity definition "*FLASHER*, this will cause the entity not to exist?
If you're talking about the many log entries about flashers using the wrong number of tokens...maybe it's the simplest workaround to remove those flashers from shipdata.plist ;)

Screet
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

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

Image

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...

Image
Bounty Scanner
Number 935
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Have you tried SVN2189? Cmdr James made a change that gives flasher to the missile when fired and all submunitions released in flight seem to carry flashers correctly now, too.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

hmm nope, ill give it a try... i thought i had allready done an svn up... but appearently something went wrong..

doh i recall now... it said skipped.... seems i forgot to enter cd trunk
Bounty Scanner
Number 935
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

updated to the svn 2189, it works. but the flashers did'nt flash, they where just on as he wrote... so:

I made a minor alteration i commented out the 2nd draw no distance fix...

I think when it updated it ran into that check, therefore the flasher did not flash.. they where just on, as cmr james described ??

its a really simple ajustment...

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
The last line here being the one commented out, as this is allready done in drawSubEntity

should I update that to the trunk... and if so how ?? but others might as well do it for me :-P
Bounty Scanner
Number 935
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

while we are at it.. Shouldn't flashers not be visible from far away ???

I made a specific check in the subEntityDraw function for if it where a flasher where it decides to draw or not draw... if a flasher, do always draw.. as long as the hierarchy top dog parent is drawn...

Of course on missiles it will disappear at 3-4 clicks because these are already small in size and will themselves disappear at that range.

but the flasher on witch point buoy is seen from beyond 25 clicks... :-P
Bounty Scanner
Number 935
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Frame wrote:
while we are at it.. Shouldn't flashers not be visible from far away ???
Yes, but I tihnk it was you who changed it?
Frame wrote:

Code: Select all

	//if ((particle_type == PARTICLE_FLASHER)&&(zero_distance > no_draw_distance))	return;	// TOO FAR AWAY TO SEE
	//allready checked in drawSubEntity Frame...
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

striked because one misunderstanding led to another

okay, this is me then... not understanding how all this works.. I did'nt think it would update on its own ????

I thought I had to invoke some sort of command... to do that... that means hands off approach for me.. because really. I do know about C++, i read some on Objective C, but all to little understand it...

good thing I left in a comment though..

:?
Last edited by Frame on Mon Jun 01, 2009 2:22 pm, edited 2 times in total.
Bounty Scanner
Number 935
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Cmdr James wrote:
Frame wrote:
while we are at it.. Shouldn't flashers not be visible from far away ???
Yes, but I tihnk it was you who changed it?
Frame wrote:

Code: Select all

	//if ((particle_type == PARTICLE_FLASHER)&&(zero_distance > no_draw_distance))	return;	// TOO FAR AWAY TO SEE
	//allready checked in drawSubEntity Frame...
ahh sorry you misunderstood... I have not send that to the trunk, and will not do so until someone "in charge" says its ok .

what you quoted is purely residing on my Harddrive I thought I had somehow updated the trunk with my modifications.
.
Bounty Scanner
Number 935
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Frame wrote:
ahh sorry you misunderstood... I have not send that to the trunk, and will not do so until someone "in charge" says its ok .

what you quoted is purely residing on my Harddrive I thought I had somehow updated the trunk with my modifications.
Just to make things clear on how it works, only the persons listed on the Berlios' Oolite project membership page can make changes to trunk. All others have read-only access.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

another_commander wrote:
Frame wrote:
ahh sorry you misunderstood... I have not send that to the trunk, and will not do so until someone "in charge" says its ok .

what you quoted is purely residing on my Harddrive I thought I had somehow updated the trunk with my modifications.
Just to make things clear on how it works, only the persons listed on the Berlios' Oolite project membership page can make changes to trunk. All others have read-only access.
What I thought as with a former project i once was attached too...

A C.. links unusable though.. something messed up when I clicked that link
firefox wrote:

Code: Select all

Secure Connection Failed

An error occurred during a connection to developer.berlios.de.

You have received an invalid certificate.  Please contact the server administrator or email correspondent and give them the following information:

Your certificate contains the same serial number as another certificate issued by the certificate authority.  Please get a new certificate containing a unique serial number.

(Error code: sec_error_reused_issuer_and_serial)

The page you are trying to view can not be shown because the authenticity of the

received data could not be verified.
    *  Please contact the web site owners to inform them of this problem.
Bounty Scanner
Number 935
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Yes, there is something messed up with the berlious key used for https. You can add an exeption for it, or you can use a webbrowser like IE that doesnt care.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

Actually, IE does care. The problem is Berlios is using a certificate signed by their own CA. That CA isn't in the trusted root CA lists for any OS.
Capt. Slog
Dangerous
Dangerous
Posts: 84
Joined: Sun Apr 26, 2009 10:24 pm

Post by Capt. Slog »

Screet wrote:

If you're talking about the many log entries about flashers using the wrong number of tokens...maybe it's the simplest workaround to remove those flashers from shipdata.plist ;)

Screet
Yup simple, sounds like me, done it already but the mission still seems broken. I can destroy the ship, hyperspace out and back, and it regenerates.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

I am happy to announce that the trunk fix seems to have worked and OSE's Photon Torpedo now really does look photonic!

Thanks guys, you're brilliant :D

Cheers

L
Post Reply