Mod-Definable slopeMod and depthMod

Mod-Definable slopeMod and depthMod

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Mod-Definable slopeMod and depthMod

Post 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));
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Mod-Definable slopeMod and depthMod

Post by Evil4Zerggin »

On second thought, it might be able to change this through LUA... let me check.

Edit: Hmm... can't figure it out.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Mod-Definable slopeMod and depthMod

Post 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.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Mod-Definable slopeMod and depthMod

Post by Evil4Zerggin »

Thanks Kloot! The days of our COB hack are numbered.
Post Reply

Return to “Feature Requests”