Q3map2:
* fix: parsing of /* */ comments, having * or / inside
Radiant:
misc...
encapsulate RETURN_FALSE_IF_FAIL macros with do while 0: minus warnings
* button to call color selector from ents inspector color entry
* explanatory text on initial engine path configuration
* don't show Global preferences by default, except first start
* activate {xyview, camera, texbro glwidget} on mouse button press and scroll, so {texbro treeview and console} hotkeys do not override global ones
* activate windows, containing xyview, camera, texbro on mouse scroll
* fix: autoapplying trigger texture on entity creation is undoable
* fix: texbro m1/2 x2 work, when some tag is loaded
* bold key and spawnflags names in entity inspector entity description
* fix: +CameraFreeMove* command, +shift, -CameraFreeMove*, -shift = still moving (reason: caps letter)
This commit is contained in:
@@ -306,6 +306,19 @@ void Entity_createFromSelection( const char* name, const Vector3& origin ){
|
||||
|
||||
bool brushesSelected = Scene_countSelectedBrushes( GlobalSceneGraph() ) != 0;
|
||||
|
||||
//is important to have retexturing here; if doing in the end, undo doesn't succeed;
|
||||
if ( string_compare_nocase_n( name, "trigger_", 8 ) == 0 && brushesSelected ){
|
||||
const char* shader = g_pGameDescription->getKeyValue( "shader_trigger" );
|
||||
if ( shader && *shader ){
|
||||
Scene_PatchSetShader_Selected( GlobalSceneGraph(), shader );
|
||||
Scene_BrushSetShader_Selected( GlobalSceneGraph(), shader );
|
||||
}
|
||||
else{
|
||||
Scene_PatchSetShader_Selected( GlobalSceneGraph(), "textures/common/trigger" );
|
||||
Scene_BrushSetShader_Selected( GlobalSceneGraph(), "textures/common/trigger" );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !( entityClass->fixedsize || isModel ) && !brushesSelected ) {
|
||||
globalErrorStream() << "failed to create a group entity - no brushes are selected\n";
|
||||
return;
|
||||
@@ -392,18 +405,6 @@ void Entity_createFromSelection( const char* name, const Vector3& origin ){
|
||||
Node_getEntity( node )->setKeyValue( "model", model );
|
||||
}
|
||||
}
|
||||
|
||||
if ( string_compare_nocase_n( name, "trigger_", 8 ) == 0 && brushesSelected ){
|
||||
const char* shader = g_pGameDescription->getKeyValue( "shader_trigger" );
|
||||
if ( shader && *shader ){
|
||||
Scene_PatchSetShader_Selected( GlobalSceneGraph(), shader );
|
||||
Scene_BrushSetShader_Selected( GlobalSceneGraph(), shader );
|
||||
}
|
||||
else{
|
||||
Scene_PatchSetShader_Selected( GlobalSceneGraph(), "textures/common/trigger" );
|
||||
Scene_BrushSetShader_Selected( GlobalSceneGraph(), "textures/common/trigger" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user