mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2025-01-01 08:43:01 +05:00
Correct imshadows a bit
This commit is contained in:
parent
b9dff82bcc
commit
1e69da6ce5
2 changed files with 13 additions and 8 deletions
|
@ -27,7 +27,7 @@ static void SetVehicleColour(unsigned char primaryColour, unsigned char secondar
|
||||||
|
|
||||||
static void ResetEditableMaterials(std::pair<void*,int>* pData)
|
static void ResetEditableMaterials(std::pair<void*,int>* pData)
|
||||||
{
|
{
|
||||||
for ( auto* i = pData; i->first; i++ )
|
for ( auto* i = pData; i->first != nullptr; i++ )
|
||||||
*static_cast<int*>(i->first) = i->second;
|
*static_cast<int*>(i->first) = i->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,14 +38,19 @@ RpAtomic* ShadowCameraRenderCB(RpAtomic* pAtomic, void* pData)
|
||||||
if ( RpAtomicGetFlags(pAtomic) & rpATOMICRENDER )
|
if ( RpAtomicGetFlags(pAtomic) & rpATOMICRENDER )
|
||||||
{
|
{
|
||||||
RpGeometry* pGeometry = RpAtomicGetGeometry(pAtomic);
|
RpGeometry* pGeometry = RpAtomicGetGeometry(pAtomic);
|
||||||
|
|
||||||
|
if ( pGeometry->repEntry != nullptr ) // Only switch to optimized flags if already instanced so as not to break the instanced model
|
||||||
|
{
|
||||||
RwUInt32 geometryFlags = RpGeometryGetFlags(pGeometry);
|
RwUInt32 geometryFlags = RpGeometryGetFlags(pGeometry);
|
||||||
|
pGeometry->flags &= ~(rpGEOMETRYTEXTURED|rpGEOMETRYPRELIT|rpGEOMETRYNORMALS|rpGEOMETRYLIGHT|rpGEOMETRYMODULATEMATERIALCOLOR|rpGEOMETRYTEXTURED2);
|
||||||
RpGeometrySetFlags(pGeometry, geometryFlags & ~(rpGEOMETRYTEXTURED|rpGEOMETRYPRELIT|
|
pAtomic = AtomicDefaultRenderCallBack(pAtomic);
|
||||||
/*rpGEOMETRYNORMALS|*/rpGEOMETRYLIGHT|rpGEOMETRYMODULATEMATERIALCOLOR|rpGEOMETRYTEXTURED2));
|
|
||||||
|
|
||||||
AtomicDefaultRenderCallBack(pAtomic);
|
|
||||||
RpGeometrySetFlags(pGeometry, geometryFlags);
|
RpGeometrySetFlags(pGeometry, geometryFlags);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pAtomic = AtomicDefaultRenderCallBack(pAtomic);
|
||||||
|
}
|
||||||
|
}
|
||||||
return pAtomic;
|
return pAtomic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<SILENTPATCH_EXT>.asi</SILENTPATCH_EXT>
|
<SILENTPATCH_EXT>.asi</SILENTPATCH_EXT>
|
||||||
<SILENTPATCH_FULL_NAME>SilentPatch for San Andreas</SILENTPATCH_FULL_NAME>
|
<SILENTPATCH_FULL_NAME>SilentPatch for San Andreas</SILENTPATCH_FULL_NAME>
|
||||||
<SILENTPATCH_REVISION_ID>28</SILENTPATCH_REVISION_ID>
|
<SILENTPATCH_REVISION_ID>28</SILENTPATCH_REVISION_ID>
|
||||||
<SILENTPATCH_BUILD_ID>3</SILENTPATCH_BUILD_ID>
|
<SILENTPATCH_BUILD_ID>5</SILENTPATCH_BUILD_ID>
|
||||||
<SILENTPATCH_COPYRIGHT>2014-2017</SILENTPATCH_COPYRIGHT>
|
<SILENTPATCH_COPYRIGHT>2014-2017</SILENTPATCH_COPYRIGHT>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
|
|
Loading…
Reference in a new issue