Floating features

Floating features

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Floating features

Post by zerver »

After fixing the bug with floating features not working, I noticed that features default to floating=true. MB we should change this? The stones on SSB are floating... :mrgreen:

Code: Select all

	//this seem to be the closest thing to floating that ta wreckage contains
	fd->floating = fdTable.GetBool("nodrawundergray", true);
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Floating features

Post by zwzsg »

Only if you check beforehand that there isn't any map or mod that relies on the default.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Floating features

Post by lurker »

If it doesn't work, how could they?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Floating features

Post by zwzsg »

I dunno, maybe it used to work long ago?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Floating features

Post by lurker »

If everything from now to SSB and possibly older depends on them not floating, then the default should be that.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Floating features

Post by yuritch »

In my experience (not with regular features, but with unit corpses only) the floating was controlled by the blocking tag. If the corpse was blocking=1, the feature would float (stay on the surface), if it was blocking=0, it would sink to the bottom.
At least that's the behaviour in 0.78 (and is the way ship corpses in S'44 for example are set). Is that going to change?
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Floating features

Post by zerver »

Yeah, this blocking requirement is still in the code. I'm not 100% sure about the reason behind it. I have no plans to change it.

Another possibility would be to dynamically set the floating tag on a per map basis depending on the initial positions of the features. If any feature was placed below the water surface, consider this type of feature to be non-floating. This should only be done if the feature does not explicitly define the floating property.
Post Reply

Return to “Engine”