diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2010-06-01 02:35:22 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2010-06-01 02:35:22 +0400 |
commit | 05b92f0fc90b5f2cd5d933f97df20c774b42479f (patch) | |
tree | 2f3870936365c1c727e19e2a44891d323d57b0dc /source/blender/blenkernel | |
parent | d7a701c2c5ffbe9313431c6367a264e54136accb (diff) |
Added new actuator type for following steering behaviors: seek, flee, path following; renamed KX_Pathfinder to KX_NavMeshObject
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/sca.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index 5a06c251b88..6a43251efdd 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -468,6 +468,8 @@ void init_actuator(bActuator *act) case ACT_ARMATURE: act->data = MEM_callocN(sizeof( bArmatureActuator ), "armature act"); break; + case ACT_STEERING: + act->data = MEM_callocN(sizeof( bSteeringActuator), "steering act"); default: ; /* this is very severe... I cannot make any memory for this */ /* logic brick... */ @@ -611,6 +613,7 @@ void sca_remove_ob_poin(Object *obt, Object *ob) bMessageActuator *ma; bParentActuator *para; bArmatureActuator *aa; + bSteeringActuator *sta; sens= obt->sensors.first; while(sens) { @@ -658,6 +661,11 @@ void sca_remove_ob_poin(Object *obt, Object *ob) if (aa->target == ob) aa->target = NULL; if (aa->subtarget == ob) aa->subtarget = NULL; break; + case ACT_STEERING: + sta = act->data; + if (sta->target==ob) sta->target = NULL; + if (sta->navmesh==ob) sta->navmesh = NULL; + break; } act= act->next; } |