mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
minor fixes
This commit is contained in:
parent
60769396aa
commit
c7628bb9f1
@ -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", "",
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user