static void MergeOrigin(entity_t *ent, vec3_t origin)
{
vec3_t adjustment;
+ char string[128];
/* we have not parsed the brush completely yet... */
GetVectorForKey( ent, "origin", ent->origin );
VectorAdd(adjustment, ent->origin, ent->origin);
VectorCopy(origin, ent->originbrush_origin);
- char string[128];
sprintf(string, "%f %f %f", ent->origin[0], ent->origin[1], ent->origin[2]);
SetKeyValue(ent, "origin", string);
}
/* get explicit shadow flags */
GetEntityShadowFlags( mapEnt, NULL, &castShadows, &recvShadows );
+ /* vortex: added _ls key (short name of lightmapscale) */
/* ydnar: get lightmap scaling value for this entity */
if( strcmp( "", ValueForKey( mapEnt, "lightmapscale" ) ) ||
- strcmp( "", ValueForKey( mapEnt, "_lightmapscale" ) ) )
+ strcmp( "", ValueForKey( mapEnt, "_lightmapscale" ) ) ||
+ strcmp( "", ValueForKey( mapEnt, "_ls" ) ) )
{
/* get lightmap scale from entity */
lightmapScale = FloatForKey( mapEnt, "lightmapscale" );
if( lightmapScale <= 0.0f )
lightmapScale = FloatForKey( mapEnt, "_lightmapscale" );
+ if( lightmapScale <= 0.0f )
+ lightmapScale = FloatForKey( mapEnt, "_ls" );
if( lightmapScale > 0.0f )
Sys_Printf( "Entity %d (%s) has lightmap scale of %.4f\n", mapEnt->mapEntityNum, classname, lightmapScale );
}