mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
Merge pull request #635 from just-bank/engine-fixes
Various engine fixes
This commit is contained in:
commit
cd978039ac
37 changed files with 106 additions and 86 deletions
|
|
@ -45,6 +45,7 @@ protected:
|
|||
|
||||
public:
|
||||
CameraFX();
|
||||
virtual ~CameraFX() { }
|
||||
|
||||
MatrixF & getTrans(){ return mCamFXTrans; }
|
||||
virtual bool isExpired(){ return mElapsedTime >= mDuration; }
|
||||
|
|
|
|||
|
|
@ -749,9 +749,9 @@ bool ExplosionData::preload(bool server, String &errorStr)
|
|||
|
||||
if( !server )
|
||||
{
|
||||
String errorStr;
|
||||
if( !sfxResolve( &soundProfile, errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load sound profile for explosion datablock: %s", errorStr.c_str());
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &soundProfile, sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load sound profile for explosion datablock: %s", sfxErrorStr.c_str());
|
||||
if (!particleEmitter && particleEmitterId != 0)
|
||||
if (Sim::findObject(particleEmitterId, particleEmitter) == false)
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load particle emitter for explosion datablock");
|
||||
|
|
|
|||
|
|
@ -287,14 +287,14 @@ bool LightningData::preload(bool server, String &errorStr)
|
|||
|
||||
if (server == false)
|
||||
{
|
||||
String errorStr;
|
||||
String sfxErrorStr;
|
||||
for (U32 i = 0; i < MaxThunders; i++) {
|
||||
if( !sfxResolve( &thunderSounds[ i ], errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", errorStr.c_str());
|
||||
if( !sfxResolve( &thunderSounds[ i ], sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||
}
|
||||
|
||||
if( !sfxResolve( &strikeSound, errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", errorStr.c_str());
|
||||
if( !sfxResolve( &strikeSound, sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||
|
||||
for (U32 i = 0; i < MaxTextures; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ DefineEngineMethod( MissionArea, getArea, const char *, (),,
|
|||
char* returnBuffer = Con::getReturnBuffer(48);
|
||||
|
||||
RectI area = object->getArea();
|
||||
dSprintf(returnBuffer, sizeof(returnBuffer), "%d %d %d %d", area.point.x, area.point.y, area.extent.x, area.extent.y);
|
||||
dSprintf(returnBuffer, 48, "%d %d %d %d", area.point.x, area.point.y, area.extent.x, area.extent.y);
|
||||
return(returnBuffer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -427,9 +427,9 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
{
|
||||
for( U32 i = 0; i < MaxSounds; ++ i )
|
||||
{
|
||||
String errorStr;
|
||||
if( !sfxResolve( &sound[ i ], errorStr ) )
|
||||
Con::errorf( "PlayerData::preload: %s", errorStr.c_str() );
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &sound[ i ], sfxErrorStr ) )
|
||||
Con::errorf( "PlayerData::preload: %s", sfxErrorStr.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -586,7 +586,10 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShapeFP[i].getPath());
|
||||
|
||||
if (!fileRef)
|
||||
{
|
||||
errorStr = String::ToString("PlayerData: Mounted image %d loading failed, shape \"%s\" is not found.",i,mShapeFP[i].getPath().getFullPath().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if(server)
|
||||
mCRCFP[i] = fileRef->getChecksum();
|
||||
|
|
|
|||
|
|
@ -320,9 +320,9 @@ bool ProjectileData::preload(bool server, String &errorStr)
|
|||
if (Sim::findObject(decalId, decal) == false)
|
||||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet, bad datablockId(decal): %d", decalId);
|
||||
|
||||
String errorStr;
|
||||
if( !sfxResolve( &sound, errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet: %s", errorStr.c_str());
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &sound, sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||
|
||||
if (!lightDesc && lightDescId != 0)
|
||||
if (Sim::findObject(lightDescId, lightDesc) == false)
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ bool ProximityMineData::preload( bool server, String& errorStr )
|
|||
if ( !server )
|
||||
{
|
||||
// Resolve sounds
|
||||
String errorStr;
|
||||
if( !sfxResolve( &armingSound, errorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", errorStr.c_str() );
|
||||
if( !sfxResolve( &triggerSound, errorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", errorStr.c_str() );
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &armingSound, sfxErrorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", sfxErrorStr.c_str() );
|
||||
if( !sfxResolve( &triggerSound, sfxErrorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", sfxErrorStr.c_str() );
|
||||
}
|
||||
|
||||
if ( mShape )
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@ bool RigidShapeData::preload(bool server, String &errorStr)
|
|||
if (!collisionDetails.size() || collisionDetails[0] == -1)
|
||||
{
|
||||
Con::errorf("RigidShapeData::preload failed: Rigid shapes must define a collision-1 detail");
|
||||
errorStr = String::ToString("RigidShapeData: Couldn't load shape \"%s\"",shapeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -306,7 +306,10 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
|
|||
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShape.getPath());
|
||||
|
||||
if (!fileRef)
|
||||
{
|
||||
errorStr = String::ToString("ShapeBaseData: Couldn't load shape \"%s\"",shapeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(server)
|
||||
mCRC = fileRef->getChecksum();
|
||||
|
|
|
|||
|
|
@ -462,7 +462,10 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr)
|
|||
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(shape[i].getPath());
|
||||
|
||||
if (!fileRef)
|
||||
{
|
||||
errorStr = String::ToString("ShapeBaseImageData: Couldn't load shape \"%s\"",name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(server)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ bool VehicleData::preload(bool server, String &errorStr)
|
|||
if (!collisionDetails.size() || collisionDetails[0] == -1)
|
||||
{
|
||||
Con::errorf("VehicleData::preload failed: Vehicle models must define a collision-1 detail");
|
||||
errorStr = String::ToString("VehicleData: Couldn't load shape \"%s\"",shapeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue