-void DBobView_setEntity( Entity& entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra ){
- DEntity trigger;
- trigger.LoadEPairList( &entity );
-
- DEPair* trigger_ep = trigger.FindEPairByKey( "targetname" );
-
- if ( trigger_ep ) {
- if ( !strcmp( trigger.m_Classname, "trigger_push" ) ) {
- DEPair* target_ep = trigger.FindEPairByKey( "target" );
- if ( target_ep ) {
- const scene::Path* entTarget = FindEntityFromTargetname( target_ep->value );
- if ( entTarget ) {
- if ( g_PathView ) {
- delete g_PathView;
- }
- g_PathView = new DBobView;
-
- Entity* target = Node_getEntity( entTarget->top() );
- if ( target != 0 ) {
- if ( !bNoUpdate ) {
- g_PathView->trigger = &entity;
- entity.attach( *g_PathView );
- g_PathView->target = target;
- target->attach( *g_PathView );
- }
- g_PathView->Begin( trigger_ep->value, target_ep->value, multiplier, points, varGravity, bNoUpdate, bShowExtra );
- }
- else{
- globalErrorStream() << "bobToolz PathPlotter: trigger_push ARGH\n";
- }
- }
- else{
- globalErrorStream() << "bobToolz PathPlotter: trigger_push target could not be found..\n";
- }
- }
- else{
- globalErrorStream() << "bobToolz PathPlotter: trigger_push has no target..\n";
- }
- }
- else{
- globalErrorStream() << "bobToolz PathPlotter: You must select a 'trigger_push' entity..\n";
- }
- }
- else{
- globalErrorStream() << "bobToolz PathPlotter: Entity must have a targetname.\n";
- }
- return;
+void DBobView_setEntity(Entity &entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra)
+{
+ DEntity trigger;
+ trigger.LoadEPairList(&entity);
+
+ DEPair *trigger_ep = trigger.FindEPairByKey("targetname");
+
+ if (trigger_ep) {
+ if (!strcmp(trigger.m_Classname, "trigger_push")) {
+ DEPair *target_ep = trigger.FindEPairByKey("target");
+ if (target_ep) {
+ const scene::Path *entTarget = FindEntityFromTargetname(target_ep->value);
+ if (entTarget) {
+ if (g_PathView) {
+ delete g_PathView;
+ }
+ g_PathView = new DBobView;
+
+ Entity *target = Node_getEntity(entTarget->top());
+ if (target != 0) {
+ if (!bNoUpdate) {
+ g_PathView->trigger = &entity;
+ entity.attach(*g_PathView);
+ g_PathView->target = target;
+ target->attach(*g_PathView);
+ }
+ g_PathView->Begin(trigger_ep->value, target_ep->value, multiplier, points, varGravity,
+ bNoUpdate, bShowExtra);
+ } else {
+ globalErrorStream() << "bobToolz PathPlotter: trigger_push ARGH\n";
+ }
+ } else {
+ globalErrorStream() << "bobToolz PathPlotter: trigger_push target could not be found..\n";
+ }
+ } else {
+ globalErrorStream() << "bobToolz PathPlotter: trigger_push has no target..\n";
+ }
+ } else {
+ globalErrorStream() << "bobToolz PathPlotter: You must select a 'trigger_push' entity..\n";
+ }
+ } else {
+ globalErrorStream() << "bobToolz PathPlotter: Entity must have a targetname.\n";
+ }
+ return;