diff options
Diffstat (limited to 'source/blender/blenkernel/intern/sca.c')
-rw-r--r-- | source/blender/blenkernel/intern/sca.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index 12f82d041f9..202a236b431 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -391,6 +391,7 @@ void init_actuator(bActuator *act) bObjectActuator *oa; bRandomActuator *ra; bSoundActuator *sa; + bSteeringActuator *sta; if(act->data) MEM_freeN(act->data); act->data= 0; @@ -464,6 +465,16 @@ 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"); + sta = act->data; + sta->acceleration = 3.f; + sta->turnspeed = 120.f; + sta->dist = 1.f; + sta->velocity= 3.f; + sta->flag = ACT_STEERING_AUTOMATICFACING; + sta->facingaxis = 1; + break; default: ; /* this is very severe... I cannot make any memory for this */ /* logic brick... */ @@ -589,6 +600,11 @@ void set_sca_new_poins_ob(Object *ob) bPropertyActuator *pa= act->data; ID_NEW(pa->ob); } + else if(act->type==ACT_STEERING) { + bSteeringActuator *sta = act->data; + ID_NEW(sta->navmesh); + ID_NEW(sta->target); + } } act= act->next; } |