Revision: 1699
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1699&view=rev
Author: rorthomas
Date: 2011-02-25 12:59:52 +0000 (Fri, 25 Feb 2011)
Log Message:
-----------
merged trigger fix from lifter
Modified Paths:
--------------
trunk/source/main/physics/Beam.cpp
trunk/source/main/physics/input_output/BeamLoadTruck.cpp
Modified: trunk/source/main/physics/Beam.cpp
===================================================================
--- trunk/source/main/physics/Beam.cpp 2011-02-25 10:13:15 UTC (rev 1698)
+++ trunk/source/main/physics/Beam.cpp 2011-02-25 12:59:52 UTC (rev 1699)
@@ -3580,7 +3580,7 @@
{
if (triggerdebug &&
!beams[scount].shock->trigger_enabled)
LogManager::getSingleton().logMessage(" Trigger enabled. Blocker BeamID " +
StringConverter::toString(i) + " enabled trigger " +
StringConverter::toString(scount));
-
beams[scount].shock->trigger_enabled = true; // enable the trigger
+
beams[scount].shock->trigger_enabled = false; // disable the trigger
}
}
} else
@@ -3642,7 +3642,7 @@
{
if(triggerdebug &&
beams[scount].shock->trigger_enabled)
LogManager::getSingleton().logMessage(" Trigger disabled. Blocker BeamID " +
StringConverter::toString(i) + " disabled trigger " +
StringConverter::toString(scount));
-
beams[scount].shock->trigger_enabled = false; // disable the triggers
+
beams[scount].shock->trigger_enabled = true; // enable the triggers
}
}
} else
Modified: trunk/source/main/physics/input_output/BeamLoadTruck.cpp
===================================================================
--- trunk/source/main/physics/input_output/BeamLoadTruck.cpp 2011-02-25
10:13:15 UTC (rev 1698)
+++ trunk/source/main/physics/input_output/BeamLoadTruck.cpp 2011-02-25
12:59:52 UTC (rev 1699)
@@ -1118,7 +1118,8 @@
}
options_pointer++;
}
- int pos=add_beam(&nodes[id1], &nodes[id2], manager,
parent, htype, default_break, 0.0f, 0.0f, -1.0, sbound, lbound, 1.0f);
+ int pos=add_beam(&nodes[id1], &nodes[id2], manager,
parent, htype, default_break, 0.0f, 0.0f, detacher_group_state, -1.0,
sbound, lbound, 1.0f);
+ beams[pos].bounded=SHOCK2;
if (triggerdebug)
LogManager::getSingleton().logMessage("Trigger
added. BeamID " + StringConverter::toString(pos) + " Line#: " +
StringConverter::toString(linecounter));
@@ -1133,7 +1134,13 @@
shocks[free_shock].trigger_cmdlong =
triggerlong;
else // this is a commandkeyblocker
shockflag |= SHOCK_FLAG_TRG_CMD_BLOCKER;
+ } else // this is a triggerblocker
+ {
+ shockflag |= SHOCK_FLAG_TRG_BLOCKER;
+ shocks[free_shock].trigger_cmdshort =
triggershort;
+ shocks[free_shock].trigger_cmdlong =
triggerlong;
}
+
if (cmdkeyblock && !triggerblocker)
{
commandkey[triggershort].trigger_cmdkeyblock_state = true;
@@ -1143,6 +1150,7 @@
shocks[free_shock].trigger_boundary_t =
boundarytimer;
else
shocks[free_shock].trigger_boundary_t = 1.0f;
+
shocks[free_shock].flags = shockflag;
shocks[free_shock].sbd_spring = default_spring;
shocks[free_shock].sbd_damp = default_damp;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel