mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix for black windows (Orta) not blocking vision properly, code formatting (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8979 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+28
-23
@@ -2602,7 +2602,7 @@ INT8 GetBlockingStructureInfo( INT32 sGridNo, INT8 bDir, INT8 bNextDir, INT8 bLe
|
|||||||
// If no struct, return
|
// If no struct, return
|
||||||
if ( pCurrent == NULL )
|
if ( pCurrent == NULL )
|
||||||
{
|
{
|
||||||
(*pStructHeight) = StructureHeight( pCurrent );
|
(*pStructHeight) = StructureHeight( pCurrent );
|
||||||
(*ppTallestStructure) = NULL;
|
(*ppTallestStructure) = NULL;
|
||||||
return( NOTHING_BLOCKING );
|
return( NOTHING_BLOCKING );
|
||||||
}
|
}
|
||||||
@@ -2642,40 +2642,45 @@ INT8 GetBlockingStructureInfo( INT32 sGridNo, INT8 bDir, INT8 bNextDir, INT8 bLe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK FOR WINDOW
|
// CHECK FOR WINDOW
|
||||||
if ( pCurrent->fFlags & STRUCTURE_WALLNWINDOW )
|
if (pCurrent->fFlags & STRUCTURE_WALLNWINDOW)
|
||||||
{
|
{
|
||||||
|
//shadooow: full blocking for black windows
|
||||||
|
if (pCurrent->fFlags & STRUCTURE_SPECIAL)
|
||||||
|
{
|
||||||
|
return(FULL_BLOCKING);
|
||||||
|
}
|
||||||
switch( pCurrent->ubWallOrientation )
|
switch( pCurrent->ubWallOrientation )
|
||||||
{
|
{
|
||||||
case OUTSIDE_TOP_LEFT:
|
case OUTSIDE_TOP_LEFT:
|
||||||
case INSIDE_TOP_LEFT:
|
case INSIDE_TOP_LEFT:
|
||||||
|
|
||||||
(*pStructHeight) = StructureHeight( pCurrent );
|
(*pStructHeight) = StructureHeight( pCurrent );
|
||||||
(*ppTallestStructure) = pCurrent;
|
(*ppTallestStructure) = pCurrent;
|
||||||
|
|
||||||
if ( pCurrent->fFlags & STRUCTURE_OPEN )
|
if ( pCurrent->fFlags & STRUCTURE_OPEN )
|
||||||
{
|
{
|
||||||
return( BLOCKING_TOPLEFT_OPEN_WINDOW );
|
return( BLOCKING_TOPLEFT_OPEN_WINDOW );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return( BLOCKING_TOPLEFT_WINDOW );
|
return( BLOCKING_TOPLEFT_WINDOW );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OUTSIDE_TOP_RIGHT:
|
case OUTSIDE_TOP_RIGHT:
|
||||||
case INSIDE_TOP_RIGHT:
|
case INSIDE_TOP_RIGHT:
|
||||||
|
|
||||||
(*pStructHeight) = StructureHeight( pCurrent );
|
(*pStructHeight) = StructureHeight( pCurrent );
|
||||||
(*ppTallestStructure) = pCurrent;
|
(*ppTallestStructure) = pCurrent;
|
||||||
|
|
||||||
if ( pCurrent->fFlags & STRUCTURE_OPEN )
|
if ( pCurrent->fFlags & STRUCTURE_OPEN )
|
||||||
{
|
{
|
||||||
return( BLOCKING_TOPRIGHT_OPEN_WINDOW );
|
return( BLOCKING_TOPRIGHT_OPEN_WINDOW );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return( BLOCKING_TOPRIGHT_WINDOW );
|
return( BLOCKING_TOPRIGHT_WINDOW );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2686,7 +2691,7 @@ INT8 GetBlockingStructureInfo( INT32 sGridNo, INT8 bDir, INT8 bNextDir, INT8 bLe
|
|||||||
// If we are not opem, we are full blocking!
|
// If we are not opem, we are full blocking!
|
||||||
if ( !(pCurrent->fFlags & STRUCTURE_OPEN ) )
|
if ( !(pCurrent->fFlags & STRUCTURE_OPEN ) )
|
||||||
{
|
{
|
||||||
(*pStructHeight) = StructureHeight( pCurrent );
|
(*pStructHeight) = StructureHeight( pCurrent );
|
||||||
(*ppTallestStructure) = pCurrent;
|
(*ppTallestStructure) = pCurrent;
|
||||||
return( FULL_BLOCKING );
|
return( FULL_BLOCKING );
|
||||||
break;
|
break;
|
||||||
@@ -2698,7 +2703,7 @@ INT8 GetBlockingStructureInfo( INT32 sGridNo, INT8 bDir, INT8 bNextDir, INT8 bLe
|
|||||||
case OUTSIDE_TOP_LEFT:
|
case OUTSIDE_TOP_LEFT:
|
||||||
case INSIDE_TOP_LEFT:
|
case INSIDE_TOP_LEFT:
|
||||||
|
|
||||||
(*pStructHeight) = StructureHeight( pCurrent );
|
(*pStructHeight) = StructureHeight( pCurrent );
|
||||||
(*ppTallestStructure) = pCurrent;
|
(*ppTallestStructure) = pCurrent;
|
||||||
return( BLOCKING_TOPLEFT_DOOR );
|
return( BLOCKING_TOPLEFT_DOOR );
|
||||||
break;
|
break;
|
||||||
@@ -2706,7 +2711,7 @@ INT8 GetBlockingStructureInfo( INT32 sGridNo, INT8 bDir, INT8 bNextDir, INT8 bLe
|
|||||||
case OUTSIDE_TOP_RIGHT:
|
case OUTSIDE_TOP_RIGHT:
|
||||||
case INSIDE_TOP_RIGHT:
|
case INSIDE_TOP_RIGHT:
|
||||||
|
|
||||||
(*pStructHeight) = StructureHeight( pCurrent );
|
(*pStructHeight) = StructureHeight( pCurrent );
|
||||||
(*ppTallestStructure) = pCurrent;
|
(*ppTallestStructure) = pCurrent;
|
||||||
return( BLOCKING_TOPRIGHT_DOOR );
|
return( BLOCKING_TOPRIGHT_DOOR );
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user