Death Event Timing - Page 2

Death Event Timing

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

Moderator: Moderators

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Death Event Timing

Post by lurker »

Working on it.

But my, this death countdown code... This looks like it could be the cause of delayed unit deletions and related...
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Death Event Timing

Post by lurker »

http://evolutionrts.info/random/76b1+test2.7z

Removed:
Delayed deletion
Paralysis
Stopping midair

I'll add some tags for crashing later.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Death Event Timing

Post by Argh »

I'll test it. Crashing changes are going to need some doing, I'm sure.

I looked at the recent refactoring, it appears that ILMTitan is really straightening things out, it was a lot less of a complete spaghetti mess when I looked it over.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Death Event Timing

Post by lurker »

Either way, adding a simple damage intensity tag or a cob call to decide when to crash is easy to do. And another to set the health amount or percent for the crashing plane, I would think.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Death Event Timing

Post by Argh »

Hmm. Tried it. Good news: Planes will now sit there, running their Killed() event. Bad news: the AirMoveType keeps trying to make them move each frame, so they "shiver" as they get reset back to a velocity of zero (hmm, that sounds familiar with the air transports problems).

They need to inherit their last velocity, apply some drag (I'd make that a tag, or better yet, a COB SET variable, for some really interesting behaviors, such as giant spacecraft that slow down very gradually if hit at high speeds, but quickly at lower speeds, as a gameplay mechanic) and apply MyGravity, imo, becoming, in effect, ballistic projectiles that are running Killed(). When Killed() returns, then they should be deleted, imo, but until then the MoveType needs to have something set that basically says, "quit trying to manuever, stupid, you're dead", to prevent the shivering...
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Death Event Timing

Post by lurker »

Interesting. There must be code in another place that also screws up the movement. I'll get that fixed within a few days.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Death Event Timing

Post by KDR_11k »

lurker wrote:It looks like this code makes units currently in killed() instantly stop completely, even if in midair. Is that true?
Yep, happens for all units. Looks kinda silly for giant starships with lengthy explosions but meh.
Post Reply

Return to “Engine”