Double promotion fixes.

This commit is contained in:
Andrey Akhmichin 2020-01-02 22:31:26 +05:00
parent ab17ad6ef9
commit e3fbac5a64
10 changed files with 21 additions and 21 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 );
}

View File

@ -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)
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)
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)
//=========================================================
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)
//=========================================================
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;
}

View File

@ -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);
}

View File

@ -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 );
}

View File

@ -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;
}

View File

@ -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
{
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)
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)
}
// 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;

View File

@ -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 );
}

View File

@ -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;