mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +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
|
|
@ -689,7 +689,7 @@ void ShapeBaseImageData::initPersistFields()
|
|||
"the amount of time it takes to transition from the previously playing animation sequence to"
|
||||
"the new script prefix-based animation sequence.\n"
|
||||
"@see ShapeBase::setImageScriptAnimPrefix()");
|
||||
addGroup("Animation");
|
||||
endGroup("Animation");
|
||||
|
||||
addField( "projectile", TYPEID< ProjectileData >(), Offset(projectile, ShapeBaseImageData),
|
||||
"@brief The projectile fired by this Image\n\n" );
|
||||
|
|
|
|||
|
|
@ -334,96 +334,75 @@ void afxMagicMissileData::initPersistFields()
|
|||
addGroup("Shapes");
|
||||
INITPERSISTFIELD_SHAPEASSET(ProjectileShape, afxMagicMissileData, "Shape for the projectile");
|
||||
addField("scale", TypePoint3F, Offset(scale, afxMagicMissileData));
|
||||
addField("missileShapeScale", TypePoint3F, myOffset(scale));
|
||||
endGroup("Shapes");
|
||||
|
||||
addGroup("Particle Effects");
|
||||
addField("particleEmitter", TYPEID<ParticleEmitterData>(), Offset(particleEmitter, afxMagicMissileData));
|
||||
addField("particleWaterEmitter", TYPEID<ParticleEmitterData>(), Offset(particleWaterEmitter, afxMagicMissileData));
|
||||
addField("splash", TYPEID<SplashData>(), Offset(splash, afxMagicMissileData));
|
||||
endGroup("Particle Effects");
|
||||
|
||||
addGroup("Sounds");
|
||||
INITPERSISTFIELD_SOUNDASSET(ProjectileSound, afxMagicMissileData, "sound for the projectile");
|
||||
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));
|
||||
/* From stock Projectile code...
|
||||
addField("decal", TYPEID< DecalData >(), Offset(decal, ProjectileData));
|
||||
*/
|
||||
addGroup("Light Emitter");
|
||||
addField("lightDesc", TYPEID< LightDescription >(), Offset(lightDesc, afxMagicMissileData));
|
||||
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));
|
||||
/* From stock Projectile code...
|
||||
addField("velInheritFactor", TypeF32, Offset(velInheritFactor, ProjectileData));
|
||||
*/
|
||||
addNamedFieldV(muzzleVelocity, TypeF32, afxMagicMissileData, &muzzleVelocityValidator);
|
||||
/* 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." );
|
||||
addGroup("Physics-Tracking");
|
||||
addNamedField(isGuided, TypeBool, afxMagicMissileData);
|
||||
addNamedFieldV(precision, TypeF32, afxMagicMissileData, &missilePrecisionValidator);
|
||||
addNamedFieldV(trackDelay, TypeS32, afxMagicMissileData, &missileTrackDelayValidator);
|
||||
endGroup("Physics-Tracking");
|
||||
|
||||
addProtectedField("fadeDelay", TypeS32, Offset(fadeDelay, ProjectileData), &setFadeDelay, &getScaledValue,
|
||||
"The time in milliseconds when the projectile begins to fade out. Must be less than the lifetime to have an effect." );
|
||||
addGroup("Physics-Avoidance");
|
||||
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("bounceFriction", TypeF32, Offset(bounceFriction, ProjectileData));
|
||||
*/
|
||||
addField("gravityMod", TypeF32, Offset(gravityMod, afxMagicMissileData));
|
||||
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);
|
||||
endGroup("Physics-Avoidance");
|
||||
|
||||
// FIELDS ADDED BY MAGIC-MISSILE
|
||||
|
||||
//addField("missileShapeName", TypeFilename, myOffset(projectileShapeName));
|
||||
addField("missileShapeScale", TypePoint3F, myOffset(scale));
|
||||
|
||||
addField("startingVelocityVector",TypePoint3F, myOffset(starting_vel_vec));
|
||||
|
||||
addNamedField(isGuided, TypeBool, afxMagicMissileData);
|
||||
addNamedFieldV(precision, TypeF32, afxMagicMissileData, &missilePrecisionValidator);
|
||||
addNamedFieldV(trackDelay, TypeS32, afxMagicMissileData, &missileTrackDelayValidator);
|
||||
addNamedFieldV(ballisticCoefficient, TypeF32, afxMagicMissileData, &missileBallisticCoefficientValidator);
|
||||
|
||||
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-Launch");
|
||||
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));
|
||||
endGroup("Physics-Launch");
|
||||
|
||||
addGroup("Physics-Wiggle");
|
||||
addField("wiggleMagnitudes", TypeF32Vector, myOffset(wiggle_magnitudes));
|
||||
addField("wiggleSpeeds", TypeF32Vector, myOffset(wiggle_speeds));
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -82,23 +82,23 @@ EndImplementEnumType;
|
|||
|
||||
void afxProjectileData::initPersistFields()
|
||||
{
|
||||
addField("networking", TypeS8, myOffset(networking),
|
||||
"...");
|
||||
addField("launchPosSpec", TypeString, myOffset(launch_pos_spec),
|
||||
"...");
|
||||
addField("launchDirBias", TypePoint3F, myOffset(launch_dir_bias),
|
||||
"...");
|
||||
addField("ignoreSourceTimeout", TypeBool, myOffset(ignore_src_timeout),
|
||||
"...");
|
||||
addField("dynamicCollisionMask", TypeS32, myOffset(dynamicCollisionMask),
|
||||
"...");
|
||||
addField("staticCollisionMask", TypeS32, myOffset(staticCollisionMask),
|
||||
"...");
|
||||
addField("overrideCollisionMasks", TypeBool, myOffset(override_collision_masks),
|
||||
"...");
|
||||
addGroup("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), "...");
|
||||
endGroup("Physics");
|
||||
|
||||
addField("launchDirMethod", TYPEID<afxProjectileData::LaunchDirType>(), myOffset(launch_dir_method),
|
||||
"Possible values: towardPos2Constraint, orientConstraint, or launchDirField.");
|
||||
addGroup("Physics-Launch");
|
||||
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();
|
||||
}
|
||||
|
|
@ -368,4 +368,4 @@ void afxProjectile::explode(const Point3F& p, const Point3F& n, const U32 collid
|
|||
Sim::postEvent(this, new afxProjectileDeleteEvent, Sim::getCurrentTime() + DeleteWaitTime);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
|
|
@ -70,17 +70,22 @@ afxStaticShapeData::afxStaticShapeData(const afxStaticShapeData& other, bool tem
|
|||
|
||||
void afxStaticShapeData::initPersistFields()
|
||||
{
|
||||
addField("sequence", TypeString, myOffset(sequence),
|
||||
addGroup("Animation");
|
||||
addField("sequence", TypeString, myOffset(sequence),
|
||||
"An animation sequence in the StaticShape to play.");
|
||||
addField("ignoreSceneAmbient", TypeBool, myOffset(ignore_scene_amb),
|
||||
"...");
|
||||
addField("useCustomSceneAmbient", TypeBool, myOffset(use_custom_scene_amb),
|
||||
"...");
|
||||
addField("customSceneAmbient", TypeColorF, myOffset(custom_scene_amb),
|
||||
"...");
|
||||
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("Animation");
|
||||
|
||||
addGroup("Rendering");
|
||||
addField("ignoreSceneAmbient", TypeBool, myOffset(ignore_scene_amb), "...");
|
||||
addField("useCustomSceneAmbient", TypeBool, myOffset(use_custom_scene_amb), "...");
|
||||
addField("customSceneAmbient", TypeColorF, myOffset(custom_scene_amb), "...");
|
||||
endGroup("Rendering");
|
||||
|
||||
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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue