mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 13:31:33 +00:00
Double promotion fixes.
This commit is contained in:
parent
ab17ad6ef9
commit
e3fbac5a64
@ -68,7 +68,7 @@ void CBlkopApache::Spawn(void)
|
|||||||
{
|
{
|
||||||
SetThink(&CApache::HuntThink);
|
SetThink(&CApache::HuntThink);
|
||||||
SetTouch(&CApache::FlyTouch);
|
SetTouch(&CApache::FlyTouch);
|
||||||
pev->nextthink = gpGlobals->time + 1.0;
|
pev->nextthink = gpGlobals->time + 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_iRockets = 10;
|
m_iRockets = 10;
|
||||||
|
@ -67,7 +67,7 @@ void CBlkopOsprey::Spawn(void)
|
|||||||
|
|
||||||
if (!(pev->spawnflags & SF_WAITFORTRIGGER))
|
if (!(pev->spawnflags & SF_WAITFORTRIGGER))
|
||||||
{
|
{
|
||||||
pev->nextthink = gpGlobals->time + 1.0;
|
pev->nextthink = gpGlobals->time + 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pos2 = pev->origin;
|
m_pos2 = pev->origin;
|
||||||
|
@ -963,7 +963,7 @@ void CFGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
|
|||||||
pBeam->SetFlags( BEAM_FSOLID );
|
pBeam->SetFlags( BEAM_FSOLID );
|
||||||
pBeam->SetColor( 255, 255, 255 );
|
pBeam->SetColor( 255, 255, 255 );
|
||||||
pBeam->SetThink( &CBaseEntity::SUB_Remove );
|
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 );
|
UTIL_Remove( this );
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ void CGonomeGuts::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocit
|
|||||||
pSpit->pev->owner = ENT( pevOwner );
|
pSpit->pev->owner = ENT( pevOwner );
|
||||||
|
|
||||||
pSpit->SetThink( &CSquidSpit::Animate );
|
pSpit->SetThink( &CSquidSpit::Animate );
|
||||||
pSpit->pev->nextthink = gpGlobals->time + 0.1;
|
pSpit->pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGonomeGuts::Touch( CBaseEntity *pOther )
|
void CGonomeGuts::Touch( CBaseEntity *pOther )
|
||||||
@ -333,7 +333,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist)
|
|||||||
return FALSE;
|
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)
|
if (m_hEnemy != 0)
|
||||||
{
|
{
|
||||||
@ -347,12 +347,12 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist)
|
|||||||
if (IsMoving())
|
if (IsMoving())
|
||||||
{
|
{
|
||||||
// don't spit again for a long time, resume chasing enemy.
|
// don't spit again for a long time, resume chasing enemy.
|
||||||
m_flNextSpitTime = gpGlobals->time + 5;
|
m_flNextSpitTime = gpGlobals->time + 5.0f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// not moving, so spit again pretty soon.
|
// not moving, so spit again pretty soon.
|
||||||
m_flNextSpitTime = gpGlobals->time + 0.5;
|
m_flNextSpitTime = gpGlobals->time + 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -367,7 +367,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist)
|
|||||||
//=========================================================
|
//=========================================================
|
||||||
BOOL CGonome::CheckMeleeAttack1(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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -379,7 +379,7 @@ BOOL CGonome::CheckMeleeAttack1(float flDot, float flDist)
|
|||||||
//=========================================================
|
//=========================================================
|
||||||
BOOL CGonome::CheckMeleeAttack2(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))
|
{ // apart (48 * sqrt(3)) and he can still attack (85 is a little more than 48*sqrt(3))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ void CAssassinRepel::RepelUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE
|
|||||||
pBeam->SetFlags(BEAM_FSOLID);
|
pBeam->SetFlags(BEAM_FSOLID);
|
||||||
pBeam->SetColor(255, 255, 255);
|
pBeam->SetColor(255, 255, 255);
|
||||||
pBeam->SetThink(&CBeam::SUB_Remove);
|
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);
|
UTIL_Remove(this);
|
||||||
}
|
}
|
||||||
|
@ -930,7 +930,7 @@ void CNGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
|
|||||||
pBeam->SetFlags( BEAM_FSOLID );
|
pBeam->SetFlags( BEAM_FSOLID );
|
||||||
pBeam->SetColor( 255, 255, 255 );
|
pBeam->SetColor( 255, 255, 255 );
|
||||||
pBeam->SetThink( &CBaseEntity::SUB_Remove );
|
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 );
|
UTIL_Remove( this );
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ static BOOL IsFacing(entvars_t *pevTest, const Vector &reference)
|
|||||||
angle.x = 0;
|
angle.x = 0;
|
||||||
UTIL_MakeVectorsPrivate(angle, forward, NULL, NULL);
|
UTIL_MakeVectorsPrivate(angle, forward, NULL, NULL);
|
||||||
// He's facing me, he meant it
|
// 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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ void CPitDroneSpit::Touch(CBaseEntity *pOther)
|
|||||||
pev->velocity = Vector(0, 0, 0);
|
pev->velocity = Vector(0, 0, 0);
|
||||||
pev->avelocity.z = 0;
|
pev->avelocity.z = 0;
|
||||||
pev->angles.z = RANDOM_LONG(0, 360);
|
pev->angles.z = RANDOM_LONG(0, 360);
|
||||||
pev->nextthink = gpGlobals->time + 10.0;
|
pev->nextthink = gpGlobals->time + 10.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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.
|
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);
|
InsertWaypoint(vecApex, bits_MF_TO_DETOUR | bits_MF_DONT_SIMPLIFY);
|
||||||
}
|
}
|
||||||
@ -349,18 +349,18 @@ BOOL CPitDrone::CheckRangeAttack1(float flDot, float flDist)
|
|||||||
return FALSE;
|
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())
|
if (IsMoving())
|
||||||
{
|
{
|
||||||
// don't spit again for a long time, resume chasing enemy.
|
// don't spit again for a long time, resume chasing enemy.
|
||||||
m_flNextSpitTime = gpGlobals->time + 5;
|
m_flNextSpitTime = gpGlobals->time + 5.0f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// not moving, so spit again pretty soon.
|
// not moving, so spit again pretty soon.
|
||||||
m_flNextSpitTime = gpGlobals->time + 0.5;
|
m_flNextSpitTime = gpGlobals->time + 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -490,8 +490,8 @@ void CPitDrone::HandleAnimEvent(MonsterEvent_t *pEvent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// jump into air for 0.8 (24/30) seconds
|
// jump into air for 0.8 (24/30) seconds
|
||||||
//pev->velocity.z += ( 0.875 * flGravity ) * 0.5;
|
//pev->velocity.z += ( 0.875f * flGravity ) * 0.5f;
|
||||||
pev->velocity.z += ( 0.625 * flGravity ) * 0.5;
|
pev->velocity.z += ( 0.625f * flGravity ) * 0.5f;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -981,7 +981,7 @@ void CZGruntRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
|
|||||||
pBeam->SetFlags( BEAM_FSOLID );
|
pBeam->SetFlags( BEAM_FSOLID );
|
||||||
pBeam->SetColor( 255, 255, 255 );
|
pBeam->SetColor( 255, 255, 255 );
|
||||||
pBeam->SetThink( &CBaseEntity::SUB_Remove );
|
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 );
|
UTIL_Remove( this );
|
||||||
}
|
}
|
||||||
|
@ -1080,7 +1080,7 @@ BOOL CScientist::CanHeal( void )
|
|||||||
if( FClassnameIs( pev, "monster_cleansuit_scientist" ) )
|
if( FClassnameIs( pev, "monster_cleansuit_scientist" ) )
|
||||||
return FALSE;
|
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 FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user