Revision: 1619
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1619&view=rev
Author: rorthomas
Date: 2011-01-31 02:01:06 +0000 (Mon, 31 Jan 2011)
Log Message:
-----------
bugfix for MP terrains without truckshop
Modified Paths:
--------------
trunk/source/main/RoRFrameListener.cpp
trunk/source/main/RoRFrameListener.h
Modified: trunk/source/main/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/RoRFrameListener.cpp 2011-01-31 00:23:29 UTC (rev
1618)
+++ trunk/source/main/RoRFrameListener.cpp 2011-01-31 02:01:06 UTC (rev
1619)
@@ -771,6 +771,7 @@
if (SETTINGS.getSetting("Threads")=="3 (multi core CPU, one thread per
beam)") thread_mode=THREAD_HT2;
current_truck=-1;
+ terrainHasTruckShop=false;
#ifdef USE_LUA
lua=0;
#endif // LUASCRIPT
@@ -1309,7 +1310,7 @@
} else {
// no trucks loaded?
- if (truck_preload_num == 0 && !netmode)
+ if (truck_preload_num == 0 && (!netmode ||
!terrainHasTruckShop))
{
#ifdef USE_MYGUI
// show truck selector
@@ -1916,6 +1917,9 @@
else if(!strncmp(ts, "delete", 8))
event_filter=EVENT_DELETE;
continue;
+ if(!strncmp(ts, "shoptruck", 9))
+ terrainHasTruckShop=true;
+
}
//resp=sscanf(ptline, "%f, %f, %f, %f, %f, %f, %f, %f, %f,
%c",&lx,&hx,&ly, &hy,&lz, &hz, &srx, &sry, &srz,&type);
if (!strcmp("endbox", ptline))
@@ -2339,6 +2343,12 @@
return true;
}
+ // update characters
+ if(loading_state==ALL_LOADED && net)
+ CharacterFactory::getSingleton().updateCharacters(dt);
+ else if(loading_state==ALL_LOADED && !net && cameramode != CAMERA_FREE)
+ person->update(dt);
+
// no event handling during chatting!
if(chatting)
return true;
@@ -2680,14 +2690,6 @@
if (loading_state==ALL_LOADED)
{
- if(net)
- {
- CharacterFactory::getSingleton().updateCharacters(dt);
- } else if (!net && cameramode != CAMERA_FREE)
- {
- // do not move the person in free camera mode
- person->update(dt);
- }
bool enablegrab = true;
if (cameramode != CAMERA_FREE)
Modified: trunk/source/main/RoRFrameListener.h
===================================================================
--- trunk/source/main/RoRFrameListener.h 2011-01-31 00:23:29 UTC (rev
1618)
+++ trunk/source/main/RoRFrameListener.h 2011-01-31 02:01:06 UTC (rev
1619)
@@ -372,6 +372,7 @@
void loadNetTerrain(char *preselected_map);
void exploreScripts();
float mapsizex, mapsizez;
+ bool terrainHasTruckShop;
float stopTimer();
void startTimer();
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