mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Little TrenchBroom interop fixes
This commit is contained in:
parent
1d7bcb5f27
commit
e1db32fe30
5 changed files with 48 additions and 9 deletions
|
@ -645,15 +645,21 @@ void idActor::Spawn()
|
|||
}
|
||||
|
||||
jointName = kv->GetKey();
|
||||
if( jointName.StripLeadingOnce( "copy_joint_world " ) )
|
||||
|
||||
// RB: TrenchBroom interop use copy_joint_world.<name> instead so we can build this up using the FGD files
|
||||
if( jointName.StripLeadingOnce( "copy_joint_world " ) || jointName.StripLeadingOnce( "copy_joint_world." ) )
|
||||
{
|
||||
copyJoint.mod = JOINTMOD_WORLD_OVERRIDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
jointName.StripLeadingOnce( "copy_joint " );
|
||||
if( !jointName.StripLeadingOnce( "copy_joint " ) )
|
||||
{
|
||||
jointName.StripLeadingOnce( "copy_joint." );
|
||||
}
|
||||
copyJoint.mod = JOINTMOD_LOCAL_OVERRIDE;
|
||||
}
|
||||
// RB end
|
||||
|
||||
copyJoint.from = animator.GetJointHandle( jointName );
|
||||
if( copyJoint.from == INVALID_JOINT )
|
||||
|
@ -2821,7 +2827,15 @@ void idActor::SetupDamageGroups()
|
|||
while( arg )
|
||||
{
|
||||
groupname = arg->GetKey();
|
||||
groupname.Strip( "damage_zone " );
|
||||
|
||||
// RB: TrenchBroom interop use damage_zone.<name> instead so we can build this up using the FGD files
|
||||
//groupname.Strip( "damage_zone " );
|
||||
if( !groupname.StripLeadingOnce( "damage_zone " ) )
|
||||
{
|
||||
groupname.StripLeadingOnce( "damage_zone." );
|
||||
}
|
||||
// RB end
|
||||
|
||||
animator.GetJointList( arg->GetValue(), jointList );
|
||||
for( i = 0; i < jointList.Num(); i++ )
|
||||
{
|
||||
|
@ -2845,7 +2859,15 @@ void idActor::SetupDamageGroups()
|
|||
{
|
||||
scale = atof( arg->GetValue() );
|
||||
groupname = arg->GetKey();
|
||||
groupname.Strip( "damage_scale " );
|
||||
|
||||
// RB: TrenchBroom interop use damage_scale.<name> instead so we can build this up using the FGD files
|
||||
//groupname.Strip( "damage_scale " );
|
||||
if( !groupname.StripLeadingOnce( "damage_scale " ) )
|
||||
{
|
||||
groupname.StripLeadingOnce( "damage_scale." );
|
||||
}
|
||||
// RB end
|
||||
|
||||
for( i = 0; i < damageScale.Num(); i++ )
|
||||
{
|
||||
if( damageGroups[ i ] == groupname )
|
||||
|
|
|
@ -373,7 +373,13 @@ void idCameraAnim::LoadAnim()
|
|||
filename = spawnArgs.GetString( va( "anim %s", key ) );
|
||||
if( !filename.Length() )
|
||||
{
|
||||
gameLocal.Error( "Missing 'anim %s' key on '%s'", key, name.c_str() );
|
||||
// RB: TrenchBroom interop use anim.<name> instead so we can build this up using the FGD files
|
||||
filename = spawnArgs.GetString( va( "anim.%s", key ) );
|
||||
if( !filename.Length() )
|
||||
{
|
||||
gameLocal.Error( "Missing 'anim.%s' key on '%s'", key, name.c_str() );
|
||||
}
|
||||
// RB end
|
||||
}
|
||||
|
||||
filename.SetFileExtension( MD5_CAMERA_EXT );
|
||||
|
|
|
@ -865,7 +865,14 @@ void idAI::Spawn()
|
|||
while( kv )
|
||||
{
|
||||
jointName = kv->GetKey();
|
||||
jointName.StripLeadingOnce( "look_joint " );
|
||||
|
||||
// RB: TrenchBroom interop use look_joint.<name> instead so we can build this up using the FGD files
|
||||
if( !jointName.StripLeadingOnce( "look_joint " ) )
|
||||
{
|
||||
jointName.StripLeadingOnce( "look_joint." );
|
||||
}
|
||||
// RB end
|
||||
|
||||
joint = animator.GetJointHandle( jointName );
|
||||
if( joint == INVALID_JOINT )
|
||||
{
|
||||
|
|
|
@ -179,15 +179,20 @@ void idTestModel::Spawn()
|
|||
{
|
||||
jointName = kv->GetKey();
|
||||
|
||||
if( jointName.StripLeadingOnce( "copy_joint_world " ) )
|
||||
// RB: TrenchBroom interop use copy_joint_world.<name> instead so we can build this up using the FGD files
|
||||
if( jointName.StripLeadingOnce( "copy_joint_world " ) || jointName.StripLeadingOnce( "copy_joint_world." ) )
|
||||
{
|
||||
copyJoint.mod = JOINTMOD_WORLD_OVERRIDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
jointName.StripLeadingOnce( "copy_joint " );
|
||||
if( !jointName.StripLeadingOnce( "copy_joint " ) )
|
||||
{
|
||||
jointName.StripLeadingOnce( "copy_joint." );
|
||||
}
|
||||
copyJoint.mod = JOINTMOD_LOCAL_OVERRIDE;
|
||||
}
|
||||
// RB end
|
||||
|
||||
copyJoint.from = animator.GetJointHandle( jointName );
|
||||
if( copyJoint.from == INVALID_JOINT )
|
||||
|
|
|
@ -2394,7 +2394,6 @@ void idDeclManagerLocal::ExportDeclsToTrenchBroom_f( const idCmdArgs& args )
|
|||
evars.Append( ev );
|
||||
|
||||
dictToWrite.Set( "light", "300" );
|
||||
//dictToWrite.Set( "model", "sprites/light.png" );
|
||||
}
|
||||
|
||||
if( idStr::Icmp( decl->GetName(), "light" ) == 0 ||
|
||||
|
|
Loading…
Reference in a new issue