mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency
Conflicts: Engine/source/platform/platformCPUCount.cpp
This commit is contained in:
commit
87d9e245b7
210 changed files with 896 additions and 896 deletions
|
|
@ -63,7 +63,7 @@ AIClient::AIClient() {
|
|||
mMoveTolerance = 0.25f;
|
||||
|
||||
// Clear the triggers
|
||||
for( int i = 0; i < MaxTriggerKeys; i++ )
|
||||
for( S32 i = 0; i < MaxTriggerKeys; i++ )
|
||||
mTriggers[i] = false;
|
||||
|
||||
mAimToDestination = true;
|
||||
|
|
@ -369,7 +369,7 @@ U32 AIClient::getMoveList( Move **movePtr,U32 *numMoves ) {
|
|||
}
|
||||
|
||||
// Copy over the trigger status
|
||||
for( int i = 0; i < MaxTriggerKeys; i++ ) {
|
||||
for( S32 i = 0; i < MaxTriggerKeys; i++ ) {
|
||||
mMove.trigger[i] = mTriggers[i];
|
||||
mTriggers[i] = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ bool AIPlayer::getAIMove(Move *movePtr)
|
|||
|
||||
// Replicate the trigger state into the move so that
|
||||
// triggers can be controlled from scripts.
|
||||
for( int i = 0; i < MaxTriggerKeys; i++ )
|
||||
for( S32 i = 0; i < MaxTriggerKeys; i++ )
|
||||
movePtr->trigger[i] = getImageTriggerState(i);
|
||||
|
||||
mLastLocation = location;
|
||||
|
|
|
|||
|
|
@ -1546,7 +1546,7 @@ void Camera::_validateEyePoint(F32 pos, MatrixF *mat)
|
|||
float dot = mDot(dir, collision.normal);
|
||||
if (dot > 0.01f)
|
||||
{
|
||||
float colDist = mDot(startPos - collision.point, dir) - (1 / dot) * CameraRadius;
|
||||
F32 colDist = mDot(startPos - collision.point, dir) - (1 / dot) * CameraRadius;
|
||||
if (colDist > pos)
|
||||
colDist = pos;
|
||||
if (colDist < 0.0f)
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ void CameraSpline::renderTimeMap()
|
|||
if(!ptr) return;
|
||||
|
||||
MRandomLCG random(1376312589 * (U32)this);
|
||||
int index = 0;
|
||||
S32 index = 0;
|
||||
for(Vector<TimeMap>::iterator itr=mTimeMap.begin(); itr != mTimeMap.end(); itr++)
|
||||
{
|
||||
Knot a;
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ bool DebrisData::onAdd()
|
|||
if(!Parent::onAdd())
|
||||
return false;
|
||||
|
||||
for( int i=0; i<DDC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<DDC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( !emitterList[i] && emitterIDList[i] != 0 )
|
||||
{
|
||||
|
|
@ -303,7 +303,7 @@ void DebrisData::packData(BitStream* stream)
|
|||
stream->writeString( textureName );
|
||||
stream->writeString( shapeName );
|
||||
|
||||
for( int i=0; i<DDC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<DDC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( stream->writeFlag( emitterList[i] != NULL ) )
|
||||
{
|
||||
|
|
@ -346,7 +346,7 @@ void DebrisData::unpackData(BitStream* stream)
|
|||
textureName = stream->readSTString();
|
||||
shapeName = stream->readSTString();
|
||||
|
||||
for( int i=0; i<DDC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<DDC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( stream->readFlag() )
|
||||
{
|
||||
|
|
@ -512,7 +512,7 @@ bool Debris::onAdd()
|
|||
}
|
||||
|
||||
// create emitters
|
||||
for( int i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( mDataBlock->emitterList[i] != NULL )
|
||||
{
|
||||
|
|
@ -631,7 +631,7 @@ bool Debris::onAdd()
|
|||
|
||||
void Debris::onRemove()
|
||||
{
|
||||
for( int i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( mEmitterList[i] )
|
||||
{
|
||||
|
|
@ -848,7 +848,7 @@ void Debris::updateEmitters( Point3F &pos, Point3F &vel, U32 ms )
|
|||
|
||||
Point3F lastPos = mLastPos;
|
||||
|
||||
for( int i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( mEmitterList[i] )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ ConsoleDocClass( DecalManager,
|
|||
|
||||
namespace {
|
||||
|
||||
int QSORT_CALLBACK cmpDecalInstance(const void* p1, const void* p2)
|
||||
S32 QSORT_CALLBACK cmpDecalInstance(const void* p1, const void* p2)
|
||||
{
|
||||
const DecalInstance** pd1 = (const DecalInstance**)p1;
|
||||
const DecalInstance** pd2 = (const DecalInstance**)p2;
|
||||
|
|
@ -125,7 +125,7 @@ int QSORT_CALLBACK cmpDecalInstance(const void* p1, const void* p2)
|
|||
return int(((char *)(*pd1)->mDataBlock) - ((char *)(*pd2)->mDataBlock));
|
||||
}
|
||||
|
||||
int QSORT_CALLBACK cmpPointsXY( const void *p1, const void *p2 )
|
||||
S32 QSORT_CALLBACK cmpPointsXY( const void *p1, const void *p2 )
|
||||
{
|
||||
const Point3F *pnt1 = (const Point3F*)p1;
|
||||
const Point3F *pnt2 = (const Point3F*)p2;
|
||||
|
|
@ -142,7 +142,7 @@ int QSORT_CALLBACK cmpPointsXY( const void *p1, const void *p2 )
|
|||
return 0;
|
||||
}
|
||||
|
||||
int QSORT_CALLBACK cmpQuadPointTheta( const void *p1, const void *p2 )
|
||||
S32 QSORT_CALLBACK cmpQuadPointTheta( const void *p1, const void *p2 )
|
||||
{
|
||||
const Point4F *pnt1 = (const Point4F*)p1;
|
||||
const Point4F *pnt2 = (const Point4F*)p2;
|
||||
|
|
@ -157,7 +157,7 @@ int QSORT_CALLBACK cmpQuadPointTheta( const void *p1, const void *p2 )
|
|||
|
||||
static Point3F gSortPoint;
|
||||
|
||||
int QSORT_CALLBACK cmpDecalDistance( const void *p1, const void *p2 )
|
||||
S32 QSORT_CALLBACK cmpDecalDistance( const void *p1, const void *p2 )
|
||||
{
|
||||
const DecalInstance** pd1 = (const DecalInstance**)p1;
|
||||
const DecalInstance** pd2 = (const DecalInstance**)p2;
|
||||
|
|
@ -168,7 +168,7 @@ int QSORT_CALLBACK cmpDecalDistance( const void *p1, const void *p2 )
|
|||
return mSign( dist1 - dist2 );
|
||||
}
|
||||
|
||||
int QSORT_CALLBACK cmpDecalRenderOrder( const void *p1, const void *p2 )
|
||||
S32 QSORT_CALLBACK cmpDecalRenderOrder( const void *p1, const void *p2 )
|
||||
{
|
||||
const DecalInstance** pd1 = (const DecalInstance**)p1;
|
||||
const DecalInstance** pd2 = (const DecalInstance**)p2;
|
||||
|
|
@ -179,14 +179,14 @@ int QSORT_CALLBACK cmpDecalRenderOrder( const void *p1, const void *p2 )
|
|||
return 1;
|
||||
else
|
||||
{
|
||||
int priority = (*pd1)->getRenderPriority() - (*pd2)->getRenderPriority();
|
||||
S32 priority = (*pd1)->getRenderPriority() - (*pd2)->getRenderPriority();
|
||||
|
||||
if ( priority != 0 )
|
||||
return priority;
|
||||
|
||||
if ( (*pd2)->mFlags & SaveDecal )
|
||||
{
|
||||
int id = ( (*pd1)->mDataBlock->getMaterial()->getId() - (*pd2)->mDataBlock->getMaterial()->getId() );
|
||||
S32 id = ( (*pd1)->mDataBlock->getMaterial()->getId() - (*pd2)->mDataBlock->getMaterial()->getId() );
|
||||
if ( id != 0 )
|
||||
return id;
|
||||
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ bool Explosion::onAdd()
|
|||
|
||||
void Explosion::onRemove()
|
||||
{
|
||||
for( int i=0; i<ExplosionData::EC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<ExplosionData::EC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( mEmitterList[i] )
|
||||
{
|
||||
|
|
@ -1114,7 +1114,7 @@ void Explosion::updateEmitters( F32 dt )
|
|||
{
|
||||
Point3F pos = getPosition();
|
||||
|
||||
for( int i=0; i<ExplosionData::EC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<ExplosionData::EC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( mEmitterList[i] )
|
||||
{
|
||||
|
|
@ -1134,7 +1134,7 @@ void Explosion::launchDebris( Point3F &axis )
|
|||
return;
|
||||
|
||||
bool hasDebris = false;
|
||||
for( int j=0; j<ExplosionData::EC_NUM_DEBRIS_TYPES; j++ )
|
||||
for( S32 j=0; j<ExplosionData::EC_NUM_DEBRIS_TYPES; j++ )
|
||||
{
|
||||
if( mDataBlock->debrisList[j] )
|
||||
{
|
||||
|
|
@ -1160,7 +1160,7 @@ void Explosion::launchDebris( Point3F &axis )
|
|||
|
||||
U32 numDebris = mDataBlock->debrisNum + sgRandom.randI( -mDataBlock->debrisNumVariance, mDataBlock->debrisNumVariance );
|
||||
|
||||
for( int i=0; i<numDebris; i++ )
|
||||
for( S32 i=0; i<numDebris; i++ )
|
||||
{
|
||||
|
||||
Point3F launchDir = MathUtils::randomDir( axis, mDataBlock->debrisThetaMin, mDataBlock->debrisThetaMax,
|
||||
|
|
@ -1249,7 +1249,7 @@ bool Explosion::explode()
|
|||
Point3F::Zero, U32(mDataBlock->particleDensity * mFade));
|
||||
}
|
||||
|
||||
for( int i=0; i<ExplosionData::EC_NUM_EMITTERS; i++ )
|
||||
for( S32 i=0; i<ExplosionData::EC_NUM_EMITTERS; i++ )
|
||||
{
|
||||
if( mDataBlock->emitterList[i] != NULL )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1139,7 +1139,7 @@ void LightningBolt::generateMinorNodes()
|
|||
{
|
||||
mMinorNodes.clear();
|
||||
|
||||
for( int i=0; i<mMajorNodes.numNodes - 1; i++ )
|
||||
for( S32 i=0; i<mMajorNodes.numNodes - 1; i++ )
|
||||
{
|
||||
NodeManager segment;
|
||||
segment.startPoint = mMajorNodes.nodeList[i].point;
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ ConsoleDocClass( ParticleData,
|
|||
"@see ParticleEmitterNode\n"
|
||||
);
|
||||
|
||||
static const float sgDefaultWindCoefficient = 0.0f;
|
||||
static const float sgDefaultConstantAcceleration = 0.f;
|
||||
static const float sgDefaultSpinSpeed = 1.f;
|
||||
static const float sgDefaultSpinRandomMin = 0.f;
|
||||
static const float sgDefaultSpinRandomMax = 0.f;
|
||||
static const F32 sgDefaultWindCoefficient = 0.0f;
|
||||
static const F32 sgDefaultConstantAcceleration = 0.f;
|
||||
static const F32 sgDefaultSpinSpeed = 1.f;
|
||||
static const F32 sgDefaultSpinRandomMin = 0.f;
|
||||
static const F32 sgDefaultSpinRandomMax = 0.f;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -622,7 +622,7 @@ bool ParticleData::reload(char errorBuffer[256])
|
|||
}
|
||||
/*
|
||||
numFrames = 0;
|
||||
for( int i=0; i<PDC_MAX_TEX; i++ )
|
||||
for( S32 i=0; i<PDC_MAX_TEX; i++ )
|
||||
{
|
||||
if( textureNameList[i] && textureNameList[i][0] )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,9 +100,9 @@ ConsoleDocClass( ParticleEmitterData,
|
|||
"@see ParticleEmitterNode\n"
|
||||
);
|
||||
|
||||
static const float sgDefaultEjectionOffset = 0.f;
|
||||
static const float sgDefaultPhiReferenceVel = 0.f;
|
||||
static const float sgDefaultPhiVariance = 360.f;
|
||||
static const F32 sgDefaultEjectionOffset = 0.f;
|
||||
static const F32 sgDefaultPhiReferenceVel = 0.f;
|
||||
static const F32 sgDefaultPhiVariance = 360.f;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ParticleEmitterData
|
||||
|
|
@ -929,7 +929,7 @@ void ParticleEmitter::prepRenderImage(SceneRenderState* state)
|
|||
//-----------------------------------------------------------------------------
|
||||
void ParticleEmitter::setSizes( F32 *sizeList )
|
||||
{
|
||||
for( int i=0; i<ParticleData::PDC_NUM_KEYS; i++ )
|
||||
for( S32 i=0; i<ParticleData::PDC_NUM_KEYS; i++ )
|
||||
{
|
||||
sizes[i] = sizeList[i];
|
||||
}
|
||||
|
|
@ -940,7 +940,7 @@ void ParticleEmitter::setSizes( F32 *sizeList )
|
|||
//-----------------------------------------------------------------------------
|
||||
void ParticleEmitter::setColors( ColorF *colorList )
|
||||
{
|
||||
for( int i=0; i<ParticleData::PDC_NUM_KEYS; i++ )
|
||||
for( S32 i=0; i<ParticleData::PDC_NUM_KEYS; i++ )
|
||||
{
|
||||
colors[i] = colorList[i];
|
||||
}
|
||||
|
|
@ -1455,7 +1455,7 @@ struct SortParticle
|
|||
};
|
||||
|
||||
// qsort callback function for particle sorting
|
||||
int QSORT_CALLBACK cmpSortParticles(const void* p1, const void* p2)
|
||||
S32 QSORT_CALLBACK cmpSortParticles(const void* p1, const void* p2)
|
||||
{
|
||||
const SortParticle* sp1 = (const SortParticle*)p1;
|
||||
const SortParticle* sp2 = (const SortParticle*)p2;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ void StdMoveList::clientWriteMovePacket(BitStream *bstream)
|
|||
bstream->writeInt(start,32);
|
||||
bstream->writeInt(count,MoveCountBits);
|
||||
Move * prevMove = NULL;
|
||||
for (int i = 0; i < count; i++)
|
||||
for (S32 i = 0; i < count; i++)
|
||||
{
|
||||
move[offset + i].sendCount++;
|
||||
move[offset + i].pack(bstream,prevMove);
|
||||
|
|
@ -112,7 +112,7 @@ void StdMoveList::serverReadMovePacket(BitStream *bstream)
|
|||
|
||||
// Skip forward (must be starting up), or over the moves
|
||||
// we already have.
|
||||
int skip = mLastMoveAck - start;
|
||||
S32 skip = mLastMoveAck - start;
|
||||
if (skip < 0)
|
||||
{
|
||||
mLastMoveAck = start;
|
||||
|
|
@ -121,7 +121,7 @@ void StdMoveList::serverReadMovePacket(BitStream *bstream)
|
|||
{
|
||||
if (skip > count)
|
||||
skip = count;
|
||||
for (int i = 0; i < skip; i++)
|
||||
for (S32 i = 0; i < skip; i++)
|
||||
{
|
||||
prevMoveHolder.unpack(bstream,prevMove);
|
||||
prevMoveHolder.checksum = bstream->readInt(Move::ChecksumBits);
|
||||
|
|
@ -141,7 +141,7 @@ void StdMoveList::serverReadMovePacket(BitStream *bstream)
|
|||
}
|
||||
|
||||
// Put the rest on the move list.
|
||||
int index = mMoveVec.size();
|
||||
S32 index = mMoveVec.size();
|
||||
mMoveVec.increment(count);
|
||||
while (index < mMoveVec.size())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ void Item::updatePos(const U32 /*mask*/, const F32 dt)
|
|||
// Pick the most resistant surface
|
||||
F32 bd = 0;
|
||||
const Collision* collision = 0;
|
||||
for (int c = 0; c < collisionList.getCount(); c++) {
|
||||
for (S32 c = 0; c < collisionList.getCount(); c++) {
|
||||
const Collision &cp = collisionList[c];
|
||||
F32 dot = -mDot(mVelocity,cp.normal);
|
||||
if (dot > bd) {
|
||||
|
|
@ -1204,7 +1204,7 @@ DefineEngineMethod( Item, isRotating, bool, (),,
|
|||
return object->isRotating();
|
||||
}
|
||||
|
||||
DefineEngineMethod( Item, setCollisionTimeout, bool, (int ignoreColObj),(NULL),
|
||||
DefineEngineMethod( Item, setCollisionTimeout, bool, (S32 ignoreColObj),(NULL),
|
||||
"@brief Temporarily disable collisions against a specific ShapeBase object.\n\n"
|
||||
|
||||
"This is useful to prevent a player from immediately picking up an Item they have "
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ U32 PathCamera::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
if (stream->writeFlag(mask & WindowMask)) {
|
||||
stream->write(mNodeBase);
|
||||
stream->write(mNodeCount);
|
||||
for (int i = 0; i < mNodeCount; i++) {
|
||||
for (S32 i = 0; i < mNodeCount; i++) {
|
||||
CameraSpline::Knot *knot = mSpline.getKnot(i);
|
||||
mathWrite(*stream, knot->mPosition);
|
||||
mathWrite(*stream, knot->mRotation);
|
||||
|
|
@ -477,7 +477,7 @@ void PathCamera::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
mSpline.removeAll();
|
||||
stream->read(&mNodeBase);
|
||||
stream->read(&mNodeCount);
|
||||
for (int i = 0; i < mNodeCount; i++)
|
||||
for (S32 i = 0; i < mNodeCount; i++)
|
||||
{
|
||||
CameraSpline::Knot *knot = new CameraSpline::Knot();
|
||||
mathRead(*stream, &knot->mPosition);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ private:
|
|||
S32 mNodeBase;
|
||||
S32 mNodeCount;
|
||||
F32 mPosition;
|
||||
int mState;
|
||||
S32 mState;
|
||||
F32 mTarget;
|
||||
bool mTargetSet;
|
||||
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
// Extract ground transform velocity from animations
|
||||
// Get the named ones first so they can be indexed directly.
|
||||
ActionAnimation *dp = &actionList[0];
|
||||
for (int i = 0; i < NumTableActionAnims; i++,dp++)
|
||||
for (S32 i = 0; i < NumTableActionAnims; i++,dp++)
|
||||
{
|
||||
ActionAnimationDef *sp = &ActionAnimationList[i];
|
||||
dp->name = sp->name;
|
||||
|
|
@ -492,7 +492,7 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
if (dStricmp(sp->name, "jet") != 0)
|
||||
AssertWarn(dp->sequence != -1, avar("PlayerData::preload - Unable to find named animation sequence '%s'!", sp->name));
|
||||
}
|
||||
for (int b = 0; b < mShape->sequences.size(); b++)
|
||||
for (S32 b = 0; b < mShape->sequences.size(); b++)
|
||||
{
|
||||
if (!isTableSequence(b))
|
||||
{
|
||||
|
|
@ -509,7 +509,7 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
// Resolve lookAction index
|
||||
dp = &actionList[0];
|
||||
String lookName("look");
|
||||
for (int c = 0; c < actionCount; c++,dp++)
|
||||
for (S32 c = 0; c < actionCount; c++,dp++)
|
||||
if( dStricmp( dp->name, lookName ) == 0 )
|
||||
lookAction = c;
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
if (!Sim::findObject(dustID, dustEmitter))
|
||||
Con::errorf(ConsoleLogEntry::General, "PlayerData::preload - Invalid packet, bad datablockId(dustEmitter): 0x%x", dustID);
|
||||
|
||||
for (int i=0; i<NUM_SPLASH_EMITTERS; i++)
|
||||
for (S32 i=0; i<NUM_SPLASH_EMITTERS; i++)
|
||||
if( !splashEmitterList[i] && splashEmitterIDList[i] != 0 )
|
||||
if( Sim::findObject( splashEmitterIDList[i], splashEmitterList[i] ) == false)
|
||||
Con::errorf(ConsoleLogEntry::General, "PlayerData::onAdd - Invalid packet, bad datablockId(particle emitter): 0x%x", splashEmitterIDList[i]);
|
||||
|
|
@ -647,7 +647,7 @@ bool PlayerData::isTableSequence(S32 seq)
|
|||
{
|
||||
// The sequences from the table must already have
|
||||
// been loaded for this to work.
|
||||
for (int i = 0; i < NumTableActionAnims; i++)
|
||||
for (S32 i = 0; i < NumTableActionAnims; i++)
|
||||
if (actionList[i].sequence == seq)
|
||||
return true;
|
||||
return false;
|
||||
|
|
@ -1944,7 +1944,7 @@ void Player::reSkin()
|
|||
Vector<String> skins;
|
||||
String(mSkinNameHandle.getString()).split( ";", skins );
|
||||
|
||||
for ( int i = 0; i < skins.size(); i++ )
|
||||
for ( S32 i = 0; i < skins.size(); i++ )
|
||||
{
|
||||
String oldSkin( mAppliedSkinName.c_str() );
|
||||
String newSkin( skins[i] );
|
||||
|
|
@ -1961,7 +1961,7 @@ void Player::reSkin()
|
|||
|
||||
// Apply skin to both 3rd person and 1st person shape instances
|
||||
mShapeInstance->reSkin( newSkin, oldSkin );
|
||||
for ( int j = 0; j < ShapeBase::MaxMountedImages; j++ )
|
||||
for ( S32 j = 0; j < ShapeBase::MaxMountedImages; j++ )
|
||||
{
|
||||
if (mShapeFPInstance[j])
|
||||
mShapeFPInstance[j]->reSkin( newSkin, oldSkin );
|
||||
|
|
@ -5822,7 +5822,7 @@ bool Player::castRay(const Point3F &start, const Point3F &end, RayInfo* info)
|
|||
F32 const *si = &start.x;
|
||||
F32 const *ei = &end.x;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (S32 i = 0; i < 3; i++) {
|
||||
if (*si < *ei) {
|
||||
if (*si > *bmax || *ei < *bmin)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -215,9 +215,9 @@ public:
|
|||
|
||||
void updateSound();
|
||||
|
||||
virtual bool calculateImpact( float simTime,
|
||||
virtual bool calculateImpact( F32 simTime,
|
||||
Point3F &pointOfImpact,
|
||||
float &impactTime );
|
||||
F32 &impactTime );
|
||||
|
||||
void setInitialPosition( const Point3F& pos );
|
||||
void setInitialVelocity( const Point3F& vel );
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ void ProximityMine::processTick( const Move* move )
|
|||
SimpleQueryList sql;
|
||||
getContainer()->findObjects( triggerBox, sTriggerCollisionMask,
|
||||
SimpleQueryList::insertionCallback, &sql );
|
||||
for ( int i = 0; i < sql.mList.size(); i++ )
|
||||
for ( S32 i = 0; i < sql.mList.size(); i++ )
|
||||
{
|
||||
// Detect movement in the trigger area
|
||||
if ( ( sql.mList[i] == mOwner && !mDataBlock->triggerOnOwner ) ||
|
||||
|
|
|
|||
|
|
@ -265,8 +265,8 @@ void Rigid::translateCenterOfMass(const Point3F &oldPos,const Point3F &newPos)
|
|||
MatrixF oldx,newx;
|
||||
oldx.setCrossProduct(oldPos);
|
||||
newx.setCrossProduct(newPos);
|
||||
for (int row = 0; row < 3; row++)
|
||||
for (int col = 0; col < 3; col++) {
|
||||
for (S32 row = 0; row < 3; row++)
|
||||
for (S32 col = 0; col < 3; col++) {
|
||||
F32 n = newx(row,col), o = oldx(row,col);
|
||||
objectInertia(row,col) += mass * ((o * o) - (n * n));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ namespace {
|
|||
|
||||
// Physics and collision constants
|
||||
static F32 sRestTol = 0.5; // % of gravity energy to be at rest
|
||||
static int sRestCount = 10; // Consecutive ticks before comming to rest
|
||||
static S32 sRestCount = 10; // Consecutive ticks before comming to rest
|
||||
|
||||
const U32 sCollisionMoveMask = ( TerrainObjectType | PlayerObjectType |
|
||||
StaticShapeObjectType | VehicleObjectType |
|
||||
|
|
@ -1652,7 +1652,7 @@ void RigidShape::_renderMassAndContacts( ObjectRenderInst *ri, SceneRenderState
|
|||
GFX->getDrawUtil()->drawCube( desc, Point3F(0.1f,0.1f,0.1f), mDataBlock->massCenter, ColorI(255, 255, 255), &mRenderObjToWorld );
|
||||
|
||||
// Collision points...
|
||||
for (int i = 0; i < mCollisionList.getCount(); i++)
|
||||
for (S32 i = 0; i < mCollisionList.getCount(); i++)
|
||||
{
|
||||
const Collision& collision = mCollisionList[i];
|
||||
GFX->getDrawUtil()->drawCube( desc, Point3F(0.05f,0.05f,0.05f), collision.point, ColorI(0, 0, 255) );
|
||||
|
|
@ -1660,7 +1660,7 @@ void RigidShape::_renderMassAndContacts( ObjectRenderInst *ri, SceneRenderState
|
|||
|
||||
// Render the normals as one big batch...
|
||||
PrimBuild::begin(GFXLineList, mCollisionList.getCount() * 2);
|
||||
for (int i = 0; i < mCollisionList.getCount(); i++)
|
||||
for (S32 i = 0; i < mCollisionList.getCount(); i++)
|
||||
{
|
||||
|
||||
const Collision& collision = mCollisionList[i];
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ class RigidShape: public ShapeBase
|
|||
CollisionList mContacts;
|
||||
Rigid mRigid;
|
||||
ShapeBaseConvex mConvex;
|
||||
int restCount;
|
||||
S32 restCount;
|
||||
|
||||
SimObjectPtr<ParticleEmitter> mDustEmitterList[RigidShapeData::VC_NUM_DUST_EMITTERS];
|
||||
SimObjectPtr<ParticleEmitter> mSplashEmitterList[RigidShapeData::VC_NUM_SPLASH_EMITTERS];
|
||||
|
|
|
|||
|
|
@ -1282,7 +1282,7 @@ void ShapeBase::processTick(const Move* move)
|
|||
{
|
||||
mMoveMotion = true;
|
||||
}
|
||||
for (int i = 0; i < MaxMountedImages; i++)
|
||||
for (S32 i = 0; i < MaxMountedImages; i++)
|
||||
{
|
||||
setImageMotionState(i, mMoveMotion);
|
||||
}
|
||||
|
|
@ -1305,7 +1305,7 @@ void ShapeBase::processTick(const Move* move)
|
|||
// Advance images
|
||||
if (isServerObject())
|
||||
{
|
||||
for (int i = 0; i < MaxMountedImages; i++)
|
||||
for (S32 i = 0; i < MaxMountedImages; i++)
|
||||
{
|
||||
if (mMountedImageList[i].dataBlock)
|
||||
updateImageState(i, TickSec);
|
||||
|
|
@ -1347,7 +1347,7 @@ void ShapeBase::advanceTime(F32 dt)
|
|||
// advanced at framerate.
|
||||
advanceThreads(dt);
|
||||
updateAudioPos();
|
||||
for (int i = 0; i < MaxMountedImages; i++)
|
||||
for (S32 i = 0; i < MaxMountedImages; i++)
|
||||
if (mMountedImageList[i].dataBlock)
|
||||
{
|
||||
updateImageState(i, dt);
|
||||
|
|
@ -2240,7 +2240,7 @@ void ShapeBase::stopAudio(U32 slot)
|
|||
void ShapeBase::updateServerAudio()
|
||||
{
|
||||
// Timeout non-looping sounds
|
||||
for (int i = 0; i < MaxSoundThreads; i++) {
|
||||
for (S32 i = 0; i < MaxSoundThreads; i++) {
|
||||
Sound& st = mSoundThread[i];
|
||||
if (st.play && st.timeout && st.timeout < Sim::getCurrentTime()) {
|
||||
clearMaskBits(SoundMaskN << i);
|
||||
|
|
@ -2280,7 +2280,7 @@ void ShapeBase::updateAudioState(Sound& st)
|
|||
|
||||
void ShapeBase::updateAudioPos()
|
||||
{
|
||||
for (int i = 0; i < MaxSoundThreads; i++)
|
||||
for (S32 i = 0; i < MaxSoundThreads; i++)
|
||||
{
|
||||
SFXSource* source = mSoundThread[i].sound;
|
||||
if ( source )
|
||||
|
|
@ -3113,7 +3113,7 @@ U32 ShapeBase::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
}
|
||||
|
||||
if (stream->writeFlag(mask & ThreadMask)) {
|
||||
for (int i = 0; i < MaxScriptThreads; i++) {
|
||||
for (S32 i = 0; i < MaxScriptThreads; i++) {
|
||||
Thread& st = mScriptThread[i];
|
||||
if (stream->writeFlag( (st.sequence != -1 || st.state == Thread::Destroy) && (mask & (ThreadMaskN << i)) ) ) {
|
||||
stream->writeInt(st.sequence,ThreadSequenceBits);
|
||||
|
|
@ -3126,7 +3126,7 @@ U32 ShapeBase::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
}
|
||||
|
||||
if (stream->writeFlag(mask & SoundMask)) {
|
||||
for (int i = 0; i < MaxSoundThreads; i++) {
|
||||
for (S32 i = 0; i < MaxSoundThreads; i++) {
|
||||
Sound& st = mSoundThread[i];
|
||||
if (stream->writeFlag(mask & (SoundMaskN << i)))
|
||||
if (stream->writeFlag(st.play))
|
||||
|
|
@ -3136,7 +3136,7 @@ U32 ShapeBase::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
}
|
||||
|
||||
if (stream->writeFlag(mask & ImageMask)) {
|
||||
for (int i = 0; i < MaxMountedImages; i++)
|
||||
for (S32 i = 0; i < MaxMountedImages; i++)
|
||||
if (stream->writeFlag(mask & (ImageMaskN << i))) {
|
||||
MountedImage& image = mMountedImageList[i];
|
||||
if (stream->writeFlag(image.dataBlock))
|
||||
|
|
@ -3271,7 +3271,7 @@ void ShapeBase::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
|
||||
// Mounted Images
|
||||
if (stream->readFlag()) {
|
||||
for (int i = 0; i < MaxMountedImages; i++) {
|
||||
for (S32 i = 0; i < MaxMountedImages; i++) {
|
||||
if (stream->readFlag()) {
|
||||
MountedImage& image = mMountedImageList[i];
|
||||
ShapeBaseImageData* imageData = 0;
|
||||
|
|
@ -3308,9 +3308,9 @@ void ShapeBase::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
image.genericTrigger[j] = stream->readFlag();
|
||||
}
|
||||
|
||||
int count = stream->readInt(3);
|
||||
int altCount = stream->readInt(3);
|
||||
int reloadCount = stream->readInt(3);
|
||||
S32 count = stream->readInt(3);
|
||||
S32 altCount = stream->readInt(3);
|
||||
S32 reloadCount = stream->readInt(3);
|
||||
|
||||
bool datablockChange = image.dataBlock != imageData;
|
||||
if (datablockChange || (image.skinNameHandle != skinDesiredNameHandle))
|
||||
|
|
@ -3742,7 +3742,7 @@ void ShapeBase::reSkin()
|
|||
Vector<String> skins;
|
||||
String(mSkinNameHandle.getString()).split( ";", skins );
|
||||
|
||||
for (int i = 0; i < skins.size(); i++)
|
||||
for (S32 i = 0; i < skins.size(); i++)
|
||||
{
|
||||
String oldSkin( mAppliedSkinName.c_str() );
|
||||
String newSkin( skins[i] );
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ ShapeBaseImageData::ShapeBaseImageData()
|
|||
scriptAnimTransitionTime = 0.25f;
|
||||
|
||||
//
|
||||
for (int i = 0; i < MaxStates; i++) {
|
||||
for (S32 i = 0; i < MaxStates; i++) {
|
||||
stateName[i] = 0;
|
||||
|
||||
stateTransitionLoaded[i] = 0;
|
||||
|
|
@ -3057,7 +3057,7 @@ TICKAGAIN:
|
|||
|
||||
if (image.spinThread[i])
|
||||
{
|
||||
float timeScale;
|
||||
F32 timeScale;
|
||||
|
||||
switch (stateData.spin)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ bool Trigger::castRay(const Point3F &start, const Point3F &end, RayInfo* info)
|
|||
F32 const *si = &start.x;
|
||||
F32 const *ei = &end.x;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (S32 i = 0; i < 3; i++)
|
||||
{
|
||||
if (*si < *ei)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ void TSStatic::reSkin()
|
|||
Vector<String> skins;
|
||||
String(mSkinNameHandle.getString()).split( ";", skins );
|
||||
|
||||
for (int i = 0; i < skins.size(); i++)
|
||||
for (S32 i = 0; i < skins.size(); i++)
|
||||
{
|
||||
String oldSkin( mAppliedSkinName.c_str() );
|
||||
String newSkin( skins[i] );
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ AITurretShapeData::AITurretShapeData()
|
|||
|
||||
weaponLeadVelocity = 0;
|
||||
|
||||
for (int i = 0; i < MaxStates; i++) {
|
||||
for (S32 i = 0; i < MaxStates; i++) {
|
||||
stateName[i] = 0;
|
||||
stateTransitionAtRest[i] = 0;
|
||||
stateTransitionNotAtRest[i] = 0;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ const F32 sVehicleGravity = -20;
|
|||
|
||||
// Physics and collision constants
|
||||
static F32 sRestTol = 0.5; // % of gravity energy to be at rest
|
||||
static int sRestCount = 10; // Consecutive ticks before comming to rest
|
||||
static S32 sRestCount = 10; // Consecutive ticks before comming to rest
|
||||
|
||||
} // namespace {}
|
||||
|
||||
|
|
@ -341,14 +341,14 @@ void VehicleData::packData(BitStream* stream)
|
|||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < VC_NUM_DAMAGE_EMITTER_AREAS; j++)
|
||||
for (S32 j = 0; j < VC_NUM_DAMAGE_EMITTER_AREAS; j++)
|
||||
{
|
||||
stream->write( damageEmitterOffset[j].x );
|
||||
stream->write( damageEmitterOffset[j].y );
|
||||
stream->write( damageEmitterOffset[j].z );
|
||||
}
|
||||
|
||||
for (int k = 0; k < VC_NUM_DAMAGE_LEVELS; k++)
|
||||
for (S32 k = 0; k < VC_NUM_DAMAGE_LEVELS; k++)
|
||||
{
|
||||
stream->write( damageLevelTolerance[k] );
|
||||
}
|
||||
|
|
@ -440,14 +440,14 @@ void VehicleData::unpackData(BitStream* stream)
|
|||
}
|
||||
}
|
||||
|
||||
for( int j=0; j<VC_NUM_DAMAGE_EMITTER_AREAS; j++ )
|
||||
for( S32 j=0; j<VC_NUM_DAMAGE_EMITTER_AREAS; j++ )
|
||||
{
|
||||
stream->read( &damageEmitterOffset[j].x );
|
||||
stream->read( &damageEmitterOffset[j].y );
|
||||
stream->read( &damageEmitterOffset[j].z );
|
||||
}
|
||||
|
||||
for( int k=0; k<VC_NUM_DAMAGE_LEVELS; k++ )
|
||||
for( S32 k=0; k<VC_NUM_DAMAGE_LEVELS; k++ )
|
||||
{
|
||||
stream->read( &damageLevelTolerance[k] );
|
||||
}
|
||||
|
|
@ -718,7 +718,7 @@ bool Vehicle::onAdd()
|
|||
{
|
||||
if( mDataBlock->dustEmitter )
|
||||
{
|
||||
for( int i=0; i<VehicleData::VC_NUM_DUST_EMITTERS; i++ )
|
||||
for( S32 i=0; i<VehicleData::VC_NUM_DUST_EMITTERS; i++ )
|
||||
{
|
||||
mDustEmitterList[i] = new ParticleEmitter;
|
||||
mDustEmitterList[i]->onNewDataBlock( mDataBlock->dustEmitter, false );
|
||||
|
|
@ -1804,7 +1804,7 @@ void Vehicle::updateDamageSmoke( F32 dt )
|
|||
F32 damagePercent = mDamage / mDataBlock->maxDamage;
|
||||
if( damagePercent >= mDataBlock->damageLevelTolerance[j] )
|
||||
{
|
||||
for( int i=0; i<mDataBlock->numDmgEmitterAreas; i++ )
|
||||
for( S32 i=0; i<mDataBlock->numDmgEmitterAreas; i++ )
|
||||
{
|
||||
MatrixF trans = getTransform();
|
||||
Point3F offset = mDataBlock->damageEmitterOffset[i];
|
||||
|
|
@ -1935,7 +1935,7 @@ void Vehicle::_renderMassAndContacts( ObjectRenderInst *ri, SceneRenderState *st
|
|||
GFX->getDrawUtil()->drawCube(desc, Point3F(0.1f,0.1f,0.1f),mDataBlock->massCenter, ColorI(255, 255, 255), &mRenderObjToWorld);
|
||||
|
||||
// Now render all the contact points.
|
||||
for (int i = 0; i < mCollisionList.getCount(); i++)
|
||||
for (S32 i = 0; i < mCollisionList.getCount(); i++)
|
||||
{
|
||||
const Collision& collision = mCollisionList[i];
|
||||
GFX->getDrawUtil()->drawCube(desc, Point3F(0.05f,0.05f,0.05f),collision.point, ColorI(0, 0, 255));
|
||||
|
|
@ -1943,7 +1943,7 @@ void Vehicle::_renderMassAndContacts( ObjectRenderInst *ri, SceneRenderState *st
|
|||
|
||||
// Finally render the normals as one big batch.
|
||||
PrimBuild::begin(GFXLineList, mCollisionList.getCount() * 2);
|
||||
for (int i = 0; i < mCollisionList.getCount(); i++)
|
||||
for (S32 i = 0; i < mCollisionList.getCount(); i++)
|
||||
{
|
||||
const Collision& collision = mCollisionList[i];
|
||||
PrimBuild::color3f(1, 1, 1);
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class Vehicle: public ShapeBase
|
|||
CollisionList mContacts;
|
||||
Rigid mRigid;
|
||||
ShapeBaseConvex mConvex;
|
||||
int restCount;
|
||||
S32 restCount;
|
||||
|
||||
SimObjectPtr<ParticleEmitter> mDustEmitterList[VehicleData::VC_NUM_DUST_EMITTERS];
|
||||
SimObjectPtr<ParticleEmitter> mDamageEmitterList[VehicleData::VC_NUM_DAMAGE_EMITTERS];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue