D3: Handling a shockwave

For Descent, Descent II and Descent3 level editing and modification assistance.
Post Reply
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

D3: Handling a shockwave

Post by Floyd »

does anyone know how to use the following array?

Code: Select all

obj->mtype.shock_info.damaged_list[i]
the struct is \"shockwave_info\" in \"object_external_struct.h\". unfortunately, there are no comments as to what it actually contains (handles? ids?). no matter what i do, if i read its contents in \"OnServerObjectDestroyed\", i read trash. :(
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Did you try to see if and how this data is used in other parts of the program? One way to find out would be to simply do a global file search for \"damaged_list\" in all D3 source files, set the program up in a debugger, set breakpoints on these lines and check where and why they get hit. All provided you have the source files and can debug the program.
Munk
DBB Ace
DBB Ace
Posts: 82
Joined: Tue Jan 28, 2003 3:01 am
Location: Germany

Post by Munk »

There is no source for D3 out.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Floyd,

where do you have that piece of code from, and how do you access the data it points to?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Floyd,

where do you have that piece of code from, and how do you access the data it points to?
User avatar
Foil
DBB Material Defender
DBB Material Defender
Posts: 4900
Joined: Tue Nov 23, 2004 3:31 pm
Location: Denver, Colorado, USA
Contact:

Post by Foil »

Diedel, it's from the D3 SDK code, if I'm not mistaken.

There are quite a few things in there that point to things in the full D3 source which we don't have access to.

It's interesting that you're always getting gobbledygook when looking that structure for objects... Hmm, here are a couple of thoughts I had:
- Could they be vector-values? Rather than storing handles/ids for objects damaged, could it be storing some type of directional value, indicating a speed/direction for the results of a shockwave?
- It could be an unused structure, maybe something planned as a D3 feature that was never implemented.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

mtype stores movement values. Probably that variable holds a handle (object array index) of an object receiving (splash) damage from a shockwave.

Is there any way to get the full D3 source code? You bet I'd be willing to fix any bugs/flaws in there.
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

yes, the struct is from the d3 sdk 1.4.
i've gotten a little further. after a while tryin to read that list from the weapon that caused a shockwave, i'm now reading the info from the shockwave (which is also an object). duh.
however, i only read one single entity from the list, at least the other values show 0, though that doesn't help much if one entity shows as 0...
strange is, that although i hit several objects at once, i always get only one entity in the list. my theory is, that it's actually the index to the object, neither ID nor handle (like the returned value of ObjectCreate). but there's not the object i was looking for at that index. this makes sense, as long as it's always the same number for each object. actually, it is - until i change the weapon. so the good news is, it's not totally random numbers anymore, just weapon specifically different.

it's not that great of a loss afterall, i can live with it. since descent handles shockwaves, it must be implemented somehow, just undocumented. or that struct is out of date, since i miss a damaged_objects_count or such.
i'll try one last idea: reading the struct straight from memory and see if it contains anything else.

thanks for the suggestions though :)

EDIT:
Diedel wrote:mtype stores movement values. Probably that variable holds a handle (object array index) of an object receiving (splash) damage from a shockwave.
that's what i initially derived from the arrays name. splash damage IS the shockwave object.

if there was a way to get hands on the source, D3 would not be at the state it is right now anymore ;)

UPDATE:
i checked the complete struct contents. it contains all zeros instead of that first byte. since it's reproducable, i'm sure it's the right array to look at. outrage could have done it different and have left and forgot that struct however.

nevermind ...
User avatar
Foil
DBB Material Defender
DBB Material Defender
Posts: 4900
Joined: Tue Nov 23, 2004 3:31 pm
Location: Denver, Colorado, USA
Contact:

Re:

Post by Foil »

Diedel wrote:Is there any way to get the full D3 source code? You bet I'd be willing to fix any bugs/flaws in there.
People have been trying to get the D3 source released for years. Barring some kind of miracle, it's probably not gonna happen.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

I know. :/

Is there a contact address with the guy(s) who have the D3 source code, and the rights to it? (Is it Kevin Bentley?)
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Diedel got DMB2, don't count him out yet. ;)
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Matt Toschlog owns the D3 source.
ImageImage
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Is there a way I can reach Matt?
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Re:

Post by DCrazy »

Grendel wrote:Matt Toschlog owns the D3 source.
Not anymore, I don't think, with Outrage's sale to THQ. Unless there was some special provision that handed him the source code, copyright was transferred to THQ when they absorbed Outrage.

Last time I emailed him about it he said that due to lawyer issues it would be nigh impossible. Then again, this is coming from the president of a company that wanted to license the D3 engine for $50,000. I can't imagine there NOT being lawyerly problems.
User avatar
d3jake
DBB Admiral
DBB Admiral
Posts: 1075
Joined: Tue Dec 21, 2004 10:08 am
Location: Minnesota, USA

Post by d3jake »

Perhaps while the source is in hands that may not know that it has it\\know the full value of it we should put in for it to be released, if they're not planning on using it, then maybe we can talk them into giving it up. Unless they'll do it like M$ did with Mechwarrior...
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post by Kyouryuu »

I honestly have no clue who owns the Descent 3 source at this point. Volition highlights Descents 1 and 2 on their main page, but not 3. Outrage was acquired by THQ and shut down after Alter Echo and I believe Alter Echo ran on a heavily modified Descent 3 engine. But THQ has nothing to do with the periodic re-duplication of the game and even if Alter Echo did run on Fusion, that doesn't necessarily imply that THQ thus owns Fusion.

Personally, I have to believe it is as DCrazy said because if Volition could release the source for FreeSpace, Outrage should have been able to do it for Descent 3 unless the terms were significantly different.
Post Reply