Browse Source

Double promotion fixes.

residual_point
Andrey Akhmichin 5 years ago
parent
commit
e3fbac5a64
  1. 2
      dlls/rp/blkop_apache.cpp
  2. 2
      dlls/rp/blkop_osprey.cpp
  3. 2
      dlls/rp/fgrunt.cpp
  4. 12
      dlls/rp/gonome.cpp
  5. 2
      dlls/rp/massn.cpp
  6. 2
      dlls/rp/ngrunt.cpp
  7. 2
      dlls/rp/otis.cpp
  8. 14
      dlls/rp/pitdrone.cpp
  9. 2
      dlls/rp/zgrunt.cpp
  10. 2
      dlls/scientist.cpp

2
dlls/rp/blkop_apache.cpp

@ -68,7 +68,7 @@ void CBlkopApache::Spawn(void) @@ -68,7 +68,7 @@ void CBlkopApache::Spawn(void)
{
SetThink(&CApache::HuntThink);
SetTouch(&CApache::FlyTouch);
pev->nextthink = gpGlobals->time + 1.0;
pev->nextthink = gpGlobals->time + 1.0f;
}
m_iRockets = 10;

2
dlls/rp/blkop_osprey.cpp

@ -67,7 +67,7 @@ void CBlkopOsprey::Spawn(void) @@ -67,7 +67,7 @@ void CBlkopOsprey::Spawn(void)
if (!(pev->spawnflags & SF_WAITFORTRIGGER))
{
pev->nextthink = gpGlobals->time + 1.0;
pev->nextthink = gpGlobals->time + 1.0f;
}
m_pos2 = pev->origin;

2
dlls/rp/fgrunt.cpp

@ -963,7 +963,7 @@ void CFGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -963,7 +963,7 @@ void CFGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
pBeam->SetFlags( BEAM_FSOLID );
pBeam->SetColor( 255, 255, 255 );
pBeam->SetThink( &CBaseEntity::SUB_Remove );
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
pBeam->pev->nextthink = gpGlobals->time + -4096.0f * tr.flFraction / pGrunt->pev->velocity.z + 0.5f;
UTIL_Remove( this );
}

12
dlls/rp/gonome.cpp

@ -95,7 +95,7 @@ void CGonomeGuts::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocit @@ -95,7 +95,7 @@ void CGonomeGuts::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocit
pSpit->pev->owner = ENT( pevOwner );
pSpit->SetThink( &CSquidSpit::Animate );
pSpit->pev->nextthink = gpGlobals->time + 0.1;
pSpit->pev->nextthink = gpGlobals->time + 0.1f;
}
void CGonomeGuts::Touch( CBaseEntity *pOther )
@ -333,7 +333,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist) @@ -333,7 +333,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist)
return FALSE;
}
if (flDist > 64 && flDist <= 784 && flDot >= 0.5 && gpGlobals->time >= m_flNextSpitTime)
if (flDist > 64 && flDist <= 784 && flDot >= 0.5f && gpGlobals->time >= m_flNextSpitTime)
{
if (m_hEnemy != 0)
{
@ -347,12 +347,12 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist) @@ -347,12 +347,12 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist)
if (IsMoving())
{
// don't spit again for a long time, resume chasing enemy.
m_flNextSpitTime = gpGlobals->time + 5;
m_flNextSpitTime = gpGlobals->time + 5.0f;
}
else
{
// not moving, so spit again pretty soon.
m_flNextSpitTime = gpGlobals->time + 0.5;
m_flNextSpitTime = gpGlobals->time + 0.5f;
}
return TRUE;
@ -367,7 +367,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist) @@ -367,7 +367,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist)
//=========================================================
BOOL CGonome::CheckMeleeAttack1(float flDot, float flDist)
{
if( m_hEnemy->pev->health <= gSkillData.gonomeDmgOneSlash && flDist <= 85 && flDot >= 0.7 )
if( m_hEnemy->pev->health <= gSkillData.gonomeDmgOneSlash && flDist <= 85 && flDot >= 0.7f )
{
return TRUE;
}
@ -379,7 +379,7 @@ BOOL CGonome::CheckMeleeAttack1(float flDot, float flDist) @@ -379,7 +379,7 @@ BOOL CGonome::CheckMeleeAttack1(float flDot, float flDist)
//=========================================================
BOOL CGonome::CheckMeleeAttack2(float flDot, float flDist)
{
if( flDist <= 85 && flDot >= 0.7 && !HasConditions( bits_COND_CAN_MELEE_ATTACK1 ) ) // The player & bullsquid can be as much as their bboxes
if( flDist <= 85 && flDot >= 0.7f && !HasConditions( bits_COND_CAN_MELEE_ATTACK1 ) ) // The player & bullsquid can be as much as their bboxes
{ // apart (48 * sqrt(3)) and he can still attack (85 is a little more than 48*sqrt(3))
return TRUE;
}

2
dlls/rp/massn.cpp

@ -396,7 +396,7 @@ void CAssassinRepel::RepelUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE @@ -396,7 +396,7 @@ void CAssassinRepel::RepelUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE
pBeam->SetFlags(BEAM_FSOLID);
pBeam->SetColor(255, 255, 255);
pBeam->SetThink(&CBeam::SUB_Remove);
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
pBeam->pev->nextthink = gpGlobals->time + -4096.0f * tr.flFraction / pGrunt->pev->velocity.z + 0.5f;
UTIL_Remove(this);
}

2
dlls/rp/ngrunt.cpp

@ -930,7 +930,7 @@ void CNGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -930,7 +930,7 @@ void CNGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
pBeam->SetFlags( BEAM_FSOLID );
pBeam->SetColor( 255, 255, 255 );
pBeam->SetThink( &CBaseEntity::SUB_Remove );
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
pBeam->pev->nextthink = gpGlobals->time + -4096.0f * tr.flFraction / pGrunt->pev->velocity.z + 0.5f;
UTIL_Remove( this );
}

2
dlls/rp/otis.cpp

@ -279,7 +279,7 @@ static BOOL IsFacing(entvars_t *pevTest, const Vector &reference) @@ -279,7 +279,7 @@ static BOOL IsFacing(entvars_t *pevTest, const Vector &reference)
angle.x = 0;
UTIL_MakeVectorsPrivate(angle, forward, NULL, NULL);
// He's facing me, he meant it
if (DotProduct(forward, vecDir) > 0.96) // +/- 15 degrees or so
if (DotProduct(forward, vecDir) > 0.96f) // +/- 15 degrees or so
{
return TRUE;
}

14
dlls/rp/pitdrone.cpp

@ -89,7 +89,7 @@ void CPitDroneSpit::Touch(CBaseEntity *pOther) @@ -89,7 +89,7 @@ void CPitDroneSpit::Touch(CBaseEntity *pOther)
pev->velocity = Vector(0, 0, 0);
pev->avelocity.z = 0;
pev->angles.z = RANDOM_LONG(0, 360);
pev->nextthink = gpGlobals->time + 10.0;
pev->nextthink = gpGlobals->time + 10.0f;
}
}
else
@ -311,7 +311,7 @@ int CPitDrone::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float @@ -311,7 +311,7 @@ int CPitDrone::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float
{
flDist = (pev->origin - m_Route[m_iRouteIndex].vecLocation).Length2D();// reusing flDist.
if (FTriangulate(pev->origin, m_Route[m_iRouteIndex].vecLocation, flDist * 0.5, m_hEnemy, &vecApex))
if (FTriangulate(pev->origin, m_Route[m_iRouteIndex].vecLocation, flDist * 0.5f, m_hEnemy, &vecApex))
{
InsertWaypoint(vecApex, bits_MF_TO_DETOUR | bits_MF_DONT_SIMPLIFY);
}
@ -349,18 +349,18 @@ BOOL CPitDrone::CheckRangeAttack1(float flDot, float flDist) @@ -349,18 +349,18 @@ BOOL CPitDrone::CheckRangeAttack1(float flDot, float flDist)
return FALSE;
}
if (flDist > 64 && flDist <= 784 && flDot >= 0.5 && gpGlobals->time >= m_flNextSpitTime)
if (flDist > 64 && flDist <= 784 && flDot >= 0.5f && gpGlobals->time >= m_flNextSpitTime)
{
if (IsMoving())
{
// don't spit again for a long time, resume chasing enemy.
m_flNextSpitTime = gpGlobals->time + 5;
m_flNextSpitTime = gpGlobals->time + 5.0f;
}
else
{
// not moving, so spit again pretty soon.
m_flNextSpitTime = gpGlobals->time + 0.5;
m_flNextSpitTime = gpGlobals->time + 0.5f;
}
return TRUE;
@ -490,8 +490,8 @@ void CPitDrone::HandleAnimEvent(MonsterEvent_t *pEvent) @@ -490,8 +490,8 @@ void CPitDrone::HandleAnimEvent(MonsterEvent_t *pEvent)
}
// jump into air for 0.8 (24/30) seconds
//pev->velocity.z += ( 0.875 * flGravity ) * 0.5;
pev->velocity.z += ( 0.625 * flGravity ) * 0.5;
//pev->velocity.z += ( 0.875f * flGravity ) * 0.5f;
pev->velocity.z += ( 0.625f * flGravity ) * 0.5f;
}
break;

2
dlls/rp/zgrunt.cpp

@ -981,7 +981,7 @@ void CZGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -981,7 +981,7 @@ void CZGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
pBeam->SetFlags( BEAM_FSOLID );
pBeam->SetColor( 255, 255, 255 );
pBeam->SetThink( &CBaseEntity::SUB_Remove );
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
pBeam->pev->nextthink = gpGlobals->time + -4096.0f * tr.flFraction / pGrunt->pev->velocity.z + 0.5f;
UTIL_Remove( this );
}

2
dlls/scientist.cpp

@ -1080,7 +1080,7 @@ BOOL CScientist::CanHeal( void ) @@ -1080,7 +1080,7 @@ BOOL CScientist::CanHeal( void )
if( FClassnameIs( pev, "monster_cleansuit_scientist" ) )
return FALSE;
if( ( m_healTime > gpGlobals->time ) || ( m_hTargetEnt == 0 ) || ( m_hTargetEnt->pev->health > ( m_hTargetEnt->pev->max_health * 0.5 ) ) )
if( ( m_healTime > gpGlobals->time ) || ( m_hTargetEnt == 0 ) || ( m_hTargetEnt->pev->health > ( m_hTargetEnt->pev->max_health * 0.5f ) ) )
return FALSE;
return TRUE;

Loading…
Cancel
Save