Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2004-03-23 01:02:18 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2004-03-23 01:02:18 +0300
commit00291b5cf4a0f16ddca425b74ed30e8ac35d40e2 (patch)
tree952bb1c2f6fd8c2f34b950597ed0fa73a4ea7594 /source/gameengine/Converter/KX_ConvertSensors.cpp
parent5b90aafbd6815e29343f8e9aba9e3e20f85b3cc0 (diff)
[GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process [SCons] Build solid and qhull from the extern directory and link statically against them That was about it. There are a few things that needs double checking: * Makefiles * Projectfiles * All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertSensors.cpp')
-rw-r--r--source/gameengine/Converter/KX_ConvertSensors.cpp50
1 files changed, 19 insertions, 31 deletions
diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp
index 3ec2c3596e5..525674e1887 100644
--- a/source/gameengine/Converter/KX_ConvertSensors.cpp
+++ b/source/gameengine/Converter/KX_ConvertSensors.cpp
@@ -297,15 +297,13 @@ void BL_ConvertSensors(struct Object* blenderobject,
(blendertouchsensor->name ? blendertouchsensor->name: ""));
- //if (gameobj->GetSumoObject())
- //{
- // gamesensor = 0;
- //new KX_TouchSensor(eventmgr,
- //gameobj,
- //gameobj->GetSumoObject(),
- //bFindMaterial,
- //touchPropOrMatName);
- //}
+ if (gameobj->GetPhysicsController())
+ {
+ gamesensor = new KX_TouchSensor(eventmgr,
+ gameobj,
+ bFindMaterial,
+ touchPropOrMatName);
+ }
}
@@ -324,15 +322,13 @@ void BL_ConvertSensors(struct Object* blenderobject,
touchpropertyname = (char*) (blendertouchsensor->ma->id.name+2);
}
bool bFindMaterial = true;
- //if (gameobj->GetSumoObject())
- //{
- // gamesensor = 0;
- //new KX_TouchSensor(eventmgr,
- // gameobj,
- // gameobj->GetSumoObject(),
- // bFindMaterial,
- // touchpropertyname);
- //}
+ if (gameobj->GetPhysicsController())
+ {
+ gamesensor = new KX_TouchSensor(eventmgr,
+ gameobj,
+ bFindMaterial,
+ touchpropertyname);
+ }
}
break;
}
@@ -380,7 +376,7 @@ void BL_ConvertSensors(struct Object* blenderobject,
//sumoObj->setMargin(blendernearsensor->dist);
//sumoObj->setPosition(gameobj->NodeGetWorldPosition());
bool bFindMaterial = false;
- gamesensor = 0;//new KX_NearSensor(eventmgr,gameobj,blendernearsensor->dist,blendernearsensor->resetdist,bFindMaterial,nearpropertyname,kxscene);
+ gamesensor = new KX_NearSensor(eventmgr,gameobj,blendernearsensor->dist,blendernearsensor->resetdist,bFindMaterial,nearpropertyname,kxscene);
}
break;
@@ -514,7 +510,7 @@ void BL_ConvertSensors(struct Object* blenderobject,
case SENS_RADAR:
{
- /*
+
SCA_EventManager* eventmgr = logicmgr->FindEventManager(SCA_EventManager::TOUCH_EVENTMGR);
if (eventmgr)
{
@@ -540,14 +536,9 @@ void BL_ConvertSensors(struct Object* blenderobject,
//MT_Scalar coneradius = coneheight * (factor / 2);
MT_Scalar coneradius = coneheight * factor;
- DT_ShapeHandle shape = DT_Cone(coneradius,coneheight);
// this sumoObject is not deleted by a gameobj, so delete it ourself
// later (memleaks)!
- SM_Object* sumoObj = new SM_Object(shape,NULL,NULL,NULL);
- sumoObj->setMargin(0.0);
-
- sumoObj->setPosition(gameobj->NodeGetWorldPosition());
MT_Scalar smallmargin = 0.0;
MT_Scalar largemargin = 0.1;
@@ -560,13 +551,12 @@ void BL_ConvertSensors(struct Object* blenderobject,
radaraxis,
smallmargin,
largemargin,
- sumoObj,
bFindMaterial,
radarpropertyname,
kxscene);
}
- */
+
break;
}
case SENS_RAY:
@@ -586,15 +576,13 @@ void BL_ConvertSensors(struct Object* blenderobject,
int axis = blenderraysensor->axisflag;
- gamesensor = 0;
- /*new KX_RaySensor(eventmgr,
+ gamesensor = new KX_RaySensor(eventmgr,
gameobj,
checkname,
bFindMaterial,
distance,
axis,
- kxscene->GetSumoScene());
- */
+ kxscene);
}
break;