mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Updates DecalRoad, MeshRoad and River to be able to write out via persistManager using specialityField functions, similar to ConvexShape
Fixes behavior with gamemode selection in ChooseLevelMenu so if there is only one gamemode, it is auto-selected and advances to the level selection Update ExampleLevel in ExampleModule to have updated gamemodes field name
This commit is contained in:
parent
81ac23fd35
commit
bf9692a451
10 changed files with 192 additions and 42 deletions
|
|
@ -648,7 +648,8 @@ void River::initPersistFields()
|
|||
|
||||
addGroup( "Internal" );
|
||||
|
||||
addProtectedField( "Node", TypeString, 0, &addNodeFromField, &emptyStringProtectedGetFn, "For internal use, do not modify." );
|
||||
addProtectedField( "Node", TypeString, 0, &addNodeFromField, &emptyStringProtectedGetFn, "For internal use, do not modify.",
|
||||
AbstractClassRep::FIELD_HideInInspectors | AbstractClassRep::FIELD_SpecialtyArrayField);
|
||||
|
||||
endGroup( "Internal" );
|
||||
|
||||
|
|
@ -785,6 +786,38 @@ bool River::writeField( StringTableEntry fieldname, const char *value )
|
|||
return Parent::writeField( fieldname, value );
|
||||
}
|
||||
|
||||
U32 River::getSpecialFieldSize(StringTableEntry fieldName)
|
||||
{
|
||||
if (fieldName == StringTable->insert("node"))
|
||||
{
|
||||
return mNodes.size();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* River::getSpecialFieldOut(StringTableEntry fieldName, const U32& index)
|
||||
{
|
||||
if (fieldName == StringTable->insert("node"))
|
||||
{
|
||||
if (index >= mNodes.size())
|
||||
return NULL;
|
||||
|
||||
const RiverNode& node = mNodes[index];
|
||||
|
||||
char buffer[1024];
|
||||
dMemset(buffer, 0, 1024);
|
||||
dSprintf(buffer, 1024, "Node = \"%f %f %f %f %f %f %f %f\";", node.point.x, node.point.y, node.point.z,
|
||||
node.width,
|
||||
node.depth,
|
||||
node.normal.x, node.normal.y, node.normal.z);
|
||||
|
||||
return StringTable->insert(buffer);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void River::innerRender( SceneRenderState *state )
|
||||
{
|
||||
GFXDEBUGEVENT_SCOPE( River_innerRender, ColorI( 255, 0, 0 ) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue