mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 05:22:32 +01:00
Correct imshadows a bit
This commit is contained in:
parent
b9dff82bcc
commit
1e69da6ce5
@ -27,7 +27,7 @@ static void SetVehicleColour(unsigned char primaryColour, unsigned char secondar
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -38,13 +38,18 @@ RpAtomic* ShadowCameraRenderCB(RpAtomic* pAtomic, void* pData)
|
||||
if ( RpAtomicGetFlags(pAtomic) & rpATOMICRENDER )
|
||||
{
|
||||
RpGeometry* pGeometry = RpAtomicGetGeometry(pAtomic);
|
||||
RwUInt32 geometryFlags = RpGeometryGetFlags(pGeometry);
|
||||
|
||||
RpGeometrySetFlags(pGeometry, geometryFlags & ~(rpGEOMETRYTEXTURED|rpGEOMETRYPRELIT|
|
||||
/*rpGEOMETRYNORMALS|*/rpGEOMETRYLIGHT|rpGEOMETRYMODULATEMATERIALCOLOR|rpGEOMETRYTEXTURED2));
|
||||
|
||||
AtomicDefaultRenderCallBack(pAtomic);
|
||||
RpGeometrySetFlags(pGeometry, geometryFlags);
|
||||
if ( pGeometry->repEntry != nullptr ) // Only switch to optimized flags if already instanced so as not to break the instanced model
|
||||
{
|
||||
RwUInt32 geometryFlags = RpGeometryGetFlags(pGeometry);
|
||||
pGeometry->flags &= ~(rpGEOMETRYTEXTURED|rpGEOMETRYPRELIT|rpGEOMETRYNORMALS|rpGEOMETRYLIGHT|rpGEOMETRYMODULATEMATERIALCOLOR|rpGEOMETRYTEXTURED2);
|
||||
pAtomic = AtomicDefaultRenderCallBack(pAtomic);
|
||||
RpGeometrySetFlags(pGeometry, geometryFlags);
|
||||
}
|
||||
else
|
||||
{
|
||||
pAtomic = AtomicDefaultRenderCallBack(pAtomic);
|
||||
}
|
||||
}
|
||||
return pAtomic;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<SILENTPATCH_EXT>.asi</SILENTPATCH_EXT>
|
||||
<SILENTPATCH_FULL_NAME>SilentPatch for San Andreas</SILENTPATCH_FULL_NAME>
|
||||
<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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
|
Loading…
Reference in New Issue
Block a user