This commit is contained in:
george 2019-06-04 18:02:59 +01:00
commit f9edee1322

View File

@ -957,7 +957,7 @@ public void OnGameFrame()
delete Boss;
g_aBoss.Erase(i);
i--;
continue;
}
@ -1115,14 +1115,15 @@ bool BossInit(CBoss _Boss)
int iCounterOnHitMinCount = GetOutputCount(iCounterEnt, "m_OnHitMin");
int iCounterOnHitMaxCount = GetOutputCount(iCounterEnt, "m_OnHitMax");
Config.bCounterReverse = iCounterOnHitMaxCount > iCounterOnHitMinCount;
if(iCounterOnHitMaxCount == iCounterOnHitMinCount)
if(iCounterOnHitMinCount == iCounterOnHitMaxCount)
{
int iMaxDiff = RoundFloat(GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMax") - GetOutputValueFloat(iCounterEnt, "m_OutValue"));
int iMinDiff = RoundFloat(GetOutputValueFloat(iCounterEnt, "m_OutValue") - GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMin"));
int iMaxDiff = RoundFloat(GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMax") - GetOutputValueFloat(iCounterEnt, "m_OutValue"));
Config.bCounterReverse = iMaxDiff > iMinDiff;
}
else
Config.bCounterReverse = iCounterOnHitMaxCount > iCounterOnHitMinCount;
}
else if(_Boss.IsHPBar)
{
@ -1209,26 +1210,28 @@ bool BossInit(CBoss _Boss)
int iIteratorOnHitMinCount = GetOutputCount(iIteratorEnt, "m_OnHitMin");
int iIteratorOnHitMaxCount = GetOutputCount(iIteratorEnt, "m_OnHitMax");
Config.bIteratorReverse = iIteratorOnHitMaxCount > iIteratorOnHitMinCount;
if(iIteratorOnHitMaxCount == iIteratorOnHitMinCount)
if(iIteratorOnHitMinCount == iIteratorOnHitMaxCount)
{
int iIteratorMaxDiff = RoundFloat(GetEntPropFloat(iIteratorEnt, Prop_Data, "m_flMax") - GetOutputValueFloat(iIteratorEnt, "m_OutValue"));
int iIteratorMinDiff = RoundFloat(GetOutputValueFloat(iIteratorEnt, "m_OutValue") - GetEntPropFloat(iIteratorEnt, Prop_Data, "m_flMin"));
Config.bIteratorReverse = iIteratorMaxDiff > iIteratorMinDiff;
int iMinDiff = RoundFloat(GetOutputValueFloat(iIteratorEnt, "m_OutValue") - GetEntPropFloat(iIteratorEnt, Prop_Data, "m_flMin"));
int iMaxDiff = RoundFloat(GetEntPropFloat(iIteratorEnt, Prop_Data, "m_flMax") - GetOutputValueFloat(iIteratorEnt, "m_OutValue"));
Config.bIteratorReverse = iMaxDiff > iMinDiff;
}
else
Config.bIteratorReverse = iIteratorOnHitMaxCount > iIteratorOnHitMinCount;
int iCounterOnHitMinCount = GetOutputCount(iCounterEnt, "m_OnHitMin");
int iCounterOnHitMaxCount = GetOutputCount(iCounterEnt, "m_OnHitMax");
Config.bCounterReverse = iCounterOnHitMaxCount > iCounterOnHitMinCount;
if(iCounterOnHitMaxCount == iCounterOnHitMinCount)
if(iCounterOnHitMinCount == iCounterOnHitMaxCount)
{
int iMaxDiff = RoundFloat(GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMax") - GetOutputValueFloat(iCounterEnt, "m_OutValue"));
int iMinDiff = RoundFloat(GetOutputValueFloat(iCounterEnt, "m_OutValue") - GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMin"));
int iMaxDiff = RoundFloat(GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMax") - GetOutputValueFloat(iCounterEnt, "m_OutValue"));
Config.bCounterReverse = iMaxDiff > iMinDiff;
}
else
Config.bCounterReverse = iCounterOnHitMaxCount > iCounterOnHitMinCount;
}
_Boss.bActive = true;