mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
add a controlmap entry
for players, vehicles, and turret datablocks add a client command to setMovemap(%object.getDatablock().controlMap)
This commit is contained in:
parent
a996c09b04
commit
5b2c0c7703
8 changed files with 32 additions and 3 deletions
|
|
@ -460,6 +460,7 @@ PlayerData::PlayerData()
|
|||
jumpTowardsNormal = true;
|
||||
|
||||
physicsPlayerType = StringTable->EmptyString();
|
||||
mControlMap = StringTable->EmptyString();
|
||||
|
||||
dMemset( actionList, 0, sizeof(actionList) );
|
||||
}
|
||||
|
|
@ -739,7 +740,9 @@ void PlayerData::initPersistFields()
|
|||
endGroup( "Camera" );
|
||||
|
||||
addGroup( "Movement" );
|
||||
|
||||
addField("controlMap", TypeString, Offset(mControlMap, PlayerData),
|
||||
"@brief movemap used by these types of objects.\n\n");
|
||||
|
||||
addFieldV( "maxStepHeight", TypeRangedF32, Offset(maxStepHeight, PlayerData), &CommonValidators::PositiveFloat,
|
||||
"@brief Maximum height the player can step up.\n\n"
|
||||
"The player will automatically step onto changes in ground height less "
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ struct PlayerData: public ShapeBaseData {
|
|||
|
||||
// Jump off surfaces at their normal rather than straight up
|
||||
bool jumpTowardsNormal;
|
||||
|
||||
StringTableEntry mControlMap;
|
||||
// For use if/when mPhysicsPlayer is created
|
||||
StringTableEntry physicsPlayerType;
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ TurretShapeData::TurretShapeData()
|
|||
recoilSequence[i] = -1;
|
||||
pitchSequence = -1;
|
||||
headingSequence = -1;
|
||||
mControlMap = StringTable->EmptyString();
|
||||
}
|
||||
|
||||
void TurretShapeData::initPersistFields()
|
||||
|
|
@ -134,6 +135,8 @@ void TurretShapeData::initPersistFields()
|
|||
docsURL;
|
||||
Parent::initPersistFields();
|
||||
addGroup("Steering");
|
||||
addField("controlMap", TypeString, Offset(mControlMap, TurretShapeData),
|
||||
"@brief movemap used by these types of objects.\n\n");
|
||||
addField("zRotOnly", TypeBool, Offset(zRotOnly, TurretShapeData),
|
||||
"@brief Should the turret allow only z rotations.\n\n"
|
||||
"True indicates that the turret may only be rotated on its z axis, just like the Item class. "
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ public:
|
|||
bool startLoaded; ///< Should the turret's mounted weapon(s) start in a loaded state?
|
||||
|
||||
bool zRotOnly; ///< Should the turret allow only z rotations (like an item)?
|
||||
StringTableEntry mControlMap;
|
||||
|
||||
public:
|
||||
TurretShapeData();
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ VehicleData::VehicleData()
|
|||
dMemset( damageEmitterOffset, 0, sizeof( damageEmitterOffset ) );
|
||||
dMemset( damageEmitterIDList, 0, sizeof( damageEmitterIDList ) );
|
||||
dMemset( damageLevelTolerance, 0, sizeof( damageLevelTolerance ) );
|
||||
mControlMap = StringTable->EmptyString();
|
||||
|
||||
numDmgEmitterAreas = 0;
|
||||
|
||||
|
|
@ -321,6 +322,8 @@ void VehicleData::initPersistFields()
|
|||
endGroup("Collision");
|
||||
|
||||
addGroup("Steering");
|
||||
addField("controlMap", TypeString, Offset(mControlMap, VehicleData),
|
||||
"@brief movemap used by these types of objects.\n\n");
|
||||
addFieldV( "jetForce", TypeRangedF32, Offset(jetForce, VehicleData), &CommonValidators::PositiveFloat,
|
||||
"@brief Additional force applied to the vehicle when it is jetting.\n\n"
|
||||
"For WheeledVehicles, the force is applied in the forward direction. For "
|
||||
|
|
@ -726,6 +729,9 @@ void Vehicle::updateMove(const Move* move)
|
|||
if (mDamageState == Enabled) {
|
||||
setImageTriggerState(0,move->trigger[0]);
|
||||
setImageTriggerState(1,move->trigger[1]);
|
||||
//legacy code has trigger 2 and 3 reserved
|
||||
setImageTriggerState(2, move->trigger[4]);
|
||||
setImageTriggerState(3, move->trigger[5]);
|
||||
}
|
||||
|
||||
// Throttle
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ struct VehicleData : public RigidShapeData
|
|||
F32 damageLevelTolerance[ VC_NUM_DAMAGE_LEVELS ];
|
||||
F32 numDmgEmitterAreas;
|
||||
|
||||
StringTableEntry mControlMap;
|
||||
bool enablePhysicsRep;
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue