mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 19:35:26 +00:00
inspector cleanups
clustering work for datablocks for both consistent scanning for object parameters, as well as an eye towards orgainizing things to make reviewing what variations of components we'll be needing down the line clearer
This commit is contained in:
parent
23895e365a
commit
f07c8745b2
27 changed files with 692 additions and 700 deletions
|
|
@ -50,6 +50,15 @@ const static U32 sCollisionMoveMask = ( TerrainObjectType | WaterObjectType
|
|||
static U32 sServerCollisionMask = sCollisionMoveMask; // ItemObjectType
|
||||
static U32 sClientCollisionMask = sCollisionMoveMask;
|
||||
|
||||
typedef FlyingVehicleData::Sounds engineSounds;
|
||||
DefineEnumType(engineSounds);
|
||||
|
||||
ImplementEnumType(engineSounds, "enum types.\n"
|
||||
"@ingroup VehicleData\n\n")
|
||||
{ engineSounds::JetSound, "JetSound", "..." },
|
||||
{ engineSounds::EngineSound, "EngineSound", "..." },
|
||||
EndImplementEnumType;
|
||||
|
||||
//
|
||||
const char* FlyingVehicle::sJetSequence[FlyingVehicle::JetAnimCount] =
|
||||
{
|
||||
|
|
@ -166,15 +175,27 @@ bool FlyingVehicleData::preload(bool server, String &errorStr)
|
|||
|
||||
void FlyingVehicleData::initPersistFields()
|
||||
{
|
||||
|
||||
INITPERSISTFIELD_SOUNDASSET_ARRAY(FlyingSounds, Sounds::MaxSounds, FlyingVehicleData, "Sounds for flying vehicle");
|
||||
|
||||
addField( "maneuveringForce", TypeF32, Offset(maneuveringForce, FlyingVehicleData),
|
||||
"@brief Maximum X and Y (horizontal plane) maneuvering force.\n\n"
|
||||
"The actual force applied depends on the current thrust." );
|
||||
addGroup("Physics");
|
||||
addField( "rollForce", TypeF32, Offset(rollForce, FlyingVehicleData),
|
||||
"@brief Damping torque against rolling maneuvers (rotation about the y-axis), "
|
||||
"proportional to linear velocity.\n\n"
|
||||
"Acts to adjust roll to a stable position over time as the vehicle moves." );
|
||||
addField( "rotationalDrag", TypeF32, Offset(rotationalDrag, FlyingVehicleData),
|
||||
"Rotational drag factor (slows vehicle rotation speed in all axes)." );
|
||||
addField( "horizontalSurfaceForce", TypeF32, Offset(horizontalSurfaceForce, FlyingVehicleData),
|
||||
"@brief Damping force in the opposite direction to sideways velocity.\n\n"
|
||||
"Provides \"bite\" into the wind for climbing/diving and turning)." );
|
||||
addField( "hoverHeight", TypeF32, Offset(hoverHeight, FlyingVehicleData),
|
||||
"The vehicle's height off the ground when at rest." );
|
||||
addField( "createHoverHeight", TypeF32, Offset(createHoverHeight, FlyingVehicleData),
|
||||
"@brief The vehicle's height off the ground when useCreateHeight is active.\n\n"
|
||||
"This can help avoid problems with spawning the vehicle." );
|
||||
endGroup("Physics");
|
||||
|
||||
addGroup("Steering");
|
||||
addField( "maneuveringForce", TypeF32, Offset(maneuveringForce, FlyingVehicleData),
|
||||
"@brief Maximum X and Y (horizontal plane) maneuvering force.\n\n"
|
||||
"The actual force applied depends on the current thrust." );
|
||||
addField( "verticalSurfaceForce", TypeF32, Offset(verticalSurfaceForce, FlyingVehicleData),
|
||||
"@brief Damping force in the opposite direction to vertical velocity.\n\n"
|
||||
"Controls side slip; lower numbers give more slide." );
|
||||
|
|
@ -186,13 +207,9 @@ void FlyingVehicleData::initPersistFields()
|
|||
addField( "steeringRollForce", TypeF32, Offset(steeringRollForce, FlyingVehicleData),
|
||||
"Roll force induced by sideways steering input value (controls how much "
|
||||
"the vehicle rolls when turning)." );
|
||||
addField( "rollForce", TypeF32, Offset(rollForce, FlyingVehicleData),
|
||||
"@brief Damping torque against rolling maneuvers (rotation about the y-axis), "
|
||||
"proportional to linear velocity.\n\n"
|
||||
"Acts to adjust roll to a stable position over time as the vehicle moves." );
|
||||
addField( "rotationalDrag", TypeF32, Offset(rotationalDrag, FlyingVehicleData),
|
||||
"Rotational drag factor (slows vehicle rotation speed in all axes)." );
|
||||
endGroup("Steering");
|
||||
|
||||
addGroup("AutoCorrection");
|
||||
addField( "maxAutoSpeed", TypeF32, Offset(maxAutoSpeed, FlyingVehicleData),
|
||||
"Maximum speed for automatic vehicle control assistance - vehicles "
|
||||
"travelling at speeds above this value do not get control assitance." );
|
||||
|
|
@ -208,13 +225,9 @@ void FlyingVehicleData::initPersistFields()
|
|||
"@brief Corrective torque applied to level out the vehicle when moving at less "
|
||||
"than maxAutoSpeed.\n\n"
|
||||
"The torque is inversely proportional to vehicle speed." );
|
||||
endGroup("AutoCorrection");
|
||||
|
||||
addField( "hoverHeight", TypeF32, Offset(hoverHeight, FlyingVehicleData),
|
||||
"The vehicle's height off the ground when at rest." );
|
||||
addField( "createHoverHeight", TypeF32, Offset(createHoverHeight, FlyingVehicleData),
|
||||
"@brief The vehicle's height off the ground when useCreateHeight is active.\n\n"
|
||||
"This can help avoid problems with spawning the vehicle." );
|
||||
|
||||
addGroup("Particle Effects");
|
||||
addField( "forwardJetEmitter",TYPEID< ParticleEmitterData >(), Offset(jetEmitter[ForwardJetEmitter], FlyingVehicleData),
|
||||
"@brief Emitter to generate particles for forward jet thrust.\n\n"
|
||||
"Forward jet thrust particles are emitted from model nodes JetNozzle0 "
|
||||
|
|
@ -231,7 +244,11 @@ void FlyingVehicleData::initPersistFields()
|
|||
"Emitter to generate contrail particles from model nodes contrail0 - contrail3." );
|
||||
addField( "minTrailSpeed", TypeF32, Offset(minTrailSpeed, FlyingVehicleData),
|
||||
"Minimum speed at which to start generating contrail particles." );
|
||||
endGroup("Particle Effects");
|
||||
|
||||
addGroup("Sounds");
|
||||
INITPERSISTFIELD_SOUNDASSET_ENUMED(FlyingSounds, engineSounds, Sounds::MaxSounds, FlyingVehicleData, "EngineSounds.");
|
||||
endGroup("Sounds");
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
|
|
@ -404,8 +421,17 @@ void FlyingVehicle::onRemove()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void FlyingVehicle::interpolateTick(F32 dt)
|
||||
{
|
||||
PROFILE_SCOPE(FlyingVehicle_InterpolateTick);
|
||||
Parent::interpolateTick(dt);
|
||||
updateEngineSound(1);
|
||||
updateJet(dt);
|
||||
}
|
||||
|
||||
void FlyingVehicle::advanceTime(F32 dt)
|
||||
{
|
||||
PROFILE_SCOPE(FlyingVehicle_AdvanceTime);
|
||||
Parent::advanceTime(dt);
|
||||
|
||||
updateEngineSound(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue