mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 20:38:59 +00:00
Merge pull request #276 from erorcun/erorcun
Shadow/blood fade and scale fix
This commit is contained in:
commit
37a7c48e63
2 changed files with 5 additions and 5 deletions
|
@ -9244,7 +9244,7 @@ CPed::ProcessControl(void)
|
||||||
float timeDependentDist;
|
float timeDependentDist;
|
||||||
if (remainingBloodyFpTime >= 2000) {
|
if (remainingBloodyFpTime >= 2000) {
|
||||||
if (remainingBloodyFpTime <= 7000)
|
if (remainingBloodyFpTime <= 7000)
|
||||||
timeDependentDist = (remainingBloodyFpTime - 2000) / 5000 * 0.75f;
|
timeDependentDist = (remainingBloodyFpTime - 2000) / 5000.0f * 0.75f;
|
||||||
else
|
else
|
||||||
timeDependentDist = 0.75f;
|
timeDependentDist = 0.75f;
|
||||||
} else {
|
} else {
|
||||||
|
@ -9288,8 +9288,8 @@ CPed::ProcessControl(void)
|
||||||
} else {
|
} else {
|
||||||
CShadows::StoreStaticShadow(
|
CShadows::StoreStaticShadow(
|
||||||
(uintptr)this + 17, SHADOWTYPE_DARK, gpBloodPoolTex, &bloodPos,
|
(uintptr)this + 17, SHADOWTYPE_DARK, gpBloodPoolTex, &bloodPos,
|
||||||
(remainingBloodyFpTime - 2000) / 5000 * 0.75f, 0.0f,
|
(remainingBloodyFpTime - 2000) / 5000.0f * 0.75f, 0.0f,
|
||||||
0.0f, (remainingBloodyFpTime - 2000) / 5000 * -0.75f,
|
0.0f, (remainingBloodyFpTime - 2000) / 5000.0f * -0.75f,
|
||||||
255, 255, 0, 0, 4.0f, 1.0f, 40.0f, false, 0.0f);
|
255, 255, 0, 0, 4.0f, 1.0f, 40.0f, false, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1516,11 +1516,11 @@ CShadows::UpdatePermanentShadows(void)
|
||||||
aPermanentShadows[i].m_nType = SHADOWTYPE_NONE;
|
aPermanentShadows[i].m_nType = SHADOWTYPE_NONE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( timePassed >= (aPermanentShadows[i].m_nLifeTime*(1-(1/4))) )
|
if ( timePassed >= (aPermanentShadows[i].m_nLifeTime * 3 / 4) )
|
||||||
{
|
{
|
||||||
// timePassed == 0 -> 4
|
// timePassed == 0 -> 4
|
||||||
// timePassed == aPermanentShadows[i].m_nLifeTime -> 0
|
// timePassed == aPermanentShadows[i].m_nLifeTime -> 0
|
||||||
float fMult = 1.0f - (timePassed - (aPermanentShadows[i].m_nLifeTime*(1-(1/4)))) / (aPermanentShadows[i].m_nLifeTime / 4);
|
float fMult = 1.0f - float(timePassed - (aPermanentShadows[i].m_nLifeTime * 3 / 4)) / (aPermanentShadows[i].m_nLifeTime / 4);
|
||||||
|
|
||||||
StoreStaticShadow((uint32)&aPermanentShadows[i],
|
StoreStaticShadow((uint32)&aPermanentShadows[i],
|
||||||
aPermanentShadows[i].m_nType,
|
aPermanentShadows[i].m_nType,
|
||||||
|
|
Loading…
Reference in a new issue