mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-06 03:54:14 +00:00
Fix shocktrooper shoot and grenade origin. Adjust some voltigore values to match Opposing Force (#20)
This commit is contained in:
parent
9b2bf66db5
commit
5b45a96a5e
@ -329,7 +329,7 @@ void CStrooper::HandleAnimEvent(MonsterEvent_t *pEvent)
|
||||
{
|
||||
UTIL_MakeVectors(pev->angles);
|
||||
// CGrenade::ShootTimed( pev, pev->origin + gpGlobals->v_forward * 34 + Vector (0, 0, 32), m_vecTossVelocity, 3.5 );
|
||||
CSporeGrenade::ShootTimed(pev, GetGunPosition(), m_vecTossVelocity, 3.5);
|
||||
CSporeGrenade::ShootTimed(pev, pev->origin + Vector(0,0,98), m_vecTossVelocity, 3.5);
|
||||
|
||||
m_fThrowGrenade = FALSE;
|
||||
m_flNextGrenadeCheck = gpGlobals->time + 6;// wait six seconds before even looking again to see if a grenade can be thrown.
|
||||
@ -360,7 +360,8 @@ void CStrooper::HandleAnimEvent(MonsterEvent_t *pEvent)
|
||||
WRITE_BYTE( 128 ); // brightness
|
||||
MESSAGE_END();
|
||||
|
||||
Vector vecShootOrigin = GetGunPosition();
|
||||
UTIL_MakeVectors(pev->angles);
|
||||
Vector vecShootOrigin = vecGunPos + gpGlobals->v_forward * 32;
|
||||
Vector vecShootDir = ShootAtEnemy( vecShootOrigin );
|
||||
vecGunAngles = UTIL_VecToAngles(vecShootDir);
|
||||
|
||||
|
@ -34,13 +34,13 @@
|
||||
#define VOLTIGORE_CLASSNAME "monster_alien_voltigore"
|
||||
#define VOLTIGORE_BABY_CLASSNAME "monster_alien_babyvoltigore"
|
||||
|
||||
#define VOLTIGORE_ZAP_RED 160
|
||||
#define VOLTIGORE_ZAP_GREEN 0
|
||||
#define VOLTIGORE_ZAP_RED 180
|
||||
#define VOLTIGORE_ZAP_GREEN 16
|
||||
#define VOLTIGORE_ZAP_BLUE 255
|
||||
#define VOLTIGORE_ZAP_BEAM "sprites/lgtning.spr"
|
||||
#define VOLTIGORE_ZAP_NOISE 80
|
||||
#define VOLTIGORE_ZAP_WIDTH 40
|
||||
#define VOLTIGORE_ZAP_BRIGHTNESS 210
|
||||
#define VOLTIGORE_ZAP_BRIGHTNESS 255
|
||||
#define VOLTIGORE_ZAP_DISTANCE 512
|
||||
#define VOLTIGORE_GLOW_SCALE 1.0f
|
||||
#define VOLTIGORE_GIB_COUNT 9
|
||||
@ -121,9 +121,6 @@ void CVoltigoreEnergyBall::Spawn(void)
|
||||
UTIL_SetSize(pev, Vector(0, 0, 0), Vector(0, 0, 0));
|
||||
|
||||
m_iBeams = 0;
|
||||
|
||||
// Create beams.
|
||||
CreateBeams();
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
@ -192,7 +189,10 @@ void CVoltigoreEnergyBall::BeamThink(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBeams();
|
||||
if (m_iBeams)
|
||||
UpdateBeams();
|
||||
else
|
||||
CreateBeams();
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ void CVoltigoreEnergyBall::CreateBeams()
|
||||
{
|
||||
for (int i = 0; i < VOLTIGORE_MAX_BEAMS; ++i)
|
||||
{
|
||||
CreateBeam(i, pev->origin, VOLTIGORE_ZAP_WIDTH, VOLTIGORE_ZAP_BRIGHTNESS + RANDOM_LONG(1, 5) );
|
||||
CreateBeam(i, pev->origin, VOLTIGORE_ZAP_WIDTH, VOLTIGORE_ZAP_BRIGHTNESS );
|
||||
}
|
||||
m_iBeams = VOLTIGORE_MAX_BEAMS;
|
||||
}
|
||||
@ -270,7 +270,7 @@ void CVoltigoreEnergyBall::UpdateBeams()
|
||||
const Vector vecSrc = pev->origin;
|
||||
const Vector directionVector = pev->velocity.Normalize();
|
||||
const int baseDistance = VOLTIGORE_ZAP_DISTANCE;
|
||||
for (i = 0; i < VOLTIGORE_MAX_BEAMS; ++i)
|
||||
for (i = 0; i < m_iBeams; ++i)
|
||||
{
|
||||
for (j = 0; j < 3; ++j)
|
||||
{
|
||||
@ -645,7 +645,7 @@ void CVoltigore::HandleAnimEvent(MonsterEvent_t *pEvent)
|
||||
// do stuff for this event.
|
||||
//AttackSound();
|
||||
|
||||
CVoltigoreEnergyBall::Shoot(pev, vecSpitOffset, vecSpitDir * 900);
|
||||
CVoltigoreEnergyBall::Shoot(pev, vecSpitOffset, vecSpitDir * 1000);
|
||||
|
||||
// turn the beam glow off.
|
||||
DestroyBeams();
|
||||
|
Loading…
x
Reference in New Issue
Block a user