Add support for zhlt_lightflags

Support zhlt lightflags for shadow casting

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-08-22 19:05:12 +01:00
parent 011de3563f
commit 9823977391
No known key found for this signature in database
GPG key ID: C85A08669126BE8D

View file

@ -1063,6 +1063,11 @@ void GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castS
/* get cast shadows */
if ( castShadows != NULL ) {
value = ValueForKey( ent, "zhlt_lightflags" );
if ( value && value[ 0 ] != '\0' ) {
*castShadows = atoi( value ) & 0x2;
}
else {
value = ValueForKey( ent, "_castShadows" );
if ( value[ 0 ] == '\0' ) {
value = ValueForKey( ent, "_cs" );
@ -1077,6 +1082,7 @@ void GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castS
*castShadows = atoi( value );
}
}
}
/* receive */
if ( recvShadows != NULL ) {