Added monster_voltigore and monster_baby_voltigore.
This commit is contained in:
@@ -39,7 +39,7 @@ If you are trying to use the compiled binary, you must know that it has been com
|
||||
|
||||
To remedy this issue you have two options:
|
||||
|
||||
You can recompile the source code under g++ 4.8 and use the newly generated binary. Make sure to edit the Makefile so it points to that version of g++. Compilation is done by simply running `make` on the `src/dlls` folder
|
||||
You can recompile the source code under g++ 4.8 and use the newly generated binary. Make sure to edit the Makefile so it points to that version of g++. Compilation is done by simply running `make` on the `src/dlls` folder.
|
||||
|
||||
Alternatively, you can "remove" the outdated library to force HLDS to use the libstdc++ provided by the linux distro, which is generally more up to date. You might need to install GCC/G++ on the operating system if it doesn't work.
|
||||
|
||||
@@ -83,7 +83,7 @@ Current milestones are separated by "Tiers", which are as follows:
|
||||
|
||||
### Tier 3
|
||||
|
||||
- Implement *-almost-* all Opposing Force monsters.
|
||||
- Implement *-almost-* all Opposing Force monsters. **[DONE]**
|
||||
- Implement *-almost-* all default Sven Co-op monsters.
|
||||
- Add configurations to change AI behaviour.
|
||||
|
||||
|
||||
@@ -32,3 +32,5 @@
|
||||
//monster_otis
|
||||
//monster_pitdrone
|
||||
//monster_shocktrooper
|
||||
//monster_voltigore
|
||||
//monster_baby_voltigore
|
||||
|
||||
@@ -121,6 +121,16 @@ sk_shocktrooper_rchgspeed 1
|
||||
sk_shock_dmg 15
|
||||
sk_spore_dmg 50
|
||||
|
||||
// Voltigore
|
||||
sk_voltigore_health 320
|
||||
sk_voltigore_dmg_beam 50
|
||||
sk_voltigore_dmg_punch 40
|
||||
|
||||
// Baby Voltigore
|
||||
sk_babyvoltigore_health 60
|
||||
sk_babyvoltigore_dmg_punch 15
|
||||
|
||||
|
||||
// MONSTER WEAPON DAMAGE
|
||||
sk_9mm_bullet 5
|
||||
sk_9mmAR_bullet 4
|
||||
|
||||
@@ -50,6 +50,7 @@ OBJ = \
|
||||
talkmonster.o \
|
||||
turret.o \
|
||||
util.o \
|
||||
voltigore.o \
|
||||
weapons.o \
|
||||
zombie.o
|
||||
|
||||
|
||||
@@ -1490,4 +1490,110 @@ public:
|
||||
static const char *pGruntSentences[];
|
||||
};
|
||||
|
||||
//=========================================================
|
||||
// Voltigore's energy ball projectile
|
||||
//=========================================================
|
||||
#define VOLTIGORE_MAX_BEAMS 8
|
||||
class CMVoltigoreEnergyBall : public CMBaseEntity
|
||||
{
|
||||
public:
|
||||
void Spawn(void);
|
||||
|
||||
static edict_t *Shoot(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity);
|
||||
void EXPORT BallTouch(edict_t *pOther);
|
||||
void EXPORT FlyThink(void);
|
||||
|
||||
void CreateBeams();
|
||||
void ClearBeams();
|
||||
void UpdateBeams();
|
||||
|
||||
CMBeam* m_pBeam[VOLTIGORE_MAX_BEAMS];
|
||||
int m_iBeams;
|
||||
float m_timeToDie;
|
||||
|
||||
protected:
|
||||
|
||||
void CreateBeam(int nIndex, const Vector& vecPos, int width, int brightness);
|
||||
void UpdateBeam(int nIndex, const Vector& vecPos, bool show);
|
||||
void ClearBeam(int nIndex);
|
||||
};
|
||||
|
||||
//=========================================================
|
||||
// Voltigore
|
||||
//=========================================================
|
||||
class CMVoltigore : public CMBaseMonster
|
||||
{
|
||||
public:
|
||||
virtual void Spawn(void);
|
||||
virtual void Precache(void);
|
||||
void SetYawSpeed(void);
|
||||
virtual int Classify(void);
|
||||
virtual void HandleAnimEvent(MonsterEvent_t *pEvent);
|
||||
virtual void IdleSound(void);
|
||||
virtual void PainSound(void);
|
||||
virtual void DeathSound(void);
|
||||
virtual void AlertSound(void);
|
||||
void AttackSound(void);
|
||||
virtual void StartTask(Task_t *pTask);
|
||||
virtual BOOL CheckMeleeAttack1(float flDot, float flDist);
|
||||
virtual BOOL CheckRangeAttack1(float flDot, float flDist);
|
||||
virtual void RunAI(void);
|
||||
virtual void GibMonster();
|
||||
Schedule_t *GetSchedule(void);
|
||||
Schedule_t *GetScheduleOfType(int Type);
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||
|
||||
CUSTOM_SCHEDULES
|
||||
|
||||
float m_flNextZapTime; // last time the voltigore used the spit attack.
|
||||
BOOL m_fShouldUpdateBeam;
|
||||
CMBeam* m_pBeam[3];
|
||||
CMSprite* m_pBeamGlow;
|
||||
int m_glowBrightness;
|
||||
|
||||
static const char* pAlertSounds[];
|
||||
static const char* pAttackMeleeSounds[];
|
||||
static const char* pMeleeHitSounds[];
|
||||
static const char* pMeleeMissSounds[];
|
||||
static const char* pComSounds[];
|
||||
static const char* pDeathSounds[];
|
||||
static const char* pFootstepSounds[];
|
||||
static const char* pIdleSounds[];
|
||||
static const char* pPainSounds[];
|
||||
static const char* pGruntSounds[];
|
||||
|
||||
void CreateBeams();
|
||||
void DestroyBeams();
|
||||
void UpdateBeams();
|
||||
|
||||
void CreateGlow();
|
||||
void DestroyGlow();
|
||||
void GlowUpdate();
|
||||
void GlowOff(void);
|
||||
void GlowOn(int level);
|
||||
protected:
|
||||
void GibBeamDamage();
|
||||
void PrecacheImpl(char* modelName);
|
||||
int m_beamTexture;
|
||||
};
|
||||
|
||||
//=========================================================
|
||||
// Baby Voltigore
|
||||
//=========================================================
|
||||
class CMBabyVoltigore : public CMVoltigore
|
||||
{
|
||||
public:
|
||||
void Spawn(void);
|
||||
void Precache(void);
|
||||
void HandleAnimEvent(MonsterEvent_t* pEvent);
|
||||
BOOL CheckMeleeAttack1(float flDot, float flDist);
|
||||
BOOL CheckRangeAttack1(float flDot, float flDist);
|
||||
void StartTask(Task_t *pTask);
|
||||
void Killed(entvars_t *pevAttacker, int iGib);
|
||||
void GibMonster();
|
||||
Schedule_t* GetSchedule();
|
||||
Schedule_t* GetScheduleOfType(int Type);
|
||||
};
|
||||
|
||||
#endif // BASEMONSTER_H
|
||||
|
||||
@@ -158,6 +158,8 @@ monster_type_t monster_types[]=
|
||||
"monster_pitdrone", FALSE,
|
||||
"monster_shockroach", FALSE,
|
||||
"monster_shocktrooper", FALSE,
|
||||
"monster_voltigore", FALSE,
|
||||
"monster_baby_voltigore", FALSE,
|
||||
"info_node", FALSE, // Nodes
|
||||
"info_node_air", FALSE,
|
||||
"", FALSE
|
||||
@@ -545,7 +547,7 @@ void check_monster_info( edict_t *pPlayer )
|
||||
MESSAGE_END();
|
||||
|
||||
// Delay till next scan
|
||||
g_NextMessage[ ENTINDEX( pPlayer ) ] = gpGlobals->time + 0.875;
|
||||
g_NextMessage[ ENTINDEX( pPlayer ) ] = gpGlobals->time + 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -624,6 +626,8 @@ bool spawn_monster(int monster_type, Vector origin, Vector angles, int respawn_i
|
||||
case 21: monsters[monster_index].pMonster = CreateClassPtr((CMPitdrone *)NULL); break;
|
||||
case 22: monsters[monster_index].pMonster = CreateClassPtr((CMShockRoach *)NULL); break;
|
||||
case 23: monsters[monster_index].pMonster = CreateClassPtr((CMStrooper *)NULL); break;
|
||||
case 24: monsters[monster_index].pMonster = CreateClassPtr((CMVoltigore *)NULL); break;
|
||||
case 25: monsters[monster_index].pMonster = CreateClassPtr((CMBabyVoltigore *)NULL); break;
|
||||
}
|
||||
|
||||
if (monsters[monster_index].pMonster == NULL)
|
||||
@@ -1307,6 +1311,8 @@ void mmServerActivate( edict_t *pEdictList, int edictCount, int clientMax )
|
||||
CMPitdrone pitdrone;
|
||||
CMShockRoach shockroach;
|
||||
CMStrooper strooper;
|
||||
CMVoltigore voltigore;
|
||||
CMBabyVoltigore babyvoltigore;
|
||||
|
||||
g_psv_gravity = CVAR_GET_POINTER( "sv_gravity" );
|
||||
|
||||
@@ -1348,6 +1354,8 @@ void mmServerActivate( edict_t *pEdictList, int edictCount, int clientMax )
|
||||
case 21: pitdrone.Precache(); break;
|
||||
case 22: shockroach.Precache(); break;
|
||||
case 23: strooper.Precache(); break;
|
||||
case 24: voltigore.Precache(); break;
|
||||
case 25: babyvoltigore.Precache(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,11 @@ skill_cfg_t skill_cfg[] = {
|
||||
{"sk_shocktrooper_kick", &gSkillData.strooperDmgKick},
|
||||
{"sk_shocktrooper_maxcharge", &gSkillData.strooperMaxCharge},
|
||||
{"sk_shocktrooper_rchgspeed", &gSkillData.strooperRchgSpeed},
|
||||
{"sk_voltigore_health", &gSkillData.voltigoreHealth},
|
||||
{"sk_voltigore_dmg_beam", &gSkillData.voltigoreDmgBeam},
|
||||
{"sk_voltigore_dmg_punch", &gSkillData.voltigoreDmgPunch},
|
||||
{"sk_babyvoltigore_health", &gSkillData.babyVoltigoreHealth},
|
||||
{"sk_babyvoltigore_dmg_punch", &gSkillData.babyVoltigoreDmgPunch},
|
||||
{"sk_12mm_bullet", &gSkillData.monDmg9MM},
|
||||
{"sk_9mmAR_bullet", &gSkillData.monDmgMP5},
|
||||
{"sk_9mm_bullet", &gSkillData.monDmg12MM},
|
||||
@@ -262,6 +267,15 @@ void monster_skill_init(void)
|
||||
gSkillData.strooperMaxCharge = 8.0f;
|
||||
gSkillData.strooperRchgSpeed = 1.0f;
|
||||
|
||||
// Voltigore
|
||||
gSkillData.voltigoreHealth = 320.0f;
|
||||
gSkillData.voltigoreDmgBeam = 50.0f;
|
||||
gSkillData.voltigoreDmgPunch = 40.0f;
|
||||
|
||||
// Baby Voltigore
|
||||
gSkillData.babyVoltigoreHealth = 60.0f;
|
||||
gSkillData.babyVoltigoreDmgPunch = 15.0f;
|
||||
|
||||
// MONSTER WEAPONS
|
||||
gSkillData.monDmg9MM = 5.0f;
|
||||
gSkillData.monDmgMP5 = 4.0f;
|
||||
|
||||
@@ -110,6 +110,13 @@ struct skilldata_t
|
||||
float strooperMaxCharge;
|
||||
float strooperRchgSpeed;
|
||||
|
||||
float voltigoreHealth;
|
||||
float voltigoreDmgBeam;
|
||||
float voltigoreDmgPunch;
|
||||
|
||||
float babyVoltigoreHealth;
|
||||
float babyVoltigoreDmgPunch;
|
||||
|
||||
// weapons shared by monsters
|
||||
float monDmg9MM;
|
||||
float monDmgMP5;
|
||||
|
||||
1326
src/dlls/voltigore.cpp
Normal file
1326
src/dlls/voltigore.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user