Merge pull request #2 from Joshua-Ashton/zhlt_lightflags

Add support for zhlt_lightflags
This commit is contained in:
Marco Cawthorne 2021-08-22 20:22:11 +02:00 committed by GitHub
commit 98a3fedf16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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