2025-08-08 15:48 CEST

spring: develop d3b7286b Diff ] Back to Repository ]
Author Committer Branch Timestamp Parent
rtri rtri develop 2016-01-30 16:54:40 develop 4394510b
Changeset add Spring.SetFeatureMoveCtrl(number featureID [, args]) -> nil, closes 0000231

args are as follows and all optional
    [, boolean enable -- if false, feature will not be moved by engine (but speed can be non-0)
    [, number3 velocityMask -- x,y,z (dimensions in which velocity is allowed to build)
    [, number3 impulseMask -- x,y,z (dimensions in which impulse is allowed to apply)
    [, number3 movementMask -- x,y,z (dimensions in which feature is allowed to move)
    ]]]]

note: {velocity,movement}Mask should be (1,0,1) and (0,1,0) for default trees

get rid of (isAt)finalHeight nonsense, features will now either fall to their
"native" height or can be positioned by Lua and then told not to move anymore

shorter + cleaner code
mod - doc/changelog.txt Diff ] File ]
mod - rts/Lua/LuaSyncedCtrl.cpp Diff ] File ]
mod - rts/Lua/LuaSyncedCtrl.h Diff ] File ]
mod - rts/Rendering/Env/AdvTreeDrawer.cpp Diff ] File ]
mod - rts/Rendering/Env/ITreeDrawer.cpp Diff ] File ]
mod - rts/Sim/Features/Feature.cpp Diff ] File ]
mod - rts/Sim/Features/Feature.h Diff ] File ]
mod - rts/Sim/Features/FeatureHandler.cpp Diff ] File ]
mod - rts/Sim/Units/Unit.cpp Diff ] File ]