Commit b4ea1123 authored by thecelloman's avatar thecelloman

Remove Interior Object format (DIF)

parent a868b649
......@@ -355,7 +355,7 @@ U32 AIClient::getMoveList( Move **movePtr,U32 *numMoves ) {
Point3F targetLoc = mMoveDestination; // Change this
if( mPlayer ) {
if( !mPlayer->getContainer()->castRay( mLocation, targetLoc, InteriorObjectType |
if( !mPlayer->getContainer()->castRay( mLocation, targetLoc,
StaticShapeObjectType | StaticObjectType |
TerrainObjectType, &dummy ) ) {
if( !mTargetInLOS )
......
......@@ -427,7 +427,7 @@ bool AIPlayer::getAIMove(Move *movePtr)
// if it hit something.
RayInfo dummy;
if (getContainer()->castRay( location, targetLoc,
InteriorObjectType | StaticShapeObjectType | StaticObjectType |
StaticShapeObjectType | StaticObjectType |
TerrainObjectType, &dummy)) {
if (mTargetInLOS) {
throwCallback( "onTargetExitLOS" );
......
......@@ -1363,7 +1363,6 @@ void Camera::_validateEyePoint(F32 pos, MatrixF *mat)
disableCollision();
RayInfo collision;
U32 mask = TerrainObjectType |
InteriorObjectType |
WaterObjectType |
StaticShapeObjectType |
PlayerObjectType |
......
......@@ -924,68 +924,6 @@ void ConvexShape::exportToCollada()
Con::errorf( "ConvexShape::exportToCollada() - has no surfaces to export!" );
return;
}
/*
// Get an optimized version of our mesh
OptimizedPolyList polyList;
if (bakeTransform)
{
MatrixF mat = getTransform();
Point3F scale = getScale();
pInterior->buildExportPolyList(interiorMesh, &mat, &scale);
}
else
pInterior->buildExportPolyList(interiorMesh);
// Get our export path
Torque::Path colladaFile = mInteriorRes.getPath();
// Make sure to set our Collada extension
colladaFile.setExtension("dae");
// Use the InteriorInstance name if possible
String meshName = getName();
// Otherwise use the DIF's file name
if (meshName.isEmpty())
meshName = colladaFile.getFileName();
// If we are baking the transform then append
// a CRC version of the transform to the mesh/file name
if (bakeTransform)
{
F32 trans[19];
const MatrixF& mat = getTransform();
const Point3F& scale = getScale();
// Copy in the transform
for (U32 i = 0; i < 4; i++)
{
for (U32 j = 0; j < 4; j++)
{
trans[i * 4 + j] = mat(i, j);
}
}
// Copy in the scale
trans[16] = scale.x;
trans[17] = scale.y;
trans[18] = scale.z;
U32 crc = CRC::calculateCRC(trans, sizeof(F32) * 19);
meshName += String::ToString("_%x", crc);
}
// Set the file name as the meshName
colladaFile.setFileName(meshName);
// Use a ColladaUtils function to do the actual export to a Collada file
ColladaUtils::exportToCollada(colladaFile, interiorMesh, meshName);
}
*/
}
void ConvexShape::resizePlanes( const Point3F &size )
......
......@@ -41,8 +41,7 @@
#include "lighting/lightQuery.h"
const U32 csmStaticCollisionMask = TerrainObjectType |
InteriorObjectType;
const U32 csmStaticCollisionMask = TerrainObjectType;
const U32 csmDynamicCollisionMask = StaticShapeObjectType;
......
......@@ -138,7 +138,7 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
// Collision info. We're going to be running LOS tests and we
// don't want to collide with the control object.
static U32 losMask = TerrainObjectType | InteriorObjectType | ShapeBaseObjectType;
static U32 losMask = TerrainObjectType | ShapeBaseObjectType;
control->disableCollision();
RayInfo info;
......
......@@ -177,7 +177,7 @@ void GuiShapeNameHud::onRender( Point2I, const RectI &updateRect)
// Collision info. We're going to be running LOS tests and we
// don't want to collide with the control object.
static U32 losMask = TerrainObjectType | InteriorObjectType | ShapeBaseObjectType;
static U32 losMask = TerrainObjectType | ShapeBaseObjectType;
control->disableCollision();
// All ghosted objects are added to the server connection group,
......
......@@ -397,7 +397,6 @@ void fxFoliageReplicator::initPersistFields()
addGroup( "Restrictions" ); // MM: Added Group Header.
addField( "AllowOnTerrain", TypeBool, Offset( mFieldData.mAllowOnTerrain, fxFoliageReplicator ), "Foliage will be placed on terrain when set." );
addField( "AllowOnInteriors", TypeBool, Offset( mFieldData.mAllowOnInteriors, fxFoliageReplicator ), "Foliage will be placed on InteriorInstances when set." );
addField( "AllowOnStatics", TypeBool, Offset( mFieldData.mAllowStatics, fxFoliageReplicator ), "Foliage will be placed on Static shapes when set." );
addField( "AllowOnWater", TypeBool, Offset( mFieldData.mAllowOnWater, fxFoliageReplicator ), "Foliage will be placed on/under water when set." );
addField( "AllowWaterSurface", TypeBool, Offset( mFieldData.mAllowWaterSurface, fxFoliageReplicator ), "Foliage will be placed on water when set. Requires AllowOnWater." );
......@@ -435,7 +434,6 @@ void fxFoliageReplicator::CreateFoliage(void)
// Check that we can position somewhere!
if (!( mFieldData.mAllowOnTerrain ||
mFieldData.mAllowOnInteriors ||
mFieldData.mAllowStatics ||
mFieldData.mAllowOnWater))
{
......@@ -633,7 +631,6 @@ void fxFoliageReplicator::CreateFoliage(void)
// Check Illegal Placements, fail if we hit a disallowed type.
if (((CollisionType & TerrainObjectType) && !mFieldData.mAllowOnTerrain) ||
((CollisionType & InteriorObjectType) && !mFieldData.mAllowOnInteriors) ||
((CollisionType & StaticShapeObjectType ) && !mFieldData.mAllowStatics) ||
((CollisionType & WaterObjectType) && !mFieldData.mAllowOnWater) ) continue;
......@@ -1700,7 +1697,6 @@ U32 fxFoliageReplicator::packUpdate(NetConnection * con, U32 mask, BitStream * s
stream->write(mFieldData.mLightTime); // Foliage Light Time.
stream->writeFlag(mFieldData.mAllowOnTerrain); // Allow on Terrain.
stream->writeFlag(mFieldData.mAllowOnInteriors); // Allow on Interiors.
stream->writeFlag(mFieldData.mAllowStatics); // Allow on Statics.
stream->writeFlag(mFieldData.mAllowOnWater); // Allow on Water.
stream->writeFlag(mFieldData.mAllowWaterSurface); // Allow on Water Surface.
......@@ -1777,7 +1773,6 @@ void fxFoliageReplicator::unpackUpdate(NetConnection * con, BitStream * stream)
stream->read(&mFieldData.mLightTime); // Foliage Light Time.
mFieldData.mAllowOnTerrain = stream->readFlag(); // Allow on Terrain.
mFieldData.mAllowOnInteriors = stream->readFlag(); // Allow on Interiors.
mFieldData.mAllowStatics = stream->readFlag(); // Allow on Statics.
mFieldData.mAllowOnWater = stream->readFlag(); // Allow on Water.
mFieldData.mAllowWaterSurface = stream->readFlag(); // Allow on Water Surface.
......
......@@ -47,12 +47,10 @@
#define AREA_ANIMATION_ARC (1.0f / 360.0f)
#define FXFOLIAGEREPLICATOR_COLLISION_MASK ( TerrainObjectType | \
InteriorObjectType | \
StaticShapeObjectType | \
WaterObjectType )
#define FXFOLIAGEREPLICATOR_NOWATER_COLLISION_MASK ( TerrainObjectType | \
InteriorObjectType | \
StaticShapeObjectType )
......@@ -311,7 +309,6 @@ public:
F32 mLightTime;
bool mAllowOnTerrain;
bool mAllowOnInteriors;
bool mAllowStatics;
bool mAllowOnWater;
bool mAllowWaterSurface;
......@@ -371,7 +368,6 @@ public:
mLightTime = 5.0f;
mAllowOnTerrain = true;
mAllowOnInteriors = true;
mAllowStatics = true;
mAllowOnWater = false;
mAllowWaterSurface = false;
......
......@@ -166,7 +166,6 @@ void fxShapeReplicator::initPersistFields()
addGroup( "Restraints" ); // MM: Added Group Header.
addField( "AllowOnTerrain", TypeBool, Offset( mFieldData.mAllowOnTerrain, fxShapeReplicator ), "Shapes will be placed on terrain when set." );
addField( "AllowOnInteriors", TypeBool, Offset( mFieldData.mAllowOnInteriors, fxShapeReplicator ), "Shapes will be placed on InteriorInstances when set." );
addField( "AllowOnStatics", TypeBool, Offset( mFieldData.mAllowStatics, fxShapeReplicator ), "Shapes will be placed on Static shapes when set." );
addField( "AllowOnWater", TypeBool, Offset( mFieldData.mAllowOnWater, fxShapeReplicator ), "Shapes will be placed on/under water when set." );
addField( "AllowWaterSurface", TypeBool, Offset( mFieldData.mAllowWaterSurface, fxShapeReplicator ), "Shapes will be placed on water when set. Requires AllowOnWater." );
......@@ -214,7 +213,6 @@ void fxShapeReplicator::CreateShapes(void)
// Check that we can position somewhere!
if (!( mFieldData.mAllowOnTerrain ||
mFieldData.mAllowOnInteriors ||
mFieldData.mAllowStatics ||
mFieldData.mAllowOnWater))
{
......@@ -318,7 +316,6 @@ void fxShapeReplicator::CreateShapes(void)
// Check Illegal Placements.
if (((CollisionType & TerrainObjectType) && !mFieldData.mAllowOnTerrain) ||
((CollisionType & InteriorObjectType) && !mFieldData.mAllowOnInteriors) ||
((CollisionType & StaticShapeObjectType) && !mFieldData.mAllowStatics) ||
((CollisionType & WaterObjectType) && !mFieldData.mAllowOnWater) ) continue;
......@@ -696,7 +693,6 @@ U32 fxShapeReplicator::packUpdate(NetConnection * con, U32 mask, BitStream * str
mathWrite(*stream, mFieldData.mShapeRotateMax); // Shapes Rotate Max.
stream->writeSignedInt(mFieldData.mOffsetZ, 32); // Shapes Offset Z.
stream->writeFlag(mFieldData.mAllowOnTerrain); // Allow on Terrain.
stream->writeFlag(mFieldData.mAllowOnInteriors); // Allow on Interiors.
stream->writeFlag(mFieldData.mAllowStatics); // Allow on Statics.
stream->writeFlag(mFieldData.mAllowOnWater); // Allow on Water.
stream->writeFlag(mFieldData.mAllowWaterSurface); // Allow on Water Surface.
......@@ -742,7 +738,6 @@ void fxShapeReplicator::unpackUpdate(NetConnection * con, BitStream * stream)
mathRead(*stream, &mFieldData.mShapeRotateMax); // Shapes Rotate Max.
mFieldData.mOffsetZ = stream->readSignedInt(32); // Shapes Offset Z.
mFieldData.mAllowOnTerrain = stream->readFlag(); // Allow on Terrain.
mFieldData.mAllowOnInteriors = stream->readFlag(); // Allow on Interiors.
mFieldData.mAllowStatics = stream->readFlag(); // Allow on Statics.
mFieldData.mAllowOnWater = stream->readFlag(); // Allow on Water.
mFieldData.mAllowWaterSurface = stream->readFlag(); // Allow on Water Surface.
......
......@@ -36,12 +36,10 @@
#define AREA_ANIMATION_ARC (1.0f / 360.0f)
#define FXREPLICATOR_COLLISION_MASK ( TerrainObjectType | \
InteriorObjectType | \
StaticShapeObjectType | \
WaterObjectType )
#define FXREPLICATOR_NOWATER_COLLISION_MASK ( TerrainObjectType | \
InteriorObjectType | \
StaticShapeObjectType )
......@@ -139,7 +137,6 @@ public:
U32 mOuterRadiusY;
S32 mOffsetZ;
bool mAllowOnTerrain;
bool mAllowOnInteriors;
bool mAllowStatics;
bool mAllowOnWater;
S32 mAllowedTerrainSlope;
......@@ -166,7 +163,6 @@ public:
mOffsetZ = 0;
mAllowOnTerrain = true;
mAllowOnInteriors = true;
mAllowStatics = true;
mAllowOnWater = false;
mAllowWaterSurface = false;
......
......@@ -45,7 +45,6 @@
static const U32 dropHitMask =
TerrainObjectType |
InteriorObjectType |
WaterObjectType |
StaticShapeObjectType;
......
......@@ -404,7 +404,6 @@ static void RegisterGameFunctions()
Con::setIntVariable("$TypeMasks::StaticObjectType", StaticObjectType);
Con::setIntVariable("$TypeMasks::EnvironmentObjectType", EnvironmentObjectType);
Con::setIntVariable("$TypeMasks::TerrainObjectType", TerrainObjectType);
Con::setIntVariable("$TypeMasks::InteriorObjectType", InteriorObjectType);
Con::setIntVariable("$TypeMasks::WaterObjectType", WaterObjectType);
Con::setIntVariable("$TypeMasks::TriggerObjectType", TriggerObjectType);
Con::setIntVariable("$TypeMasks::MarkerObjectType", MarkerObjectType);
......
......@@ -53,8 +53,9 @@ static S32 sMaxWarpTicks = 3; // Max warp duration in ticks
F32 Item::mGravity = -20.0f;
const U32 sClientCollisionMask = (TerrainObjectType |
InteriorObjectType | StaticShapeObjectType |
VehicleObjectType | PlayerObjectType);
StaticShapeObjectType |
VehicleObjectType |
PlayerObjectType);
const U32 sServerCollisionMask = (sClientCollisionMask);
......
......@@ -53,25 +53,21 @@ enum SceneObjectTypes
/// @see TerrainBlock
TerrainObjectType = BIT( 2 ),
/// A legacy DIF interior object.
/// @see InteriorInstance
InteriorObjectType = BIT( 3 ),
/// An object defining a water volume.
/// @see WaterObject
WaterObjectType = BIT( 4 ),
WaterObjectType = BIT( 3 ),
/// An object defining an invisible trigger volume.
/// @see Trigger
TriggerObjectType = BIT( 5 ),
TriggerObjectType = BIT( 4 ),
/// An object defining an invisible marker.
/// @see MissionMarker
MarkerObjectType = BIT( 6 ),
MarkerObjectType = BIT( 5 ),
/// A light emitter.
/// @see LightBase
LightObjectType = BIT( 7 ),
LightObjectType = BIT( 6 ),
/// An object that manages zones. This is automatically set by
/// SceneZoneSpaceManager when a SceneZoneSpace registers zones. Should
......@@ -79,7 +75,7 @@ enum SceneObjectTypes
///
/// @see SceneZoneSpace
/// @see SceneZoneSpaceManager
ZoneObjectType = BIT( 8 ),
ZoneObjectType = BIT( 7 ),
/// Any object that defines one or more solid, renderable static geometries that
/// should be included in collision and raycasts.
......@@ -87,13 +83,13 @@ enum SceneObjectTypes
/// Use this mask to find objects that are part of the static level geometry.
///
/// @note If you set this, you will also want to set StaticObjectType.
StaticShapeObjectType = BIT( 9 ),
StaticShapeObjectType = BIT( 8 ),
/// Any object that defines one or more solid, renderable dynamic geometries that
/// should be included in collision and raycasts.
///
/// Use this mask to find objects that are part of the dynamic game geometry.
DynamicShapeObjectType = BIT( 10 ),
DynamicShapeObjectType = BIT( 9 ),
/// @}
......@@ -102,54 +98,54 @@ enum SceneObjectTypes
/// Any GameBase-derived object.
/// @see GameBase
GameBaseObjectType = BIT( 11 ),
GameBaseObjectType = BIT( 10 ),
/// An object that uses hifi networking.
GameBaseHiFiObjectType = BIT( 12 ),
GameBaseHiFiObjectType = BIT( 11 ),
/// Any ShapeBase-derived object.
/// @see ShapeBase
ShapeBaseObjectType = BIT( 13 ),
ShapeBaseObjectType = BIT( 12 ),
/// A camera object.
/// @see Camera
CameraObjectType = BIT( 14 ),
CameraObjectType = BIT( 13 ),
/// A human or AI player object.
/// @see Player
PlayerObjectType = BIT( 15 ),
PlayerObjectType = BIT( 14 ),
/// An item pickup.
/// @see Item
ItemObjectType = BIT( 16 ),
ItemObjectType = BIT( 15 ),
/// A vehicle.
/// @see Vehicle
VehicleObjectType = BIT( 17 ),
VehicleObjectType = BIT( 16 ),
/// An object that blocks vehicles.
/// @see VehicleBlocker
VehicleBlockerObjectType = BIT( 18 ),
VehicleBlockerObjectType = BIT( 17 ),
/// A weapon projectile.
/// @see Projectile
ProjectileObjectType = BIT( 19 ),
ProjectileObjectType = BIT( 18 ),
/// An explosion object.
/// @see Explosion
ExplosionObjectType = BIT( 20 ),
ExplosionObjectType = BIT( 19 ),
/// A dead player. This is dynamically set and unset.
/// @see Player
CorpseObjectType = BIT( 21 ),
CorpseObjectType = BIT( 20 ),
/// A debris object.
/// @see Debris
DebrisObjectType = BIT( 22 ),
DebrisObjectType = BIT( 21 ),
/// A volume that asserts forces on player objects.
/// @see PhysicalZone
PhysicalZoneObjectType = BIT( 23 ),
PhysicalZoneObjectType = BIT( 22 ),
/// @}
};
......@@ -173,8 +169,7 @@ enum SceneObjectTypeMasks
///
/// Also, objects that do their own culling internally (terrains, forests, etc.)
/// should be excluded.
CULLING_INCLUDE_TYPEMASK = ( InteriorObjectType |
GameBaseObjectType | // Includes most other renderable types; but broader than we ideally want.
CULLING_INCLUDE_TYPEMASK = ( GameBaseObjectType | // Includes most other renderable types; but broader than we ideally want.
StaticShapeObjectType |
DynamicShapeObjectType |
ZoneObjectType ), // This improves the result of zone traversals.
......@@ -200,7 +195,6 @@ enum SceneObjectTypeMasks
///
/// @note Terrains have their own means for rendering inside interior zones.
OUTDOOR_OBJECT_TYPEMASK = ( TerrainObjectType |
InteriorObjectType |
EnvironmentObjectType )
};
......
......@@ -101,7 +101,6 @@ const F32 sAnchorMaxDistance = 32.0f;
//
static U32 sCollisionMoveMask = TerrainObjectType |
InteriorObjectType |
WaterObjectType |
PlayerObjectType |
StaticShapeObjectType |
......@@ -3386,8 +3385,7 @@ void Player::updateDeathOffsets()
//----------------------------------------------------------------------------
static const U32 sPlayerConformMask = InteriorObjectType|StaticShapeObjectType|
StaticObjectType|TerrainObjectType;
static const U32 sPlayerConformMask = StaticShapeObjectType | StaticObjectType | TerrainObjectType;
static void accel(F32& from, F32 to, F32 rate)
{
......
......@@ -126,12 +126,9 @@ IMPLEMENT_CALLBACK( ProjectileData, onCollision, void, ( Projectile* proj, Scene
"@see Projectile\n"
);
const U32 Projectile::csmStaticCollisionMask = TerrainObjectType |
InteriorObjectType |
StaticShapeObjectType;
const U32 Projectile::csmStaticCollisionMask = TerrainObjectType | StaticShapeObjectType;
const U32 Projectile::csmDynamicCollisionMask = PlayerObjectType |
VehicleObjectType;
const U32 Projectile::csmDynamicCollisionMask = PlayerObjectType | VehicleObjectType;
const U32 Projectile::csmDamageableMask = Projectile::csmDynamicCollisionMask;
......
......@@ -198,9 +198,9 @@ namespace {
static F32 sRestTol = 0.5; // % of gravity energy to be at rest
static int sRestCount = 10; // Consecutive ticks before comming to rest
const U32 sCollisionMoveMask = (TerrainObjectType | InteriorObjectType |
PlayerObjectType | StaticShapeObjectType | VehicleObjectType |
VehicleBlockerObjectType);
const U32 sCollisionMoveMask = ( TerrainObjectType | PlayerObjectType |
StaticShapeObjectType | VehicleObjectType |
VehicleBlockerObjectType );
const U32 sServerCollisionMask = sCollisionMoveMask; // ItemObjectType
const U32 sClientCollisionMask = sCollisionMoveMask;
......
......@@ -622,7 +622,7 @@ DefineEngineMethod( ShapeBaseData, checkDeployPos, bool, ( TransformF txfm ),,
polyList.mPlaneList[i] = temp;
}
if (gServerContainer.buildPolyList(PLC_Collision, wBox, InteriorObjectType | StaticShapeObjectType, &polyList))
if (gServerContainer.buildPolyList(PLC_Collision, wBox, StaticShapeObjectType, &polyList))
return false;
return true;
}
......@@ -5038,7 +5038,7 @@ DefineEngineMethod( ShapeBase, dumpMeshVisibility, void, (),,
#endif // #ifndef TORQUE_SHIPPING
//------------------------------------------------------------------------
//These functions are duplicated in tsStatic, shapeBase, and interiorInstance.
//These functions are duplicated in tsStatic and shapeBase.
//They each function a little differently; but achieve the same purpose of gathering
//target names/counts without polluting simObject.
......
......@@ -1036,7 +1036,7 @@ void TSStaticPolysoupConvex::getFeatures(const MatrixF& mat,const VectorF& n, Co
}
//------------------------------------------------------------------------
//These functions are duplicated in tsStatic, shapeBase, and interiorInstance.
//These functions are duplicated in tsStatic and shapeBase.
//They each function a little differently; but achieve the same purpose of gathering
//target names/counts without polluting simObject.
......
......@@ -37,7 +37,6 @@ static U32 sScanTypeMask = PlayerObjectType |
VehicleObjectType;
static U32 sAimTypeMask = TerrainObjectType |
InteriorObjectType |
WaterObjectType |
PlayerObjectType |
StaticShapeObjectType |
......
......@@ -40,7 +40,7 @@ static F32 sMinWarpTicks = 0.5 ; // Fraction of tick at which instant war
static S32 sMaxWarpTicks = 3; // Max warp duration in ticks
const U32 sClientCollisionMask = (TerrainObjectType |
InteriorObjectType | StaticShapeObjectType |
StaticShapeObjectType |
VehicleObjectType);
const U32 sServerCollisionMask = (sClientCollisionMask);
......
......@@ -43,10 +43,10 @@
//----------------------------------------------------------------------------
const static U32 sCollisionMoveMask = ( TerrainObjectType | InteriorObjectType |
WaterObjectType | PlayerObjectType |
StaticShapeObjectType | VehicleObjectType |
VehicleBlockerObjectType );
const static U32 sCollisionMoveMask = ( TerrainObjectType | WaterObjectType |
PlayerObjectType | StaticShapeObjectType |
VehicleObjectType | VehicleBlockerObjectType );
static U32 sServerCollisionMask = sCollisionMoveMask; // ItemObjectType
static U32 sClientCollisionMask = sCollisionMoveMask;
......
......@@ -73,9 +73,9 @@ namespace {
const U32 sIntergrationsPerTick = 1;
const F32 sHoverVehicleGravity = -20;
const U32 sCollisionMoveMask = (TerrainObjectType | InteriorObjectType |
PlayerObjectType | StaticShapeObjectType |
VehicleObjectType | VehicleBlockerObjectType);
const U32 sCollisionMoveMask = (TerrainObjectType | PlayerObjectType |
StaticShapeObjectType | VehicleObjectType |
VehicleBlockerObjectType);
const U32 sServerCollisionMask = sCollisionMoveMask; // ItemObjectType
const U32 sClientCollisionMask = sCollisionMoveMask;
......@@ -724,7 +724,7 @@ void HoverVehicle::updateForces(F32 /*dt*/)
for (j = 0; j < 2; j++) {
if (getContainer()->castRay(stabPoints[j].wsPoint, stabPoints[j].wsPoint + stabPoints[j].wsExtension * 2.0,
TerrainObjectType |
InteriorObjectType | WaterObjectType, &rinfo))
WaterObjectType, &rinfo))
{
reallyFloating = false;
......
......@@ -47,12 +47,12 @@
#include "lighting/lightQuery.h"
// Collision masks are used to determin what type of objects the
// Collision masks are used to determine what type of objects the
// wheeled vehicle will collide with.
static U32 sClientCollisionMask =
TerrainObjectType | InteriorObjectType |
PlayerObjectType | StaticShapeObjectType |
VehicleObjectType | VehicleBlockerObjectType;
TerrainObjectType | PlayerObjectType |
StaticShapeObjectType | VehicleObjectType |
VehicleBlockerObjectType;
// Gravity constant
static F32 sWheeledVehicleGravity = -20;
......
......@@ -83,7 +83,6 @@ enum ConvexType {
TSConvexType,
BoxConvexType,
TerrainConvexType,
InteriorConvexType,
ShapeBaseConvexType,
TSStaticConvexType,
AtlasChunkConvexType, ///< @deprecated
......
......@@ -243,7 +243,7 @@ void WaterBlock::setupVertexBlock( U32 width, U32 height, U32 rowOffset )
// to a ray cast could detected.
if(gClientContainer.castRay(start, end,
//StaticObjectType |
InteriorObjectType |
//InteriorObjectType |
//ShapeBaseObjectType |
//StaticShapeObjectType |
//ItemObjectType |
......@@ -280,7 +280,7 @@ void WaterBlock::setupVertexBlock( U32 width, U32 height, U32 rowOffset )
if(gClientContainer.castRay(worldPoint, worldPoint + sunVector * 9000.f,
//StaticObjectType |
InteriorObjectType |
//InteriorObjectType |
//ShapeBaseObjectType |
//StaticShapeObjectType |
//ItemObjectType |
......
......@@ -33,7 +33,6 @@
#include "gfx/gfxDrawUtil.h"
#include "gui/core/guiCanvas.h"
#include "gui/worldEditor/terrainActions.h"
#include "interior/interiorInstance.h"
#include "terrain/terrMaterial.h"
......@@ -2244,73 +2243,6 @@ void TerrainEditor::markEmptySquares()
{
if(!checkTerrainBlock(this, "markEmptySquares"))
return;
// TODO!
/*
// build a list of all the marked interiors
Vector<InteriorInstance*> interiors;
U32 mask = InteriorObjectType;
gServerContainer.findObjects(mask, findObjectsCallback, &interiors);
// walk the terrains and empty any grid which clips to an interior
for (U32 i = 0; i < mTerrainBlocks.size(); i++)
{
for(U32 x = 0; x < TerrainBlock::BlockSize; x++)
{
for(U32 y = 0; y < TerrainBlock::BlockSize; y++)
{
TerrainBlock::Material * material = mTerrainBlocks[i]->getMaterial(x,y);
material->flags |= ~(TerrainBlock::Material::Empty);
Point3F a, b;
gridToWorld(Point2I(x,y), a, mTerrainBlocks[i]);
gridToWorld(Point2I(x+1,y+1), b, mTerrainBlocks[i]);
Box3F box;
box.minExtents = a;
box.maxExtents = b;
box.minExtents.setMin(b);
box.maxExtents.setMax(a);
const MatrixF & terrOMat = mTerrainBlocks[i]->getTransform();
const MatrixF & terrWMat = mTerrainBlocks[i]->getWorldTransform();
terrWMat.mulP(box.minExtents);
terrWMat.mulP(box.maxExtents);
for(U32 i = 0; i < interiors.size(); i++)
{
MatrixF mat = interiors[i]->getWorldTransform();
mat.scale(interiors[i]->getScale());
mat.mul(terrOMat);
U32 waterMark = FrameAllocator::getWaterMark();
U16* zoneVector = (U16*)FrameAllocator::alloc(interiors[i]->getDetailLevel(0)->getNumZones());
U32 numZones = 0;
interiors[i]->getDetailLevel(0)->scanZones(box, mat,
zoneVector, &numZones);
if (numZones != 0)
{
Con::printf("%d %d", x, y);
material->flags |= TerrainBlock::Material::Empty;
FrameAllocator::setWaterMark(waterMark);
break;
}
FrameAllocator::setWaterMark(waterMark);
}
}
}
}
// rebuild stuff..
for (U32 i = 0; i < mTerrainBlocks.size(); i++)
{