Procházet zdrojové kódy

Merge pull request #839 from eightyeight/bank-fixes

Some engine fixes
Daniel Buckmaster před 11 roky
rodič
revize
7162fd609d

+ 0 - 1
Engine/source/T3D/debris.cpp

@@ -99,7 +99,6 @@ DebrisData::DebrisData()
    friction   = 0.2f;
    numBounces = 0;
    bounceVariance = 0;
-   minSpinSpeed = maxSpinSpeed = 0.0;
    staticOnMaxBounce = false;
    explodeOnMaxBounce = false;
    snapOnMaxBounce = false;

+ 2 - 2
Engine/source/T3D/turret/turretShape.cpp

@@ -1155,7 +1155,7 @@ void TurretShape::unpackUpdate(NetConnection *connection, BitStream *stream)
 void TurretShape::getWeaponMountTransform( S32 index, const MatrixF &xfm, MatrixF *outMat )
 {
    // Returns mount point to world space transform
-   if ( index >= 0 && index < SceneObject::NumMountPoints) {
+   if ( index >= 0 && index < ShapeBase::MaxMountedImages) {
       S32 ni = mDataBlock->weaponMountNode[index];
       if (ni != -1) {
          MatrixF mountTransform = mShapeInstance->mNodeTransforms[ni];
@@ -1180,7 +1180,7 @@ void TurretShape::getWeaponMountTransform( S32 index, const MatrixF &xfm, Matrix
 void TurretShape::getRenderWeaponMountTransform( F32 delta, S32 mountPoint, const MatrixF &xfm, MatrixF *outMat )
 {
    // Returns mount point to world space transform
-   if ( mountPoint >= 0 && mountPoint < SceneObject::NumMountPoints) {
+   if ( mountPoint >= 0 && mountPoint < ShapeBase::MaxMountedImages) {
       S32 ni = mDataBlock->weaponMountNode[mountPoint];
       if (ni != -1) {
          MatrixF mountTransform = mShapeInstance->mNodeTransforms[ni];

+ 2 - 2
Engine/source/console/fileSystemFunctions.cpp

@@ -696,7 +696,7 @@ DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd )
 	"@ingroup FileSystem")
 {
    static const U32 bufSize = 512;
-   char *buf = Con::getReturnBuffer(buf);
+   char *buf = Con::getReturnBuffer(bufSize);
    Platform::makeFullPathName(path, buf, bufSize, dStrlen(cwd) > 1 ? cwd : NULL);
    return buf;
 }
@@ -723,7 +723,7 @@ DefineEngineFunction(pathConcat, String, ( const char* path, const char* file),,
 	"@ingroup FileSystem")
 {
    static const U32 bufSize = 1024;
-   char *buf = Con::getReturnBuffer(buf);
+   char *buf = Con::getReturnBuffer(bufSize);
    Platform::makeFullPathName(file, buf, bufSize, path);
    return buf;
 }

+ 1 - 1
Engine/source/materials/processedFFMaterial.cpp

@@ -368,7 +368,7 @@ void ProcessedFFMaterial::_initPassStateBlock( RenderPassData *rpd, GFXStateBloc
       result.blendDefined = true;
       result.blendEnable = true;
       result.blendSrc = GFXBlendOne;
-      result.blendSrc = GFXBlendOne;
+      result.blendDest = GFXBlendZero;
    }
 
    // This is here for generic FF shader fallbacks.

+ 0 - 1
Engine/source/renderInstance/renderBinManager.cpp

@@ -122,7 +122,6 @@ void RenderBinManager::internalAddElement(RenderInst* inst)
    mElementList.increment();
    MainSortElem &elem = mElementList.last();
    elem.inst = inst;
-   elem.key = elem.key2 = 0;
 
    elem.key = inst->defaultKey;
    elem.key2 = inst->defaultKey2;

+ 0 - 1
Engine/source/scene/simPath.cpp

@@ -371,7 +371,6 @@ Marker::Marker()
    mTypeMask |= MarkerObjectType;
 
    mSeqNum   = 0;
-   mSmoothingType = SmoothingTypeLinear;
    mMSToNext = 1000;
    mSmoothingType = SmoothingTypeSpline;
    mKnotType = KnotTypeNormal;