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:
Flugente
2014-03-03 20:38:26 +00:00
parent 95b1c783eb
commit 8e06bdaf4c
9 changed files with 49 additions and 3 deletions
+17
View File
@@ -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 );