mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Update (by anv):
- fix: data read from Data/AdditionalProperties, - new tag: <bTrapBonus> + updated data for tiles, trap level influenced by terrain, - new feature/option: COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7016 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -754,6 +754,23 @@ UINT8 LightTrueLevel( INT32 sGridNo, INT16 bLevel )
|
||||
{
|
||||
iSum=pNode->ubNaturalShadeLevel - (pNode->ubSumLights - pNode->ubFakeShadeLevel );
|
||||
|
||||
if(gGameExternalOptions.fStaticShadowsDecreaseBrightness && ( gRenderFlags & RENDER_FLAG_SHADOWS ))
|
||||
{
|
||||
INT32 sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( NORTH ) );
|
||||
STRUCTURE* pStructure = gpWorldLevelData[ sNewGridNo ].pStructureHead;
|
||||
if(pStructure != NULL)
|
||||
{
|
||||
LEVELNODE* pShadowNode = NULL;
|
||||
if(!(pStructure->fFlags & STRUCTURE_BASE_TILE))
|
||||
pShadowNode = gpWorldLevelData[ FindBaseStructure(pStructure)->sGridNo ].pShadowHead;
|
||||
else
|
||||
pShadowNode = gpWorldLevelData[ sNewGridNo ].pShadowHead;
|
||||
if(pShadowNode != NULL)
|
||||
{
|
||||
iSum += max( 0, (StructureHeight(pStructure) - 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
iSum=__min(SHADE_MIN, iSum);
|
||||
iSum=__max(SHADE_MAX, iSum);
|
||||
return( (UINT8) iSum );
|
||||
|
||||
Reference in New Issue
Block a user