Detour: fix bug with steering actuator: object pointer not removed.

This commit is contained in:
Benoit Bolsee
2011-09-27 17:47:41 +00:00
parent 78dc35cf29
commit f2c2ba7ef3
2 changed files with 7 additions and 0 deletions

View File

@@ -641,6 +641,8 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
bMessageActuator *ma;
bParentActuator *para;
bArmatureActuator *aa;
bSteeringActuator *sta;
sens= obt->sensors.first;
while(sens) {
@@ -688,6 +690,10 @@ 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->navmesh == ob) sta->navmesh = NULL;
if (sta->target == ob) sta->target = NULL;
}
act= act->next;
}

View File

@@ -1747,6 +1747,7 @@ static int get_col_actuator(int type)
case ACT_CONSTRAINT: return TH_PANEL;
case ACT_STATE: return TH_PANEL;
case ACT_ARMATURE: return TH_PANEL;
case ACT_STEERING: return TH_PANEL;
default: return TH_PANEL;
}
}