Revision: 1598
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1598&view=rev
Author:   rorthomas
Date:     2011-01-26 01:44:56 +0000 (Wed, 26 Jan 2011)

Log Message:
-----------
fixed HT2 mode

Modified Paths:
--------------
    trunk/source/main/Beam.cpp

Modified: trunk/source/main/Beam.cpp
===================================================================
--- trunk/source/main/Beam.cpp  2011-01-26 01:11:31 UTC (rev 1597)
+++ trunk/source/main/Beam.cpp  2011-01-26 01:44:56 UTC (rev 1598)
@@ -2787,26 +2787,27 @@
                        if (state!=SLEEPING && state!=NETWORKED && 
state!=RECYCLE)
                        {
                                // calculate average position (and smooth)
-                               if(trucks[t]->freecinecamera > 0)
+                               if(freecinecamera > 0)
                                {
                                        // fix for detaching beams
-                                       trucks[t]->position = 
trucks[t]->nodes[cinecameranodepos[0]].AbsPosition - cinecam_avg_offset;
-                                       for (int n=0; n<trucks[t]->free_node; 
n++)
+                                       position = 
nodes[cinecameranodepos[0]].AbsPosition - cinecam_avg_offset;
+                                       for (int n=0; n<free_node; n++)
                                        {
-                                               trucks[t]->nodes[n].smoothpos = 
trucks[t]->nodes[n].AbsPosition;
+                                               nodes[n].smoothpos = 
nodes[n].AbsPosition;
                                        }
+
                                } else
                                {
                                        Vector3 aposition = Vector3::ZERO;
-                                       for (int n=0; n<trucks[t]->free_node; 
n++)
+                                       for (int n=0; n<free_node; n++)
                                        {
-                                               trucks[t]->nodes[n].smoothpos = 
trucks[t]->nodes[n].AbsPosition;
-                                               aposition += 
trucks[t]->nodes[n].smoothpos;
+                                               nodes[n].smoothpos = 
nodes[n].AbsPosition;
+                                               aposition += nodes[n].smoothpos;
                                        }
-                                       trucks[t]->position = aposition / 
free_node;
+                                       position = aposition / free_node;
                                }
+                       }
 
-                       }
                        if (floating_origin_enable && 
nodes[0].RelPosition.length()>100.0)
                        {
                                moveOrigin(nodes[0].RelPosition);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to