Revision: 2770
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2770&view=rev
Author: rorthomas
Date: 2012-06-02 18:19:51 +0000 (Sat, 02 Jun 2012)
Log Message:
-----------
fixed some more map spawning things
renamed globalEnvironment back to gEnv
Modified Paths:
--------------
trunk/source/main/gameplay/RoRFrameListener.cpp
trunk/source/main/gameplay/RoRFrameListener.h
trunk/source/main/gameplay/Road2.cpp
trunk/source/main/gameplay/Savegame.cpp
trunk/source/main/gfx/DecalManager.cpp
trunk/source/main/gfx/DustManager.cpp
trunk/source/main/gfx/Heathaze.cpp
trunk/source/main/gfx/PreviewRenderer.cpp
trunk/source/main/gfx/ShadowManager.cpp
trunk/source/main/gfx/Skidmark.cpp
trunk/source/main/gfx/Water.cpp
trunk/source/main/gfx/dof/DepthOfFieldEffect.cpp
trunk/source/main/gui/GUIMenu.cpp
trunk/source/main/gui/OverlayWrapper.cpp
trunk/source/main/physics/Beam.cpp
trunk/source/main/scripting/GameScript.cpp
trunk/source/main/terrain/TerrainManager.cpp
Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp 2012-06-02 17:56:31 UTC
(rev 2769)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp 2012-06-02 18:19:51 UTC
(rev 2770)
@@ -1028,7 +1028,8 @@
// no network
person = (Character *)CharacterFactory::getSingleton().createLocal(-1);
-
+ gEnv->player = person;
+
// init camera manager after mygui and after we have a character
new CameraManager(ow, dof);
@@ -2523,7 +2524,7 @@
// in embedded mode we wont show that loading stuff
/*
- if (globalEnvironment->embeddedMode)
+ if (gEnv->embeddedMode)
{
loading_state=ALL_LOADED;
#ifdef USE_MYGUI
@@ -2784,9 +2785,13 @@
gEnv->terrainManager->loadTerrain(terrainfile);
loading_state=TERRAIN_LOADED;
+
+ if (gEnv->player)
+ {
+ gEnv->player->setVisible(true);
+ gEnv->player->setPosition(gEnv->terrainManager->getSpawnPos());
+ }
- if (gEnv->player) gEnv->player->setVisible(true);
-
#ifdef USE_MYGUI
if (!BSETTING("REPO_MODE", false))
{
@@ -3082,7 +3087,7 @@
// update GUI
INPUTENGINE.Capture();
- //if (globalEnvironment->collisions) printf("> ground model used:
%s\n", globalEnvironment->collisions->last_used_ground_model->name);
+ //if (gEnv->collisions) printf("> ground model used: %s\n",
gEnv->collisions->last_used_ground_model->name);
// exit frame started method when just displaying the GUI
#ifdef USE_MYGUI
Modified: trunk/source/main/gameplay/RoRFrameListener.h
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.h 2012-06-02 17:56:31 UTC
(rev 2769)
+++ trunk/source/main/gameplay/RoRFrameListener.h 2012-06-02 18:19:51 UTC
(rev 2770)
@@ -62,6 +62,8 @@
enum LoadingStatuses { NONE_LOADED, TERRAIN_LOADED, ALL_LOADED,
EXITING, EDITING, RELOADING, PAUSE, TERRAIN_EDITOR };
enum SurveyMapTypes { SURVEY_MAP_NONE, SURVEY_MAP_SMALL,
SURVEY_MAP_BIG, SURVEY_MAP_END};
+
+ Ogre::Vector3 reload_pos;
protected:
@@ -91,7 +93,6 @@
Ogre::String terrainUID;
Ogre::Vector3 dirArrowPointed;
Ogre::Vector3 persostart;
- Ogre::Vector3 reload_pos;
OverlayWrapper *ow;
bool benchmarking;
Modified: trunk/source/main/gameplay/Road2.cpp
===================================================================
--- trunk/source/main/gameplay/Road2.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gameplay/Road2.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -536,8 +536,8 @@
if (triID>=0) registeredCollTris.push_back(triID);
}
-// globalEnvironment->collisions->addCollisionTri(p1, p4, p3);
-// globalEnvironment->collisions->addCollisionTri(p1, p3, p2);
+// gEnv->collisions->addCollisionTri(p1, p4, p3);
+// gEnv->collisions->addCollisionTri(p1, p3, p2);
}
Modified: trunk/source/main/gameplay/Savegame.cpp
===================================================================
--- trunk/source/main/gameplay/Savegame.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gameplay/Savegame.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -87,22 +87,22 @@
}
// TODO: FIX savegame camera integration
- //h.camRotX =
globalEnvironment->frameListener->camRotX.valueRadians();
- //h.camRotY =
globalEnvironment->frameListener->camRotY.valueRadians();
- //h.camDist = globalEnvironment->frameListener->camDist;
+ //h.camRotX =
gEnv->frameListener->camRotX.valueRadians();
+ //h.camRotY =
gEnv->frameListener->camRotY.valueRadians();
+ //h.camDist = gEnv->frameListener->camDist;
- //memcpy(&h.cam_ideal_pos,
globalEnvironment->frameListener->camIdealPosition.ptr(), sizeof(float) * 3);
+ //memcpy(&h.cam_ideal_pos,
gEnv->frameListener->camIdealPosition.ptr(), sizeof(float) * 3);
- //h.pushcamRotX =
globalEnvironment->frameListener->pushcamRotX.valueRadians();
- //h.pushcamRotY =
globalEnvironment->frameListener->pushcamRotY.valueRadians();
- //h.mMoveScale =
globalEnvironment->frameListener->mMoveScale;
- //h.mRotScale =
globalEnvironment->frameListener->mRotScale.valueRadians();
+ //h.pushcamRotX =
gEnv->frameListener->pushcamRotX.valueRadians();
+ //h.pushcamRotY =
gEnv->frameListener->pushcamRotY.valueRadians();
+ //h.mMoveScale = gEnv->frameListener->mMoveScale;
+ //h.mRotScale =
gEnv->frameListener->mRotScale.valueRadians();
- //memcpy(&h.lastPosition,
globalEnvironment->frameListener->lastPosition.ptr(), sizeof(float) * 3);
+ //memcpy(&h.lastPosition,
gEnv->frameListener->lastPosition.ptr(), sizeof(float) * 3);
- //h.cameramode =
globalEnvironment->frameListener->cameramode;
- //h.lastcameramode =
globalEnvironment->frameListener->lastcameramode;
+ //h.cameramode = gEnv->frameListener->cameramode;
+ //h.lastcameramode =
gEnv->frameListener->lastcameramode;
}
// write header to file
@@ -255,26 +255,26 @@
// TODO: FIX savegame camera integration
/*
- if (globalEnvironment->frameListener->getCamera())
+ if (gEnv->frameListener->getCamera())
{
-
globalEnvironment->frameListener->getCamera()->setPosition(Vector3(h.cam_pos));
+
gEnv->frameListener->getCamera()->setPosition(Vector3(h.cam_pos));
}
- globalEnvironment->frameListener->camRotX = Radian(h.camRotX);
- globalEnvironment->frameListener->camRotY = Radian(h.camRotY);
- globalEnvironment->frameListener->camDist = h.camDist;
+ gEnv->frameListener->camRotX = Radian(h.camRotX);
+ gEnv->frameListener->camRotY = Radian(h.camRotY);
+ gEnv->frameListener->camDist = h.camDist;
- globalEnvironment->frameListener->camIdealPosition =
Vector3(h.cam_ideal_pos);
+ gEnv->frameListener->camIdealPosition =
Vector3(h.cam_ideal_pos);
- globalEnvironment->frameListener->pushcamRotX =
Radian(h.pushcamRotX);
- globalEnvironment->frameListener->pushcamRotY =
Radian(h.pushcamRotY);
- globalEnvironment->frameListener->mMoveScale = h.mMoveScale;
- globalEnvironment->frameListener->mRotScale =
Radian(h.mRotScale);
+ gEnv->frameListener->pushcamRotX = Radian(h.pushcamRotX);
+ gEnv->frameListener->pushcamRotY = Radian(h.pushcamRotY);
+ gEnv->frameListener->mMoveScale = h.mMoveScale;
+ gEnv->frameListener->mRotScale = Radian(h.mRotScale);
- globalEnvironment->frameListener->lastPosition =
Vector3(h.lastPosition);
+ gEnv->frameListener->lastPosition = Vector3(h.lastPosition);
- globalEnvironment->frameListener->cameramode = h.cameramode;
- globalEnvironment->frameListener->lastcameramode =
h.lastcameramode;
+ gEnv->frameListener->cameramode = h.cameramode;
+ gEnv->frameListener->lastcameramode = h.lastcameramode;
*/
}
Modified: trunk/source/main/gfx/DecalManager.cpp
===================================================================
--- trunk/source/main/gfx/DecalManager.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gfx/DecalManager.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -51,7 +51,7 @@
int DecalManager::addTerrainDecal(Ogre::Vector3 position, Ogre::Vector2 size,
Ogre::Vector2 numSeg, Ogre::Real rotation, Ogre::String materialname,
Ogre::String normalname)
{
#if 0
- Ogre::ManualObject *mo =
globalEnvironment->ogreSceneManager->createManualObject();
+ Ogre::ManualObject *mo = gEnv->ogreSceneManager->createManualObject();
String oname = mo->getName();
SceneNode *mo_node = terrain_decals_snode->createChildSceneNode();
@@ -126,7 +126,7 @@
mesh->buildEdgeList();
// remove the manualobject again, since we dont need it anymore
- globalEnvironment->ogreSceneManager->destroyManualObject(mo);
+ gEnv->ogreSceneManager->destroyManualObject(mo);
unsigned short src, dest;
if (!mesh->suggestTangentVectorBuildParams(VES_TANGENT, src, dest))
@@ -134,7 +134,7 @@
mesh->buildTangentVectors(VES_TANGENT, src, dest);
}
- Entity *ent =
globalEnvironment->ogreSceneManager->createEntity(oname+"_ent", oname+"_mesh");
+ Entity *ent = gEnv->ogreSceneManager->createEntity(oname+"_ent",
oname+"_mesh");
mo_node->attachObject(ent);
mo_node->setVisible(true);
@@ -154,7 +154,7 @@
int DecalManager::addTerrainSplineDecal(Ogre::SimpleSpline *spline, float
width, Ogre::Vector2 numSeg, Ogre::Vector2 uvSeg, Ogre::String materialname,
float ground_offset, Ogre::String export_fn, bool debug)
{
#if 0
- Ogre::ManualObject *mo =
globalEnvironment->ogreSceneManager->createManualObject();
+ Ogre::ManualObject *mo = gEnv->ogreSceneManager->createManualObject();
String oname = mo->getName();
SceneNode *mo_node = terrain_decals_snode->createChildSceneNode();
@@ -245,7 +245,7 @@
mesh->buildEdgeList();
// remove the manualobject again, since we dont need it anymore
- globalEnvironment->ogreSceneManager->destroyManualObject(mo);
+ gEnv->ogreSceneManager->destroyManualObject(mo);
unsigned short src, dest;
if (!mesh->suggestTangentVectorBuildParams(VES_TANGENT, src, dest))
@@ -253,7 +253,7 @@
mesh->buildTangentVectors(VES_TANGENT, src, dest);
}
- Entity *ent =
globalEnvironment->ogreSceneManager->createEntity(oname+"_ent", oname+"_mesh");
+ Entity *ent = gEnv->ogreSceneManager->createEntity(oname+"_ent",
oname+"_mesh");
mo_node->attachObject(ent);
mo_node->setVisible(true);
@@ -285,7 +285,7 @@
// if if no decals
if (!terrain_decals_snode->numChildren()) return 0;
terrain_decal_count++;
- terrain_decals_sg =
globalEnvironment->ogreSceneManager->createStaticGeometry("terrain_decals_"+TOSTRING(terrain_decal_count));
+ terrain_decals_sg =
gEnv->ogreSceneManager->createStaticGeometry("terrain_decals_"+TOSTRING(terrain_decal_count));
terrain_decals_sg->setCastShadows(false);
terrain_decals_sg->addSceneNode(terrain_decals_snode);
terrain_decals_sg->setRegionDimensions(Vector3(farclip/2.0, 10000.0,
farclip/2.0));
Modified: trunk/source/main/gfx/DustManager.cpp
===================================================================
--- trunk/source/main/gfx/DustManager.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gfx/DustManager.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -92,8 +92,8 @@
g->fx_particle_timedelta,
g->fx_particle_velo_factor,
g->fx_particle_ttl,
-
globalEnvironment->ogreSceneManager->getRootSceneNode(),
-
globalEnvironment->ogreSceneManager);
+
gEnv->ogreSceneManager->getRootSceneNode(),
+
gEnv->ogreSceneManager);
dustpools[pname] = dp;
}
*/
Modified: trunk/source/main/gfx/Heathaze.cpp
===================================================================
--- trunk/source/main/gfx/Heathaze.cpp 2012-06-02 17:56:31 UTC (rev 2769)
+++ trunk/source/main/gfx/Heathaze.cpp 2012-06-02 18:19:51 UTC (rev 2770)
@@ -31,7 +31,7 @@
void HeatHazeListener::preRenderTargetUpdate(const RenderTargetEvent& evt)
{
// Hide everything
- //globalEnvironment->ogreSceneManager->setFindVisibleObjects(false);
+ //gEnv->ogreSceneManager->setFindVisibleObjects(false);
// TODO: hide objects between the heathaze and the viewer, so no
heathaze is visible on them
@@ -39,7 +39,7 @@
void HeatHazeListener::postRenderTargetUpdate(const RenderTargetEvent& evt)
{
// Show everything
- //globalEnvironment->ogreSceneManager->setFindVisibleObjects(true);
+ //gEnv->ogreSceneManager->setFindVisibleObjects(true);
}
@@ -50,7 +50,7 @@
{
/*
// we use the main camera now
- mHazeCam =
globalEnvironment->ogreSceneManager->createCamera("Hazecam");
+ mHazeCam = gEnv->ogreSceneManager->createCamera("Hazecam");
mHazeCam->setNearClipDistance(1.0);
mHazeCam->setFarClipDistance(1000.0);
mHazeCam->setPosition(Vector3(0, 0, 0));
Modified: trunk/source/main/gfx/PreviewRenderer.cpp
===================================================================
--- trunk/source/main/gfx/PreviewRenderer.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gfx/PreviewRenderer.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -256,7 +256,7 @@
if (gEnv->sky)
{
gEnv->sky->notifyCameraChanged(renderCamera);
-//
globalEnvironment->terrainManager->getSkyManager()->forceUpdate(0.01f);
+// gEnv->terrainManager->getSkyManager()->forceUpdate(0.01f);
}
#endif // USE_CAELUM
Modified: trunk/source/main/gfx/ShadowManager.cpp
===================================================================
--- trunk/source/main/gfx/ShadowManager.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gfx/ShadowManager.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -57,15 +57,15 @@
if (tech == Ogre::SHADOWTYPE_STENCIL_MODULATIVE)
{
- //
globalEnvironment->ogreSceneManager->setShadowIndexBufferSize(2000000);
+ //
gEnv->ogreSceneManager->setShadowIndexBufferSize(2000000);
gEnv->sceneManager->setShadowDirectionalLightExtrusionDistance(100);
//important optimization
gEnv->sceneManager->getRenderQueue()->getQueueGroup(Ogre::RENDER_QUEUE_WORLD_GEOMETRY_1)->setShadowsEnabled(false);
- //
globalEnvironment->ogreSceneManager->setUseCullCamera(false);
- //
globalEnvironment->ogreSceneManager->setShowBoxes(true);
- //
globalEnvironment->ogreSceneManager->showBoundingBoxes(true);
+ // gEnv->ogreSceneManager->setUseCullCamera(false);
+ // gEnv->ogreSceneManager->setShowBoxes(true);
+ // gEnv->ogreSceneManager->showBoundingBoxes(true);
} else if (tech == Ogre::SHADOWTYPE_TEXTURE_MODULATIVE)
{
gEnv->sceneManager->setShadowTextureSettings(2048,2);
Modified: trunk/source/main/gfx/Skidmark.cpp
===================================================================
--- trunk/source/main/gfx/Skidmark.cpp 2012-06-02 17:56:31 UTC (rev 2769)
+++ trunk/source/main/gfx/Skidmark.cpp 2012-06-02 18:19:51 UTC (rev 2770)
@@ -326,7 +326,7 @@
/*
// debug code: adds boxes to the average point
SceneNode *sn = mNode->getParentSceneNode()->createChildSceneNode();
-
sn->attachObject(globalEnvironment->ogreSceneManager->createEntity("addPointTRACK"+TOSTRING(objects.back().lastPointAv)
+TOSTRING(axis), "beam.mesh"));
+
sn->attachObject(gEnv->ogreSceneManager->createEntity("addPointTRACK"+TOSTRING(objects.back().lastPointAv)
+TOSTRING(axis), "beam.mesh"));
sn->setPosition(thisPointAV);
sn->setScale(0.1f, 0.01f, 0.1f);
*/
Modified: trunk/source/main/gfx/Water.cpp
===================================================================
--- trunk/source/main/gfx/Water.cpp 2012-06-02 17:56:31 UTC (rev 2769)
+++ trunk/source/main/gfx/Water.cpp 2012-06-02 18:19:51 UTC (rev 2770)
@@ -237,7 +237,7 @@
pPlaneEnt = gEnv->sceneManager->createEntity( "plane",
"ReflectPlane" );
if (mType==WATER_FULL_QUALITY || mType==WATER_FULL_SPEED)
pPlaneEnt->setMaterialName("Examples/FresnelReflectionRefraction");
else pPlaneEnt->setMaterialName("Examples/FresnelReflection");
- //
globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt);
+ //
gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt);
//position
pTestNode =
gEnv->sceneManager->getRootSceneNode()->createChildSceneNode("WaterPlane");
pTestNode->attachObject(pPlaneEnt);
@@ -427,8 +427,8 @@
return height;
// calculate how high the waves should be at this point
- // (globalEnvironment->terrainManager->getMax().x * mScale) / 2 =
terrain width / 2
- // (globalEnvironment->terrainManager->getMax().z * mScale) / 2 =
terrain height / 2
+ // (gEnv->terrainManager->getMax().x * mScale) / 2 = terrain width / 2
+ // (gEnv->terrainManager->getMax().z * mScale) / 2 = terrain height / 2
// calculates the distance to the center of the terrain and dives it
through 3.000.000
float waveheight = (pos - Vector3((gEnv->terrainManager->getMax().x *
mScale) / 2, height, (gEnv->terrainManager->getMax().z * mScale) /
2)).squaredLength() / 3000000.0;
// we will store the result in this variable, init it with the default
height
@@ -478,7 +478,7 @@
void Water::updateReflectionPlane(float h)
{
- //Ray ra=globalEnvironment->ogreCamera->getCameraToViewportRay(0.5,0.5);
+ //Ray ra=gEnv->ogreCamera->getCameraToViewportRay(0.5,0.5);
//std::pair<bool, Real> mpair=ra.intersects(Plane(Vector3::UNIT_Y,
-height));
//if (mpair.first) h=ra.getPoint(mpair.second).y;
reflectionPlane.d = -h+0.15;
Modified: trunk/source/main/gfx/dof/DepthOfFieldEffect.cpp
===================================================================
--- trunk/source/main/gfx/dof/DepthOfFieldEffect.cpp 2012-06-02 17:56:31 UTC
(rev 2769)
+++ trunk/source/main/gfx/dof/DepthOfFieldEffect.cpp 2012-06-02 18:19:51 UTC
(rev 2770)
@@ -162,8 +162,8 @@
case BlurPass:
{
//float pixelSize[2] = {
- // 1.0f /
(globalEnvironment->ogreViewPort->getActualWidth() / BLUR_DIVISOR),
- // 1.0f /
(globalEnvironment->ogreViewPort->getActualHeight() / BLUR_DIVISOR)};
+ // 1.0f / (gEnv->ogreViewPort->getActualWidth() /
BLUR_DIVISOR),
+ // 1.0f / (gEnv->ogreViewPort->getActualHeight() /
BLUR_DIVISOR)};
// Adjust fragment program parameters
Ogre::Vector3 ps = Ogre::Vector3(1.0f / (mWidth /
BLUR_DIVISOR),1.0f / (mHeight / BLUR_DIVISOR), 1.0f);
@@ -297,12 +297,12 @@
{
// turn on
mDepthOfFieldEffect->setEnabled(true);
- globalEnvironment->ogreRoot->addFrameListener(this);
+ gEnv->ogreRoot->addFrameListener(this);
} else if (!enabled && mDepthOfFieldEffect->getEnabled())
{
// turn off
mDepthOfFieldEffect->setEnabled(false);
- globalEnvironment->ogreRoot->removeFrameListener(this);
+ gEnv->ogreRoot->removeFrameListener(this);
}
*/
}
Modified: trunk/source/main/gui/GUIMenu.cpp
===================================================================
--- trunk/source/main/gui/GUIMenu.cpp 2012-06-02 17:56:31 UTC (rev 2769)
+++ trunk/source/main/gui/GUIMenu.cpp 2012-06-02 18:19:51 UTC (rev 2770)
@@ -319,7 +319,7 @@
// get out first
if (BeamFactory::getSingleton().getCurrentTruckNumber() != -1)
BeamFactory::getSingleton().setCurrentTruck(-1);
- //globalEnvironment->frameListener->reload_pos =
globalEnvironment->frameListener->person->getPosition() + Vector3(0, 1, 0); //
1 meter above the character
+ gEnv->frameListener->reload_pos =
gEnv->frameListener->person->getPosition() + Vector3(0, 1, 0); // 1 meter above
the character
gEnv->frameListener->freeTruckPosition=true;
gEnv->frameListener->loading_state=RELOADING;
SelectorWindow::getSingleton().show(SelectorWindow::LT_AllBeam);
@@ -331,7 +331,7 @@
LOG("you need to open a map before trying to save or
load its scenery.");
return;
}
- //String fname = SSETTING("Cache Path", "") +
globalEnvironment->frameListener->loadedTerrain + ".rorscene";
+ //String fname = SSETTING("Cache Path", "") +
gEnv->frameListener->loadedTerrain + ".rorscene";
//Savegame s;
if (miname == _L("Save Scenery"))
Modified: trunk/source/main/gui/OverlayWrapper.cpp
===================================================================
--- trunk/source/main/gui/OverlayWrapper.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/gui/OverlayWrapper.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -347,36 +347,36 @@
airtorque4texture=((MaterialPtr)(MaterialManager::getSingleton().getByName("tracks/airtorque4needle_mat")))->getTechnique(0)->getPass(0)->getTextureUnitState(0);
//
speedotexture=((MaterialPtr)(MaterialManager::getSingleton().getByName("tracks/speedoneedle")))->getTechnique(0)->getPass(0)->getTextureUnitState(0);
- // Entity
*ecs=globalEnvironment->ogreSceneManager->createEntity("speed_needle",
"needle.mesh");
- //
speed_node=globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
+ // Entity
*ecs=gEnv->ogreSceneManager->createEntity("speed_needle", "needle.mesh");
+ //
speed_node=gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
// speed_node->attachObject(ecs);
// needlesOverlay->add3D(speed_node);
// placeNeedle(win, speed_node, 1189, 936, 1.0);
//tacho
- // Entity
*ect=globalEnvironment->ogreSceneManager->createEntity("tacho_needle",
"needle.mesh");
- //
tach_node=globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
+ // Entity
*ect=gEnv->ogreSceneManager->createEntity("tacho_needle", "needle.mesh");
+ //
tach_node=gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
// tach_node->attachObject(ect);
// needlesOverlay->add3D(tach_node);
// placeNeedle(win, tach_node, 1011, 935, 1.0);
// //pitch
- // Entity
*ecp=globalEnvironment->ogreSceneManager->createEntity("pitch_needle",
"needle.mesh");
+ // Entity
*ecp=gEnv->ogreSceneManager->createEntity("pitch_needle", "needle.mesh");
// ecp->setMaterialName("tracks/whiteneedle");
- //
pitch_node=globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
+ //
pitch_node=gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
// pitch_node->attachObject(ecp);
// needlesOverlay->add3D(pitch_node);
// placeNeedle(win, pitch_node, 876, 1014, 1.0);
//roll
- // Entity
*ecr=globalEnvironment->ogreSceneManager->createEntity("roll_needle",
"needle.mesh");
+ // Entity
*ecr=gEnv->ogreSceneManager->createEntity("roll_needle", "needle.mesh");
// ecr->setMaterialName("tracks/whiteneedle");
- //
roll_node=globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
+ //
roll_node=gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
// roll_node->attachObject(ecr);
// needlesOverlay->add3D(roll_node);
// placeNeedle(win, roll_node, 876, 924, 1.0);
//rollcorr
- // Entity
*ecrc=globalEnvironment->ogreSceneManager->createEntity("rollcorr_needle",
"needle.mesh");
+ // Entity
*ecrc=gEnv->ogreSceneManager->createEntity("rollcorr_needle", "needle.mesh");
// ecrc->setMaterialName("tracks/stabneedle");
- //
rollcorr_node=globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
+ //
rollcorr_node=gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
// rollcorr_node->attachObject(ecrc);
// needlesOverlay->add3D(rollcorr_node);
// placeNeedle(win, rollcorr_node, 876, 924, 0.8);
Modified: trunk/source/main/physics/Beam.cpp
===================================================================
--- trunk/source/main/physics/Beam.cpp 2012-06-02 17:56:31 UTC (rev 2769)
+++ trunk/source/main/physics/Beam.cpp 2012-06-02 18:19:51 UTC (rev 2770)
@@ -660,7 +660,7 @@
if (beams[i].mSceneNode)
{
beams[i].mSceneNode->removeAndDestroyAllChildren();
-
//globalEnvironment->ogreSceneManager->destroySceneNode(beams[i].mSceneNode);
+
//gEnv->ogreSceneManager->destroySceneNode(beams[i].mSceneNode);
}
}
@@ -5690,8 +5690,8 @@
static SceneNode *n = 0;
if (!n)
{
- Entity *e =
globalEnvironment->ogreSceneManager->createEntity("axes.mesh");
- n =
globalEnvironment->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
+ Entity *e = gEnv->ogreSceneManager->createEntity("axes.mesh");
+ n =
gEnv->ogreSceneManager->getRootSceneNode()->createChildSceneNode();
n->attachObject(e);
}
n->setPosition(mAgentPosition);
@@ -5721,7 +5721,7 @@
/*
String txt = "AI:"+TOSTRING(mSteeringForce);
-
globalEnvironment->frameListener->getOverlayWrapper()->flashMessage(txt, 1, -1);
+ gEnv->frameListener->getOverlayWrapper()->flashMessage(txt, 1, -1);
*/
// actually steer
Modified: trunk/source/main/scripting/GameScript.cpp
===================================================================
--- trunk/source/main/scripting/GameScript.cpp 2012-06-02 17:56:31 UTC (rev
2769)
+++ trunk/source/main/scripting/GameScript.cpp 2012-06-02 18:19:51 UTC (rev
2770)
@@ -295,7 +295,7 @@
void GameScript::destroyObject(const std::string &instanceName)
{
-
//globalEnvironment->frameListener->unloadObject(const_cast<char*>(instanceName.c_str()));
+
//gEnv->frameListener->unloadObject(const_cast<char*>(instanceName.c_str()));
}
void GameScript::spawnObject(const std::string &objectName, const std::string
&instanceName, Vector3 &pos, Vector3 &rot, const std::string &eventhandler,
bool uniquifyMaterials)
@@ -314,7 +314,7 @@
// trying to create the new object
SceneNode
*bakeNode=gEnv->sceneManager->getRootSceneNode()->createChildSceneNode();
-
//globalEnvironment->frameListener->loadObject(const_cast<char*>(objectName.c_str()),
pos.x, pos.y, pos.z, rot.x, rot.y, rot.z, bakeNode,
const_cast<char*>(instanceName.c_str()), true, functionPtr,
const_cast<char*>(objectName.c_str()), uniquifyMaterials);
+
//gEnv->frameListener->loadObject(const_cast<char*>(objectName.c_str()), pos.x,
pos.y, pos.z, rot.x, rot.y, rot.z, bakeNode,
const_cast<char*>(instanceName.c_str()), true, functionPtr,
const_cast<char*>(objectName.c_str()), uniquifyMaterials);
}
void GameScript::hideDirectionArrow()
@@ -466,7 +466,7 @@
int GameScript::getLoadedTerrain(std::string &result)
{
- //result = globalEnvironment->frameListener->loadedTerrain;
+ //result = gEnv->frameListener->loadedTerrain;
return 0;
}
@@ -478,51 +478,51 @@
void GameScript::setCameraPosition(Vector3 &pos)
{
// TODO: TOFIX
-
//globalEnvironment->frameListener->getCamera()->setPosition(Vector3(pos.x,
pos.y, pos.z));
+ //gEnv->frameListener->getCamera()->setPosition(Vector3(pos.x, pos.y,
pos.z));
}
void GameScript::setCameraDirection(Vector3 &rot)
{
// TODO: TOFIX
-
//globalEnvironment->frameListener->getCamera()->setDirection(Vector3(rot.x,
rot.y, rot.z));
+ //gEnv->frameListener->getCamera()->setDirection(Vector3(rot.x, rot.y,
rot.z));
}
void GameScript::setCameraYaw(float rotX)
{
// TODO: TOFIX
- //globalEnvironment->frameListener->getCamera()->yaw(Degree(rotX));
+ //gEnv->frameListener->getCamera()->yaw(Degree(rotX));
}
void GameScript::setCameraPitch(float rotY)
{
// TODO: TOFIX
- //globalEnvironment->frameListener->getCamera()->pitch(Degree(rotY));
+ //gEnv->frameListener->getCamera()->pitch(Degree(rotY));
}
void GameScript::setCameraRoll(float rotZ)
{
// TODO: TOFIX
- //globalEnvironment->frameListener->getCamera()->roll(Degree(rotZ));
+ //gEnv->frameListener->getCamera()->roll(Degree(rotZ));
}
Vector3 GameScript::getCameraPosition()
{
// TODO: TOFIX
- //Vector3 pos =
globalEnvironment->frameListener->getCamera()->getPosition();
+ //Vector3 pos = gEnv->frameListener->getCamera()->getPosition();
return Vector3::ZERO; //Vector3(pos.x, pos.y, pos.z);
}
Vector3 GameScript::getCameraDirection()
{
// TODO: TOFIX
- //Vector3 rot =
globalEnvironment->frameListener->getCamera()->getDirection();
+ //Vector3 rot = gEnv->frameListener->getCamera()->getDirection();
return Vector3::ZERO; //(rot.x, rot.y, rot.z);
}
void GameScript::cameraLookAt(Vector3 &pos)
{
// TODO: TOFIX
- //globalEnvironment->frameListener->getCamera()->lookAt(Vector3(pos.x,
pos.y, pos.z));
+ //gEnv->frameListener->getCamera()->lookAt(Vector3(pos.x, pos.y,
pos.z));
}
#ifdef USE_CURL
@@ -612,10 +612,10 @@
}
// add some hard coded values
- //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "terrain_Name",
CURLFORM_COPYCONTENTS, globalEnvironment->frameListener->terrainName.c_str(),
CURLFORM_END);
- //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_FileName", CURLFORM_COPYCONTENTS,
globalEnvironment->frameListener->terrainFileName.c_str(), CURLFORM_END);
- //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_FileHash", CURLFORM_COPYCONTENTS,
globalEnvironment->frameListener->terrainFileHash.c_str(), CURLFORM_END);
- //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_ModHash", CURLFORM_COPYCONTENTS,
globalEnvironment->frameListener->terrainModHash.c_str(), CURLFORM_END);
+ //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "terrain_Name",
CURLFORM_COPYCONTENTS, gEnv->frameListener->terrainName.c_str(), CURLFORM_END);
+ //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_FileName", CURLFORM_COPYCONTENTS,
gEnv->frameListener->terrainFileName.c_str(), CURLFORM_END);
+ //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_FileHash", CURLFORM_COPYCONTENTS,
gEnv->frameListener->terrainFileHash.c_str(), CURLFORM_END);
+ //curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_ModHash", CURLFORM_COPYCONTENTS,
gEnv->frameListener->terrainModHash.c_str(), CURLFORM_END);
curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_ScriptName", CURLFORM_COPYCONTENTS, mse->getScriptName().c_str(),
CURLFORM_END);
curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
"terrain_ScriptHash", CURLFORM_COPYCONTENTS, mse->getScriptHash().c_str(),
CURLFORM_END);
curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "User_NickName",
CURLFORM_COPYCONTENTS, SSETTING("Nickname", "Anonymous").c_str(), CURLFORM_END);
Modified: trunk/source/main/terrain/TerrainManager.cpp
===================================================================
--- trunk/source/main/terrain/TerrainManager.cpp 2012-06-02 17:56:31 UTC
(rev 2769)
+++ trunk/source/main/terrain/TerrainManager.cpp 2012-06-02 18:19:51 UTC
(rev 2770)
@@ -221,7 +221,7 @@
{
gEnv->mainCamera->getViewport()->setBackgroundColour(ambient_color);
- //globalEnvironment->ogreCamera->setFarClipDistance(0);
+ //gEnv->ogreCamera->setFarClipDistance(0);
gEnv->mainCamera->setPosition(start_position);
}
@@ -442,7 +442,7 @@
// now with extensive error checking
if
(CompositorManager::getSingleton().hasCompositorChain(gEnv->mainCamera->getViewport()))
{
- //
//CompositorManager::getSingleton().getCompositorChain(globalEnvironment->ogreCamera->getViewport())->getCompositor(0)->getTechnique()->getOutputTargetPass()->getPass(0)->setClearColour(fade_color);
+ //
//CompositorManager::getSingleton().getCompositorChain(gEnv->ogreCamera->getViewport())->getCompositor(0)->getTechnique()->getOutputTargetPass()->getPass(0)->setClearColour(fade_color);
CompositorInstance *co =
CompositorManager::getSingleton().getCompositorChain(gEnv->mainCamera->getViewport())->_getOriginalSceneCompositor();
if (co)
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel