minor fixes

This commit is contained in:
David Rose 2010-10-12 23:57:33 +00:00
parent 60769396aa
commit c7628bb9f1
2 changed files with 11 additions and 0 deletions

View File

@ -33,11 +33,13 @@ ConfigVariableString speedtree_license
("speedtree-license", "",
PRC_DESC("Specify the license string to pass to SpeedTreeNode::authorize() by default."));
#ifndef CPPPARSER
ConfigVariableFilename speedtree_shaders_dir
("speedtree-shaders-dir", Filename(Filename::from_os_specific(SPEEDTREE_BIN_DIR), "Shaders"),
PRC_DESC("Specifies the directory in which to locate SpeedTree's system "
"shaders at runtime. If this is empty, the default is based on "
"SPEEDTREE_BIN_DIR, as provided at compile time."));
#endif // CPPPARSER
ConfigVariableFilename speedtree_textures_dir
("speedtree-textures-dir", "",

View File

@ -755,6 +755,15 @@ combine_with(PandaNode *other) {
// Two SpeedTreeNodes can combine by moving trees from one to the
// other, similar to the way GeomNodes combine.
SpeedTreeNode *gother = DCAST(SpeedTreeNode, other);
// But, not if they both have a terrain set.
if (has_terrain() && gother->has_terrain()) {
return NULL;
} else if (gother->has_terrain()) {
set_terrain(gother->get_terrain());
}
add_instances_from(gother);
return this;
}