6th Venom@Posted: Thu Sep 25, 2008 12:29 pm :
i got my hand on the water-physics code from Lloyd Markle (back in 2005), but as you know, it were 1.1 SDK code.
Of course i tried to apply the changes of water-physics source (27 files) to the 1.3.1 SDK, but then, compilation is impossible (errors).
I suppose i reapplied some 1.1 code over the 1.3.1 code that have nothing to do with water.

So, i'd like to know if someone ported it to 1.3.1 successfully, and could send the (windows) source to me?
Or how should i go to do it myself?
(my beginner's method were to compare files and apply changes... :roll: )

Any help'd be appreciated.

Ivan_the_B@Posted: Thu Sep 25, 2008 12:36 pm :
I suggest you to compare vanilla sdk1.1 with your code to find the differences. Use WinDiff to compare folders.
Then, apply the changes to 1.3.1 :D

6th Venom@Posted: Thu Sep 25, 2008 1:16 pm :
Windiff? ok thank you! :D

Pat AfterMoon@Posted: Thu Sep 25, 2008 4:39 pm :
I suggest you to use a 3-way comparison tool for this work.

It's typically for this usage.
It is intended to merging 2 files derivated from a same parent. In that case, the original is the SDK 1.1, the 1st child 1 is the water-physics code, and the 2nd child is the SDK 1.3.1

http://en.wikipedia.org/wiki/Comparison ... ison_tools

Ivan_the_B@Posted: Thu Sep 25, 2008 4:45 pm :
Thanks for the info! :wink:

6th Venom@Posted: Thu Sep 25, 2008 10:55 pm :
Did all the stuff by hand, and finally hit a wall of pain...

the damn "error LNK2019" and its cousin "error LNK2001" are (VC++ 2008 express) link errors.
After some google times, i understood that it is a) a forgotten include lib, or b) a wrong typo in the declaration and/or the call.
But i can't find out myself what can it be... here's an example code:
In Physics_Base.h:
   float               GetWaterLevelf() const;

In Physics_RigidBody.cpp:
   if( p->GetWaterLevelf() == 0.0f  ) {

By the way, the error message i get for this (i suppose it's for this one)
Fr (original message):
1>Physics_RigidBody.obj : error LNK2019: symbole externe non résolu "public: float __thiscall idPhysics_Base::GetWaterLevelf(void)const " (?GetWaterLevelf@idPhysics_Base@@QBEMXZ) référencé dans la fonction "void __cdecl RigidBodyDerivatives(float,void const *,float const *,float *)" (?RigidBodyDerivatives@@YAXMPBXPBMPAM@Z)

Eng (approx traduced):
1>Physics_RigidBody.obj : error LNK2019: External symbol not solved "public: float __thiscall idPhysics_Base::GetWaterLevelf(void)const " (?GetWaterLevelf@idPhysics_Base@@QBEMXZ) referenced in fonction "void __cdecl RigidBodyDerivatives(float,void const *,float const *,float *)" (?RigidBodyDerivatives@@YAXMPBXPBMPAM@Z)

Anyone understand this?

Edit: Thank you for the tool, Pat AfterMoon! :wink:

Ivan_the_B@Posted: Fri Sep 26, 2008 8:37 am :
You already have my mail address. Send the code and I'll see if I can understand why. :lol:

6th Venom@Posted: Sat Sep 27, 2008 11:40 pm :
After some "tweaks" on the 1.3.1 water_physics code by Ivan_the_B, we've been able to compile it, and water is now fully operationnal!

I'll update the test_water.map and repack everything tomorrow, then i'll upload it on megaupload for quick and direct uploads, then i'll send it to MODDB.COM and Doom 3 Files for futur users.

Every body say "thank you Ivan"!


6th Venom@Posted: Sun Sep 28, 2008 1:17 pm :
Here it come:

Happy swimming !

lowdragon@Posted: Sun Sep 28, 2008 3:42 pm :
Thought that was already done months ago ?!
How did you solved the part in "idPhysics_RigidBody::TestIfAtRest" ... iirc i had issues with differ "NO_MOVE_TIME" from "noMoveTime"
since one is "int" and the other "float" and didnt wanted to change those to avoid [uninspected behaviour] -
Like corpses catapulting out of the water as if they hitting a jumppad. :)

6th Venom@Posted: Sun Sep 28, 2008 5:47 pm :
Mmmmh, don't really know about your problem, since every "corpses" i looked was ok in the water with the 1.0 water code.
Did you define a density like 0.006 or so in the editor for your corpses?

This "mod", and the original one, come with some modified def files that balance monsters/ragdolls/moveables densities.

About this been done months ago, i didn't saw anything... and better have it two times than none! :D

Hemebond@Posted: Mon Sep 29, 2008 11:23 am :
Thank you for sharing with the community. Much appreciated.