mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
layout consistency pass pt 3 - some afx bits, correct malformed shapeimage grouping causing a crash.
-must have addgroup and endgroup
This commit is contained in:
parent
41cb2e63cf
commit
a0bbe0ec18
4 changed files with 81 additions and 97 deletions
|
|
@ -689,7 +689,7 @@ void ShapeBaseImageData::initPersistFields()
|
||||||
"the amount of time it takes to transition from the previously playing animation sequence to"
|
"the amount of time it takes to transition from the previously playing animation sequence to"
|
||||||
"the new script prefix-based animation sequence.\n"
|
"the new script prefix-based animation sequence.\n"
|
||||||
"@see ShapeBase::setImageScriptAnimPrefix()");
|
"@see ShapeBase::setImageScriptAnimPrefix()");
|
||||||
addGroup("Animation");
|
endGroup("Animation");
|
||||||
|
|
||||||
addField( "projectile", TYPEID< ProjectileData >(), Offset(projectile, ShapeBaseImageData),
|
addField( "projectile", TYPEID< ProjectileData >(), Offset(projectile, ShapeBaseImageData),
|
||||||
"@brief The projectile fired by this Image\n\n" );
|
"@brief The projectile fired by this Image\n\n" );
|
||||||
|
|
|
||||||
|
|
@ -334,96 +334,75 @@ void afxMagicMissileData::initPersistFields()
|
||||||
addGroup("Shapes");
|
addGroup("Shapes");
|
||||||
INITPERSISTFIELD_SHAPEASSET(ProjectileShape, afxMagicMissileData, "Shape for the projectile");
|
INITPERSISTFIELD_SHAPEASSET(ProjectileShape, afxMagicMissileData, "Shape for the projectile");
|
||||||
addField("scale", TypePoint3F, Offset(scale, afxMagicMissileData));
|
addField("scale", TypePoint3F, Offset(scale, afxMagicMissileData));
|
||||||
|
addField("missileShapeScale", TypePoint3F, myOffset(scale));
|
||||||
endGroup("Shapes");
|
endGroup("Shapes");
|
||||||
|
|
||||||
addGroup("Particle Effects");
|
addGroup("Particle Effects");
|
||||||
addField("particleEmitter", TYPEID<ParticleEmitterData>(), Offset(particleEmitter, afxMagicMissileData));
|
addField("particleEmitter", TYPEID<ParticleEmitterData>(), Offset(particleEmitter, afxMagicMissileData));
|
||||||
addField("particleWaterEmitter", TYPEID<ParticleEmitterData>(), Offset(particleWaterEmitter, afxMagicMissileData));
|
addField("particleWaterEmitter", TYPEID<ParticleEmitterData>(), Offset(particleWaterEmitter, afxMagicMissileData));
|
||||||
|
addField("splash", TYPEID<SplashData>(), Offset(splash, afxMagicMissileData));
|
||||||
endGroup("Particle Effects");
|
endGroup("Particle Effects");
|
||||||
|
|
||||||
addGroup("Sounds");
|
addGroup("Sounds");
|
||||||
INITPERSISTFIELD_SOUNDASSET(ProjectileSound, afxMagicMissileData, "sound for the projectile");
|
INITPERSISTFIELD_SOUNDASSET(ProjectileSound, afxMagicMissileData, "sound for the projectile");
|
||||||
endGroup("Sounds");
|
endGroup("Sounds");
|
||||||
/* From stock Projectile code...
|
|
||||||
addField("explosion", TYPEID< ExplosionData >(), Offset(explosion, ProjectileData));
|
|
||||||
addField("waterExplosion", TYPEID< ExplosionData >(), Offset(waterExplosion, ProjectileData));
|
|
||||||
*/
|
|
||||||
|
|
||||||
addField("splash", TYPEID<SplashData>(), Offset(splash, afxMagicMissileData));
|
addGroup("Light Emitter");
|
||||||
/* From stock Projectile code...
|
addField("lightDesc", TYPEID< LightDescription >(), Offset(lightDesc, afxMagicMissileData));
|
||||||
addField("decal", TYPEID< DecalData >(), Offset(decal, ProjectileData));
|
endGroup("Light Emitter");
|
||||||
*/
|
|
||||||
|
|
||||||
addField("lightDesc", TYPEID< LightDescription >(), Offset(lightDesc, afxMagicMissileData));
|
addGroup("Physics");
|
||||||
|
addNamedFieldV(lifetime, TypeS32, afxMagicMissileData, &ticksFromMS);
|
||||||
|
addFieldV("casterSafetyTime", TypeS32, myOffset(caster_safety_time), &ticksFromMS);
|
||||||
|
addField("isBallistic", TypeBool, Offset(isBallistic, afxMagicMissileData));
|
||||||
|
addNamedFieldV(muzzleVelocity, TypeF32, afxMagicMissileData, &muzzleVelocityValidator);
|
||||||
|
addNamedFieldV(ballisticCoefficient, TypeF32, afxMagicMissileData, &missileBallisticCoefficientValidator);
|
||||||
|
addField("gravityMod", TypeF32, Offset(gravityMod, afxMagicMissileData));
|
||||||
|
addField("collisionMask", TypeS32, myOffset(collision_mask));
|
||||||
|
addField("startingVelocityVector",TypePoint3F, myOffset(starting_vel_vec));
|
||||||
|
addNamedField(acceleration, TypeF32, afxMagicMissileData);
|
||||||
|
addNamedFieldV(accelDelay, TypeS32, afxMagicMissileData, &ticksFromMS);
|
||||||
|
addNamedFieldV(accelLifetime, TypeS32, afxMagicMissileData, &ticksFromMS);
|
||||||
|
addField("reverseTargeting", TypeBool, myOffset(reverse_targeting));
|
||||||
|
endGroup("Physics");
|
||||||
|
|
||||||
addField("isBallistic", TypeBool, Offset(isBallistic, afxMagicMissileData));
|
addGroup("Physics-Tracking");
|
||||||
/* From stock Projectile code...
|
addNamedField(isGuided, TypeBool, afxMagicMissileData);
|
||||||
addField("velInheritFactor", TypeF32, Offset(velInheritFactor, ProjectileData));
|
addNamedFieldV(precision, TypeF32, afxMagicMissileData, &missilePrecisionValidator);
|
||||||
*/
|
addNamedFieldV(trackDelay, TypeS32, afxMagicMissileData, &missileTrackDelayValidator);
|
||||||
addNamedFieldV(muzzleVelocity, TypeF32, afxMagicMissileData, &muzzleVelocityValidator);
|
endGroup("Physics-Tracking");
|
||||||
/* From stock Projectile code...
|
|
||||||
addField("impactForce", TypeF32, Offset(impactForce, ProjectileData));
|
|
||||||
*/
|
|
||||||
addNamedFieldV(lifetime, TypeS32, afxMagicMissileData, &ticksFromMS);
|
|
||||||
/* From stock Projectile code...
|
|
||||||
addProtectedField("armingDelay", TypeS32, Offset(armingDelay, ProjectileData), &setArmingDelay, &getScaledValue,
|
|
||||||
"The time in milliseconds before the projectile is armed and will cause damage or explode on impact." );
|
|
||||||
|
|
||||||
addProtectedField("fadeDelay", TypeS32, Offset(fadeDelay, ProjectileData), &setFadeDelay, &getScaledValue,
|
addGroup("Physics-Avoidance");
|
||||||
"The time in milliseconds when the projectile begins to fade out. Must be less than the lifetime to have an effect." );
|
addField("followTerrain", TypeBool, myOffset(followTerrain));
|
||||||
|
addField("followTerrainHeight", TypeF32, myOffset(followTerrainHeight));
|
||||||
|
addField("followTerrainAdjustRate", TypeF32, myOffset(followTerrainAdjustRate));
|
||||||
|
addFieldV("followTerrainAdjustDelay", TypeS32, myOffset(followTerrainAdjustDelay), &ticksFromMS);
|
||||||
|
|
||||||
addField("bounceElasticity", TypeF32, Offset(bounceElasticity, ProjectileData));
|
addField("hoverAltitude", TypeF32, myOffset(hover_altitude));
|
||||||
addField("bounceFriction", TypeF32, Offset(bounceFriction, ProjectileData));
|
addField("hoverAttackDistance", TypeF32, myOffset(hover_attack_distance));
|
||||||
*/
|
addField("hoverAttackGradient", TypeF32, myOffset(hover_attack_gradient));
|
||||||
addField("gravityMod", TypeF32, Offset(gravityMod, afxMagicMissileData));
|
addFieldV("hoverTime", TypeS32, myOffset(hover_time), &ticksFromMS);
|
||||||
|
endGroup("Physics-Avoidance");
|
||||||
|
|
||||||
// FIELDS ADDED BY MAGIC-MISSILE
|
addGroup("Physics-Launch");
|
||||||
|
addField("launchNode", TypeString, myOffset(launch_node));
|
||||||
//addField("missileShapeName", TypeFilename, myOffset(projectileShapeName));
|
addField("launchOffset", TypePoint3F, myOffset(launch_offset));
|
||||||
addField("missileShapeScale", TypePoint3F, myOffset(scale));
|
addField("launchOffsetServer",TypePoint3F, myOffset(launch_offset_server));
|
||||||
|
addField("launchOffsetClient",TypePoint3F, myOffset(launch_offset_client));
|
||||||
addField("startingVelocityVector",TypePoint3F, myOffset(starting_vel_vec));
|
addField("launchNodeOffset", TypePoint3F, myOffset(launch_node_offset));
|
||||||
|
addField("launchAimPitch", TypeF32, myOffset(launch_pitch));
|
||||||
addNamedField(isGuided, TypeBool, afxMagicMissileData);
|
addField("launchAimPan", TypeF32, myOffset(launch_pan));
|
||||||
addNamedFieldV(precision, TypeF32, afxMagicMissileData, &missilePrecisionValidator);
|
addField("launchConstraintServer", TypeString, myOffset(launch_cons_s_spec));
|
||||||
addNamedFieldV(trackDelay, TypeS32, afxMagicMissileData, &missileTrackDelayValidator);
|
addField("launchConstraintClient", TypeString, myOffset(launch_cons_c_spec));
|
||||||
addNamedFieldV(ballisticCoefficient, TypeF32, afxMagicMissileData, &missileBallisticCoefficientValidator);
|
addField("echoLaunchOffset", TypeBool, myOffset(echo_launch_offset));
|
||||||
|
endGroup("Physics-Launch");
|
||||||
addField("collisionMask", TypeS32, myOffset(collision_mask));
|
|
||||||
|
|
||||||
addField("followTerrain", TypeBool, myOffset(followTerrain));
|
|
||||||
addField("followTerrainHeight", TypeF32, myOffset(followTerrainHeight));
|
|
||||||
addField("followTerrainAdjustRate", TypeF32, myOffset(followTerrainAdjustRate));
|
|
||||||
addFieldV("followTerrainAdjustDelay", TypeS32, myOffset(followTerrainAdjustDelay), &ticksFromMS);
|
|
||||||
|
|
||||||
addNamedField(acceleration, TypeF32, afxMagicMissileData);
|
|
||||||
addNamedFieldV(accelDelay, TypeS32, afxMagicMissileData, &ticksFromMS);
|
|
||||||
addNamedFieldV(accelLifetime, TypeS32, afxMagicMissileData, &ticksFromMS);
|
|
||||||
|
|
||||||
addField("launchNode", TypeString, myOffset(launch_node));
|
|
||||||
addField("launchOffset", TypePoint3F, myOffset(launch_offset));
|
|
||||||
addField("launchOffsetServer",TypePoint3F, myOffset(launch_offset_server));
|
|
||||||
addField("launchOffsetClient",TypePoint3F, myOffset(launch_offset_client));
|
|
||||||
addField("launchNodeOffset", TypePoint3F, myOffset(launch_node_offset));
|
|
||||||
addField("launchAimPitch", TypeF32, myOffset(launch_pitch));
|
|
||||||
addField("launchAimPan", TypeF32, myOffset(launch_pan));
|
|
||||||
addField("launchConstraintServer", TypeString, myOffset(launch_cons_s_spec));
|
|
||||||
addField("launchConstraintClient", TypeString, myOffset(launch_cons_c_spec));
|
|
||||||
//
|
|
||||||
addField("echoLaunchOffset", TypeBool, myOffset(echo_launch_offset));
|
|
||||||
|
|
||||||
|
addGroup("Physics-Wiggle");
|
||||||
addField("wiggleMagnitudes", TypeF32Vector, myOffset(wiggle_magnitudes));
|
addField("wiggleMagnitudes", TypeF32Vector, myOffset(wiggle_magnitudes));
|
||||||
addField("wiggleSpeeds", TypeF32Vector, myOffset(wiggle_speeds));
|
addField("wiggleSpeeds", TypeF32Vector, myOffset(wiggle_speeds));
|
||||||
addField("wiggleAxis", TypeString, myOffset(wiggle_axis_string));
|
addField("wiggleAxis", TypeString, myOffset(wiggle_axis_string));
|
||||||
|
endGroup("Physics-Wiggle");
|
||||||
|
|
||||||
addField("hoverAltitude", TypeF32, myOffset(hover_altitude));
|
|
||||||
addField("hoverAttackDistance", TypeF32, myOffset(hover_attack_distance));
|
|
||||||
addField("hoverAttackGradient", TypeF32, myOffset(hover_attack_gradient));
|
|
||||||
addFieldV("hoverTime", TypeS32, myOffset(hover_time), &ticksFromMS);
|
|
||||||
|
|
||||||
addField("reverseTargeting", TypeBool, myOffset(reverse_targeting));
|
|
||||||
|
|
||||||
addFieldV("casterSafetyTime", TypeS32, myOffset(caster_safety_time), &ticksFromMS);
|
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,23 +82,23 @@ EndImplementEnumType;
|
||||||
|
|
||||||
void afxProjectileData::initPersistFields()
|
void afxProjectileData::initPersistFields()
|
||||||
{
|
{
|
||||||
addField("networking", TypeS8, myOffset(networking),
|
addGroup("Physics");
|
||||||
"...");
|
addField("ignoreSourceTimeout", TypeBool, myOffset(ignore_src_timeout), "...");
|
||||||
addField("launchPosSpec", TypeString, myOffset(launch_pos_spec),
|
addField("dynamicCollisionMask", TypeS32, myOffset(dynamicCollisionMask), "...");
|
||||||
"...");
|
addField("staticCollisionMask", TypeS32, myOffset(staticCollisionMask), "...");
|
||||||
addField("launchDirBias", TypePoint3F, myOffset(launch_dir_bias),
|
addField("overrideCollisionMasks", TypeBool, myOffset(override_collision_masks), "...");
|
||||||
"...");
|
endGroup("Physics");
|
||||||
addField("ignoreSourceTimeout", TypeBool, myOffset(ignore_src_timeout),
|
|
||||||
"...");
|
|
||||||
addField("dynamicCollisionMask", TypeS32, myOffset(dynamicCollisionMask),
|
|
||||||
"...");
|
|
||||||
addField("staticCollisionMask", TypeS32, myOffset(staticCollisionMask),
|
|
||||||
"...");
|
|
||||||
addField("overrideCollisionMasks", TypeBool, myOffset(override_collision_masks),
|
|
||||||
"...");
|
|
||||||
|
|
||||||
addField("launchDirMethod", TYPEID<afxProjectileData::LaunchDirType>(), myOffset(launch_dir_method),
|
addGroup("Physics-Launch");
|
||||||
"Possible values: towardPos2Constraint, orientConstraint, or launchDirField.");
|
addField("launchPosSpec", TypeString, myOffset(launch_pos_spec), "...");
|
||||||
|
addField("launchDirBias", TypePoint3F, myOffset(launch_dir_bias), "...");
|
||||||
|
addField("launchDirMethod", TYPEID<afxProjectileData::LaunchDirType>(), myOffset(launch_dir_method),
|
||||||
|
"Possible values: towardPos2Constraint, orientConstraint, or launchDirField.");
|
||||||
|
endGroup("Physics-Launch");
|
||||||
|
|
||||||
|
addGroup("Networking");
|
||||||
|
addField("networking", TypeS8, myOffset(networking), "...");
|
||||||
|
endGroup("Networking");
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,17 +70,22 @@ afxStaticShapeData::afxStaticShapeData(const afxStaticShapeData& other, bool tem
|
||||||
|
|
||||||
void afxStaticShapeData::initPersistFields()
|
void afxStaticShapeData::initPersistFields()
|
||||||
{
|
{
|
||||||
addField("sequence", TypeString, myOffset(sequence),
|
addGroup("Animation");
|
||||||
|
addField("sequence", TypeString, myOffset(sequence),
|
||||||
"An animation sequence in the StaticShape to play.");
|
"An animation sequence in the StaticShape to play.");
|
||||||
addField("ignoreSceneAmbient", TypeBool, myOffset(ignore_scene_amb),
|
endGroup("Animation");
|
||||||
"...");
|
|
||||||
addField("useCustomSceneAmbient", TypeBool, myOffset(use_custom_scene_amb),
|
addGroup("Rendering");
|
||||||
"...");
|
addField("ignoreSceneAmbient", TypeBool, myOffset(ignore_scene_amb), "...");
|
||||||
addField("customSceneAmbient", TypeColorF, myOffset(custom_scene_amb),
|
addField("useCustomSceneAmbient", TypeBool, myOffset(use_custom_scene_amb), "...");
|
||||||
"...");
|
addField("customSceneAmbient", TypeColorF, myOffset(custom_scene_amb), "...");
|
||||||
addField("doSpawn", TypeBool, myOffset(do_spawn),
|
endGroup("Rendering");
|
||||||
"When true, the StaticShape effect will leave behind the StaticShape object as a "
|
|
||||||
"permanent part of the scene.");
|
addGroup("Behaviour");
|
||||||
|
addField("doSpawn", TypeBool, myOffset(do_spawn),
|
||||||
|
"When true, the StaticShape effect will leave behind the StaticShape object as a "
|
||||||
|
"permanent part of the scene.");
|
||||||
|
endGroup("Behaviour");
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue