Page 1 of 1

Mod-Definable slopeMod and depthMod

Posted: 13 Jul 2008, 10:46
by Evil4Zerggin
These control how much a unit is slowed when on a slope or underwater. Could someone make them definable mod-side inside the moveDefs? Currently:
rts\Sim\MoveTypes\MoveInfo.cpp wrote:md->depthMod = 0.1f;
...
md->slopeMod = 4.0f / (md->maxSlope + 0.001f);
It would make making amphibious units move as fast underwater as they do on land much easier. Unfortunately, I'm not sure how to change it to the way I want it to work. Is it simply a matter of changing the two lines to
rts\Sim\MoveTypes\MoveInfo.cpp wrote:md->depthMod = moveTable.GetFloat("depthMod", 0.1f);
...
md->slopeMod = moveTable.GetFloat("slopeMod", 4.0f / (md->maxSlope + 0.001f));

Re: Mod-Definable slopeMod and depthMod

Posted: 13 Jul 2008, 10:59
by Evil4Zerggin
On second thought, it might be able to change this through LUA... let me check.

Edit: Hmm... can't figure it out.

Re: Mod-Definable slopeMod and depthMod

Posted: 13 Jul 2008, 17:05
by Kloot
Evil4Zerggin wrote:Is it simply a matter of changing the two lines to
rts\Sim\MoveTypes\MoveInfo.cpp wrote:md->depthMod = moveTable.GetFloat("depthMod", 0.1f);
...
md->slopeMod = moveTable.GetFloat("slopeMod", 4.0f / (md->maxSlope + 0.001f));
Yep. You can define them in moveinfo.tdf / movedefs.lua now.

Re: Mod-Definable slopeMod and depthMod

Posted: 13 Jul 2008, 17:43
by Evil4Zerggin
Thanks Kloot! The days of our COB hack are numbered.