Browse Source

Update skill cvars.

residual_point
Night Owl 7 years ago
parent
commit
8ab8b10a40
  1. 6
      dlls/Android.mk
  2. 6
      dlls/CMakeLists.txt
  3. 64
      dlls/apache.cpp
  4. 85
      dlls/apache.h
  5. 49
      dlls/barney.cpp
  6. 71
      dlls/barney.h
  7. 56
      dlls/bullsquid.cpp
  8. 83
      dlls/bullsquid.h
  9. 1
      dlls/cbase.h
  10. 28
      dlls/combat.cpp
  11. 157
      dlls/game.cpp
  12. 32
      dlls/gamerules.cpp
  13. 78
      dlls/hgrunt.cpp
  14. 103
      dlls/hgrunt.h
  15. 33
      dlls/monsters.cpp
  16. 1
      dlls/monsters.h
  17. 77
      dlls/osprey.cpp
  18. 88
      dlls/osprey.h
  19. 2
      dlls/rp/otis.cpp
  20. 25
      dlls/skill.h

6
dlls/Android.mk

@ -125,6 +125,12 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \ @@ -125,6 +125,12 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \
world.cpp \
xen.cpp \
zombie.cpp \
rp/blkop_apache.cpp \
rp/blkop_osprey.cpp \
rp/gonome.cpp \
rp/massn.cpp \
rp/otis.cpp \
rp/pitdrone.cpp \
../pm_shared/pm_debug.c \
../pm_shared/pm_math.c \
../pm_shared/pm_shared.c

6
dlls/CMakeLists.txt

@ -127,6 +127,12 @@ set (SVDLL_SOURCES @@ -127,6 +127,12 @@ set (SVDLL_SOURCES
world.cpp
xen.cpp
zombie.cpp
rp/blkop_apache.cpp
rp/blkop_osprey.cpp
rp/gonome.cpp
rp/massn.cpp
rp/otis.cpp
rp/pitdrone.cpp
../pm_shared/pm_debug.c
../pm_shared/pm_math.c
../pm_shared/pm_shared.c

64
dlls/apache.cpp

@ -21,75 +21,13 @@ @@ -21,75 +21,13 @@
#include "weapons.h"
#include "nodes.h"
#include "effects.h"
#include "apache.h"
extern DLL_GLOBAL int g_iSkillLevel;
#define SF_WAITFORTRIGGER (0x04 | 0x40) // UNDONE: Fix!
#define SF_NOWRECKAGE 0x08
class CApache : public CBaseMonster
{
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
void Spawn( void );
void Precache( void );
int IRelationship( CBaseEntity *pTarget );
int Classify( void ) { return CLASS_HUMAN_MILITARY; };
int BloodColor( void ) { return DONT_BLEED; }
void Killed( entvars_t *pevAttacker, int iGib );
void GibMonster( void );
void SetObjectCollisionBox( void )
{
pev->absmin = pev->origin + Vector( -300, -300, -172 );
pev->absmax = pev->origin + Vector( 300, 300, 8 );
}
void EXPORT HuntThink( void );
void EXPORT FlyTouch( CBaseEntity *pOther );
void EXPORT CrashTouch( CBaseEntity *pOther );
void EXPORT DyingThink( void );
void EXPORT StartupUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
void EXPORT NullThink( void );
void ShowDamage( void );
void Flight( void );
void FireRocket( void );
BOOL FireGun( void );
int TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType );
void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType );
int m_iRockets;
float m_flForce;
float m_flNextRocket;
Vector m_vecTarget;
Vector m_posTarget;
Vector m_vecDesired;
Vector m_posDesired;
Vector m_vecGoal;
Vector m_angGun;
float m_flLastSeen;
float m_flPrevSeen;
int m_iSoundState; // don't save this
int m_iSpriteTexture;
int m_iExplode;
int m_iBodyGibs;
float m_flGoalSpeed;
int m_iDoSmokePuff;
CBeam *m_pBeam;
};
LINK_ENTITY_TO_CLASS( monster_apache, CApache )
TYPEDESCRIPTION CApache::m_SaveData[] =

85
dlls/apache.h

@ -0,0 +1,85 @@ @@ -0,0 +1,85 @@
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve LLC and its suppliers. Access to this code is restricted to
* persons who have executed a written SDK license with Valve. Any access,
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef APACHE_H
#define APACHE_H
class CApache : public CBaseMonster
{
public:
int Save(CSave &save);
int Restore(CRestore &restore);
static TYPEDESCRIPTION m_SaveData[];
virtual void Spawn(void);
virtual void Precache(void);
int IRelationship( CBaseEntity *pTarget );
int Classify(void) { return CLASS_HUMAN_MILITARY; };
int BloodColor(void) { return DONT_BLEED; }
void Killed(entvars_t *pevAttacker, int iGib);
void GibMonster(void);
void SetObjectCollisionBox(void)
{
pev->absmin = pev->origin + Vector(-300, -300, -172);
pev->absmax = pev->origin + Vector(300, 300, 8);
}
void EXPORT HuntThink(void);
void EXPORT FlyTouch(CBaseEntity *pOther);
void EXPORT CrashTouch(CBaseEntity *pOther);
void EXPORT DyingThink(void);
void EXPORT StartupUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
void EXPORT NullThink(void);
void ShowDamage(void);
void Flight(void);
void FireRocket(void);
BOOL FireGun(void);
int TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType);
void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
protected:
int m_iRockets;
float m_flForce;
float m_flNextRocket;
Vector m_vecTarget;
Vector m_posTarget;
Vector m_vecDesired;
Vector m_posDesired;
Vector m_vecGoal;
Vector m_angGun;
float m_flLastSeen;
float m_flPrevSeen;
int m_iSoundState; // don't save this
int m_iSpriteTexture;
int m_iExplode;
int m_iBodyGibs;
float m_flGoalSpeed;
int m_iDoSmokePuff;
CBeam *m_pBeam;
};
#endif // APACHE_H

49
dlls/barney.cpp

@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
#include "scripted.h"
#include "weapons.h"
#include "soundent.h"
#include "barney.h"
//=========================================================
// Monster's Anim Events Go Here
@ -40,54 +41,6 @@ @@ -40,54 +41,6 @@
#define BARNEY_BODY_GUNDRAWN 1
#define BARNEY_BODY_GUNGONE 2
class CBarney : public CTalkMonster
{
public:
void Spawn( void );
void Precache( void );
void SetYawSpeed( void );
int ISoundMask( void );
void BarneyFirePistol( void );
void AlertSound( void );
int Classify( void );
void HandleAnimEvent( MonsterEvent_t *pEvent );
void RunTask( Task_t *pTask );
void StartTask( Task_t *pTask );
virtual int ObjectCaps( void ) { return CTalkMonster :: ObjectCaps() | FCAP_IMPULSE_USE; }
int TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType);
BOOL CheckRangeAttack1( float flDot, float flDist );
void DeclineFollowing( void );
// Override these to set behavior
Schedule_t *GetScheduleOfType( int Type );
Schedule_t *GetSchedule( void );
MONSTERSTATE GetIdealState( void );
void DeathSound( void );
void PainSound( void );
void TalkInit( void );
void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
void Killed( entvars_t *pevAttacker, int iGib );
virtual int Save( CSave &save );
virtual int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
BOOL m_fGunDrawn;
float m_painTime;
float m_checkAttackTime;
BOOL m_lastAttackCheck;
// UNDONE: What is this for? It isn't used?
float m_flPlayerDamage;// how much pain has the player inflicted on me?
CUSTOM_SCHEDULES
};
LINK_ENTITY_TO_CLASS( monster_barney, CBarney )
TYPEDESCRIPTION CBarney::m_SaveData[] =

71
dlls/barney.h

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve LLC and its suppliers. Access to this code is restricted to
* persons who have executed a written SDK license with Valve. Any access,
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
//=========================================================
// monster template
//=========================================================
#ifndef BARNEY_H
#define BARNEY_H
//=========================================================
// CBarney
//=========================================================
class CBarney : public CTalkMonster
{
public:
virtual void Spawn(void);
virtual void Precache(void);
void SetYawSpeed(void);
int ISoundMask(void);
virtual void BarneyFirePistol(void);
virtual void AlertSound(void);
int Classify(void);
virtual void HandleAnimEvent(MonsterEvent_t *pEvent);
void RunTask(Task_t *pTask);
void StartTask(Task_t *pTask);
virtual int ObjectCaps(void) { return CTalkMonster::ObjectCaps() | FCAP_IMPULSE_USE; }
virtual int TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType);
BOOL CheckRangeAttack1(float flDot, float flDist);
virtual void DeclineFollowing(void);
// Override these to set behavior
Schedule_t *GetScheduleOfType(int Type);
virtual Schedule_t *GetSchedule(void);
MONSTERSTATE GetIdealState(void);
virtual void DeathSound(void);
virtual void PainSound(void);
virtual void TalkInit(void);
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
virtual void Killed(entvars_t *pevAttacker, int iGib);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
static TYPEDESCRIPTION m_SaveData[];
BOOL m_fGunDrawn;
float m_painTime;
float m_checkAttackTime;
BOOL m_lastAttackCheck;
// UNDONE: What is this for? It isn't used?
float m_flPlayerDamage;// how much pain has the player inflicted on me?
CUSTOM_SCHEDULES;
};
#endif // BARNEY_H

56
dlls/bullsquid.cpp

@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
#include "decals.h"
#include "soundent.h"
#include "game.h"
#include "bullsquid.h"
#define SQUID_SPRINT_DIST 256 // how close the squid has to get before starting to sprint and refusing to swerve
@ -55,21 +56,6 @@ enum @@ -55,21 +56,6 @@ enum
//=========================================================
// Bullsquid's spit projectile
//=========================================================
class CSquidSpit : public CBaseEntity
{
public:
void Spawn( void );
static void Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity );
void Touch( CBaseEntity *pOther );
void EXPORT Animate( void );
virtual int Save( CSave &save );
virtual int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
int m_maxFrame;
};
LINK_ENTITY_TO_CLASS( squidspit, CSquidSpit )
@ -184,46 +170,6 @@ void CSquidSpit::Touch( CBaseEntity *pOther ) @@ -184,46 +170,6 @@ void CSquidSpit::Touch( CBaseEntity *pOther )
#define BSQUID_AE_HOP ( 5 )
#define BSQUID_AE_THROW ( 6 )
class CBullsquid : public CBaseMonster
{
public:
void Spawn( void );
void Precache( void );
void SetYawSpeed( void );
int ISoundMask( void );
int Classify( void );
void HandleAnimEvent( MonsterEvent_t *pEvent );
void IdleSound( void );
void PainSound( void );
void DeathSound( void );
void AlertSound( void );
void AttackSound( void );
void StartTask( Task_t *pTask );
void RunTask( Task_t *pTask );
BOOL CheckMeleeAttack1( float flDot, float flDist );
BOOL CheckMeleeAttack2( float flDot, float flDist );
BOOL CheckRangeAttack1( float flDot, float flDist );
void RunAI( void );
BOOL FValidateHintType( short sHint );
Schedule_t *GetSchedule( void );
Schedule_t *GetScheduleOfType( int Type );
int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );
int IRelationship( CBaseEntity *pTarget );
int IgnoreConditions( void );
MONSTERSTATE GetIdealState( void );
int Save( CSave &save );
int Restore( CRestore &restore );
CUSTOM_SCHEDULES
static TYPEDESCRIPTION m_SaveData[];
BOOL m_fCanThreatDisplay;// this is so the squid only does the "I see a headcrab!" dance one time.
float m_flLastHurtTime;// we keep track of this, because if something hurts a squid, it will forget about its love of headcrabs for a while.
float m_flNextSpitTime;// last time the bullsquid used the spit attack.
};
LINK_ENTITY_TO_CLASS( monster_bullchicken, CBullsquid )
TYPEDESCRIPTION CBullsquid::m_SaveData[] =

83
dlls/bullsquid.h

@ -0,0 +1,83 @@ @@ -0,0 +1,83 @@
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve LLC and its suppliers. Access to this code is restricted to
* persons who have executed a written SDK license with Valve. Any access,
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
//=========================================================
// bullsquid - big, spotty tentacle-mouthed meanie.
//=========================================================
#ifndef BULLSQUID_H
#define BULLSQUID_H
//=========================================================
// Bullsquid's spit projectile
//=========================================================
class CSquidSpit : public CBaseEntity
{
public:
void Spawn(void);
static void Shoot(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity);
void Touch(CBaseEntity *pOther);
void EXPORT Animate(void);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
static TYPEDESCRIPTION m_SaveData[];
int m_maxFrame;
};
//=========================================================
// CBullsquid
//=========================================================
class CBullsquid : public CBaseMonster
{
public:
virtual void Spawn(void);
virtual void Precache(void);
void SetYawSpeed(void);
int ISoundMask(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);
virtual void AttackSound(void);
virtual void StartTask(Task_t *pTask);
void RunTask(Task_t *pTask);
virtual BOOL CheckMeleeAttack1(float flDot, float flDist);
virtual BOOL CheckMeleeAttack2(float flDot, float flDist);
virtual BOOL CheckRangeAttack1(float flDot, float flDist);
virtual void RunAI(void);
BOOL FValidateHintType(short sHint);
Schedule_t *GetSchedule(void);
Schedule_t *GetScheduleOfType(int Type);
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
virtual int IRelationship(CBaseEntity *pTarget);
virtual int IgnoreConditions(void);
MONSTERSTATE GetIdealState(void);
int Save(CSave &save);
int Restore(CRestore &restore);
CUSTOM_SCHEDULES;
static TYPEDESCRIPTION m_SaveData[];
BOOL m_fCanThreatDisplay;// this is so the squid only does the "I see a headcrab!" dance one time.
float m_flLastHurtTime;// we keep track of this, because if something hurts a squid, it will forget about its love of headcrabs for a while.
float m_flNextSpitTime;// last time the bullsquid used the spit attack.
};
#endif // BULLSQUID_H

1
dlls/cbase.h

@ -103,6 +103,7 @@ typedef void(CBaseEntity::*USEPTR)( CBaseEntity *pActivator, CBaseEntity *pCalle @@ -103,6 +103,7 @@ typedef void(CBaseEntity::*USEPTR)( CBaseEntity *pActivator, CBaseEntity *pCalle
#define CLASS_PLAYER_ALLY 11
#define CLASS_PLAYER_BIOWEAPON 12 // hornets and snarks.launched by players
#define CLASS_ALIEN_BIOWEAPON 13 // hornets and snarks.launched by the alien menace
#define CLASS_RACEX_PREDATOR 14
#define CLASS_BARNACLE 99 // special because no one pays attention to it, and it eats a wide cross-section of creatures.
class CBaseEntity;

28
dlls/combat.cpp

@ -179,6 +179,18 @@ void CGib::SpawnHeadGib( entvars_t *pevVictim ) @@ -179,6 +179,18 @@ void CGib::SpawnHeadGib( entvars_t *pevVictim )
}
void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human )
{
if( human )
{
SpawnRandomGibs( pevVictim, cGibs, "models/hgibs.mdl", HUMAN_GIB_COUNT, 1 ); // start at one to avoid throwing random amounts of skulls (0th gib)
}
else
{
SpawnRandomGibs( pevVictim, cGibs, "models/agibs.mdl", ALIEN_GIB_COUNT );
}
}
void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, const char* gibModel, int gibBodiesNum, int startGibNum )
{
int cSplat;
@ -189,22 +201,12 @@ void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human ) @@ -189,22 +201,12 @@ void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human )
if( g_Language == LANGUAGE_GERMAN )
{
pGib->Spawn( "models/germangibs.mdl" );
pGib->pev->body = RANDOM_LONG( 0, GERMAN_GIB_COUNT - 1 );
pGib->pev->body = RANDOM_LONG( startGibNum, GERMAN_GIB_COUNT - 1 );
}
else
{
if( human )
{
// human pieces
pGib->Spawn( "models/hgibs.mdl" );
pGib->pev->body = RANDOM_LONG( 1, HUMAN_GIB_COUNT - 1 );// start at one to avoid throwing random amounts of skulls (0th gib)
}
else
{
// aliens
pGib->Spawn( "models/agibs.mdl" );
pGib->pev->body = RANDOM_LONG( 0, ALIEN_GIB_COUNT - 1 );
}
pGib->Spawn( gibModel );
pGib->pev->body = RANDOM_LONG( startGibNum, gibBodiesNum - 1 );
}
if( pevVictim )

157
dlls/game.cpp

@ -66,6 +66,23 @@ cvar_t sk_apache_health1 = {"sk_apache_health1","0"}; @@ -66,6 +66,23 @@ cvar_t sk_apache_health1 = {"sk_apache_health1","0"};
cvar_t sk_apache_health2 = {"sk_apache_health2","0"};
cvar_t sk_apache_health3 = {"sk_apache_health3","0"};
// Alien worker
cvar_t sk_aworker_health1 = {"sk_aworker_health1","0"};
cvar_t sk_aworker_health2 = {"sk_aworker_health2","0"};
cvar_t sk_aworker_health3 = {"sk_aworker_health3","0"};
cvar_t sk_aworker_dmg_claw1 = {"sk_aworker_dmg_claw1","0"};
cvar_t sk_aworker_dmg_claw2 = {"sk_aworker_dmg_claw2","0"};
cvar_t sk_aworker_dmg_claw3 = {"sk_aworker_dmg_claw3","0"};
cvar_t sk_aworker_dmg_clawrake1 = {"sk_aworker_dmg_clawrake1","0"};
cvar_t sk_aworker_dmg_clawrake2 = {"sk_aworker_dmg_clawrake2","0"};
cvar_t sk_aworker_dmg_clawrake3 = {"sk_aworker_dmg_clawrake3","0"};
cvar_t sk_aworker_dmg_zap1 = {"sk_aworker_dmg_zap1","0"};
cvar_t sk_aworker_dmg_zap2 = {"sk_aworker_dmg_zap2","0"};
cvar_t sk_aworker_dmg_zap3 = {"sk_aworker_dmg_zap3","0"};
// Barney
cvar_t sk_barney_health1 = {"sk_barney_health1","0"};
cvar_t sk_barney_health2 = {"sk_barney_health2","0"};
@ -123,6 +140,18 @@ cvar_t sk_gargantua_dmg_stomp1 = {"sk_gargantua_dmg_stomp1","0"}; @@ -123,6 +140,18 @@ cvar_t sk_gargantua_dmg_stomp1 = {"sk_gargantua_dmg_stomp1","0"};
cvar_t sk_gargantua_dmg_stomp2 = {"sk_gargantua_dmg_stomp2","0"};
cvar_t sk_gargantua_dmg_stomp3 = {"sk_gargantua_dmg_stomp3","0"};
// Gonome
cvar_t sk_gonome_health1 = {"sk_gonome_health1","0"};
cvar_t sk_gonome_health2 = {"sk_gonome_health2","0"};
cvar_t sk_gonome_health3 = {"sk_gonome_health3","0"};
cvar_t sk_gonome_dmg_bite1 = {"sk_gonome_dmg_bite1","0"};
cvar_t sk_gonome_dmg_bite2 = {"sk_gonome_dmg_bite2","0"};
cvar_t sk_gonome_dmg_bite3 = {"sk_gonome_dmg_bite3","0"};
cvar_t sk_gonome_dmg_whip1 = {"sk_gonome_dmg_whip1","0"};
cvar_t sk_gonome_dmg_whip2 = {"sk_gonome_dmg_whip2","0"};
cvar_t sk_gonome_dmg_whip3 = {"sk_gonome_dmg_whip3","0"};
// Hassassin
cvar_t sk_hassassin_health1 = {"sk_hassassin_health1","0"};
@ -204,6 +233,15 @@ cvar_t sk_leech_dmg_bite1 = {"sk_leech_dmg_bite1","0"}; @@ -204,6 +233,15 @@ cvar_t sk_leech_dmg_bite1 = {"sk_leech_dmg_bite1","0"};
cvar_t sk_leech_dmg_bite2 = {"sk_leech_dmg_bite2","0"};
cvar_t sk_leech_dmg_bite3 = {"sk_leech_dmg_bite3","0"};
// Male assassin
cvar_t sk_massassin_health1 = {"sk_massassin_health1","0"};
cvar_t sk_massassin_health2 = {"sk_massassin_health2","0"};
cvar_t sk_massassin_health3 = {"sk_massassin_health3","0"};
cvar_t sk_massassin_kick1 = {"sk_massassin_kick1","0"};
cvar_t sk_massassin_kick2 = {"sk_massassin_kick2","0"};
cvar_t sk_massassin_kick3 = {"sk_massassin_kick3","0"};
// Controller
cvar_t sk_controller_health1 = {"sk_controller_health1","0"};
cvar_t sk_controller_health2 = {"sk_controller_health2","0"};
@ -230,6 +268,28 @@ cvar_t sk_nihilanth_zap1 = {"sk_nihilanth_zap1","0"}; @@ -230,6 +268,28 @@ cvar_t sk_nihilanth_zap1 = {"sk_nihilanth_zap1","0"};
cvar_t sk_nihilanth_zap2 = {"sk_nihilanth_zap2","0"};
cvar_t sk_nihilanth_zap3 = {"sk_nihilanth_zap3","0"};
// Otis
cvar_t sk_otis_health1 = {"sk_otis_health1","0"};
cvar_t sk_otis_health2 = {"sk_otis_health2","0"};
cvar_t sk_otis_health3 = {"sk_otis_health3","0"};
// Pitdrone
cvar_t sk_pitdrone_health1 = {"sk_pitdrone_health1","0"};
cvar_t sk_pitdrone_health2 = {"sk_pitdrone_health2","0"};
cvar_t sk_pitdrone_health3 = {"sk_pitdrone_health3","0"};
cvar_t sk_pitdrone_dmg_bite1 = {"sk_pitdrone_dmg_bite1","0"};
cvar_t sk_pitdrone_dmg_bite2 = {"sk_pitdrone_dmg_bite2","0"};
cvar_t sk_pitdrone_dmg_bite3 = {"sk_pitdrone_dmg_bite3","0"};
cvar_t sk_pitdrone_dmg_whip1 = {"sk_pitdrone_dmg_whip1","0"};
cvar_t sk_pitdrone_dmg_whip2 = {"sk_pitdrone_dmg_whip2","0"};
cvar_t sk_pitdrone_dmg_whip3 = {"sk_pitdrone_dmg_whip3","0"};
cvar_t sk_pitdrone_dmg_spit1 = {"sk_pitdrone_dmg_spit1","0"};
cvar_t sk_pitdrone_dmg_spit2 = {"sk_pitdrone_dmg_spit2","0"};
cvar_t sk_pitdrone_dmg_spit3 = {"sk_pitdrone_dmg_spit3","0"};
// Scientist
cvar_t sk_scientist_health1 = {"sk_scientist_health1","0"};
cvar_t sk_scientist_health2 = {"sk_scientist_health2","0"};
@ -248,6 +308,19 @@ cvar_t sk_snark_dmg_pop1 = {"sk_snark_dmg_pop1","0"}; @@ -248,6 +308,19 @@ cvar_t sk_snark_dmg_pop1 = {"sk_snark_dmg_pop1","0"};
cvar_t sk_snark_dmg_pop2 = {"sk_snark_dmg_pop2","0"};
cvar_t sk_snark_dmg_pop3 = {"sk_snark_dmg_pop3","0"};
// Zombie Grunt
cvar_t sk_zgrunt_health1 = {"sk_zgrunt_health1","0"};
cvar_t sk_zgrunt_health2 = {"sk_zgrunt_health2","0"};
cvar_t sk_zgrunt_health3 = {"sk_zgrunt_health3","0"};
cvar_t sk_zgrunt_kick1 = {"sk_zgrunt_kick1","0"};
cvar_t sk_zgrunt_kick2 = {"sk_zgrunt_kick2","0"};
cvar_t sk_zgrunt_kick3 = {"sk_zgrunt_kick3","0"};
cvar_t sk_zgrunt_pellets1 = {"sk_zgrunt_pellets1","0"};
cvar_t sk_zgrunt_pellets2 = {"sk_zgrunt_pellets2","0"};
cvar_t sk_zgrunt_pellets3 = {"sk_zgrunt_pellets3","0"};
// Zombie
cvar_t sk_zombie_health1 = {"sk_zombie_health1","0"};
cvar_t sk_zombie_health2 = {"sk_zombie_health2","0"};
@ -261,6 +334,11 @@ cvar_t sk_zombie_dmg_both_slash1 = {"sk_zombie_dmg_both_slash1","0"}; @@ -261,6 +334,11 @@ cvar_t sk_zombie_dmg_both_slash1 = {"sk_zombie_dmg_both_slash1","0"};
cvar_t sk_zombie_dmg_both_slash2 = {"sk_zombie_dmg_both_slash2","0"};
cvar_t sk_zombie_dmg_both_slash3 = {"sk_zombie_dmg_both_slash3","0"};
// Zombie Soldier
cvar_t sk_zombie_soldier_health1 = {"sk_zombie_soldier_health1","0"};
cvar_t sk_zombie_soldier_health2 = {"sk_zombie_soldier_health2","0"};
cvar_t sk_zombie_soldier_health3 = {"sk_zombie_soldier_health3","0"};
//Turret
cvar_t sk_turret_health1 = {"sk_turret_health1","0"};
cvar_t sk_turret_health2 = {"sk_turret_health2","0"};
@ -498,6 +576,23 @@ void GameDLLInit( void ) @@ -498,6 +576,23 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_apache_health2 );// {"sk_apache_health2","0"};
CVAR_REGISTER( &sk_apache_health3 );// {"sk_apache_health3","0"};
// Alien worker
CVAR_REGISTER( &sk_aworker_health1 );// {"sk_aworker_health1","0"};
CVAR_REGISTER( &sk_aworker_health2 );// {"sk_aworker_health2","0"};
CVAR_REGISTER( &sk_aworker_health3 );// {"sk_aworker_health3","0"};
CVAR_REGISTER( &sk_aworker_dmg_claw1 );// {"sk_aworker_dmg_claw1","0"};
CVAR_REGISTER( &sk_aworker_dmg_claw2 );// {"sk_aworker_dmg_claw2","0"};
CVAR_REGISTER( &sk_aworker_dmg_claw3 );// {"sk_aworker_dmg_claw3","0"};
CVAR_REGISTER( &sk_aworker_dmg_clawrake1 );// {"sk_aworker_dmg_clawrake1","0"};
CVAR_REGISTER( &sk_aworker_dmg_clawrake2 );// {"sk_aworker_dmg_clawrake2","0"};
CVAR_REGISTER( &sk_aworker_dmg_clawrake3 );// {"sk_aworker_dmg_clawrake3","0"};
CVAR_REGISTER( &sk_aworker_dmg_zap1 );// {"sk_aworker_dmg_zap1","0"};
CVAR_REGISTER( &sk_aworker_dmg_zap2 );// {"sk_aworker_dmg_zap2","0"};
CVAR_REGISTER( &sk_aworker_dmg_zap3 );// {"sk_aworker_dmg_zap3","0"};
// Barney
CVAR_REGISTER( &sk_barney_health1 );// {"sk_barney_health1","0"};
CVAR_REGISTER( &sk_barney_health2 );// {"sk_barney_health2","0"};
@ -553,6 +648,19 @@ void GameDLLInit( void ) @@ -553,6 +648,19 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_gargantua_dmg_stomp2 );// {"sk_gargantua_dmg_stomp2","0"};
CVAR_REGISTER( &sk_gargantua_dmg_stomp3 );// {"sk_gargantua_dmg_stomp3","0"};
// Gonome
CVAR_REGISTER( &sk_gonome_health1 );// {"sk_gonome_health1","0"};
CVAR_REGISTER( &sk_gonome_health2 );// {"sk_gonome_health2","0"};
CVAR_REGISTER( &sk_gonome_health3 );// {"sk_gonome_health3","0"};
CVAR_REGISTER( &sk_gonome_dmg_bite1 );// {"sk_gonome_dmg_bite1","0"};
CVAR_REGISTER( &sk_gonome_dmg_bite2 );// {"sk_gonome_dmg_bite2","0"};
CVAR_REGISTER( &sk_gonome_dmg_bite3 );// {"sk_gonome_dmg_bite3","0"};
CVAR_REGISTER( &sk_gonome_dmg_whip1 );// {"sk_gonome_dmg_whip1","0"};
CVAR_REGISTER( &sk_gonome_dmg_whip2 );// {"sk_gonome_dmg_whip2","0"};
CVAR_REGISTER( &sk_gonome_dmg_whip3 );// {"sk_gonome_dmg_whip3","0"};
// Hassassin
CVAR_REGISTER( &sk_hassassin_health1 );// {"sk_hassassin_health1","0"};
CVAR_REGISTER( &sk_hassassin_health2 );// {"sk_hassassin_health2","0"};
@ -628,6 +736,15 @@ void GameDLLInit( void ) @@ -628,6 +736,15 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_leech_dmg_bite2 );// {"sk_leech_dmg_bite2","0"};
CVAR_REGISTER( &sk_leech_dmg_bite3 );// {"sk_leech_dmg_bite3","0"};
// Male assassin
CVAR_REGISTER( &sk_massassin_health1 );// {"sk_massassin_health1","0"};
CVAR_REGISTER( &sk_massassin_health2 );// {"sk_massassin_health2","0"};
CVAR_REGISTER( &sk_massassin_health3 );// {"sk_massassin_health3","0"};
CVAR_REGISTER( &sk_massassin_kick1 );// {"sk_massassin_kick1","0"};
CVAR_REGISTER( &sk_massassin_kick2 );// {"sk_massassin_kick2","0"};
CVAR_REGISTER( &sk_massassin_kick3 );// {"sk_massassin_kick3","0"};
// Controller
CVAR_REGISTER( &sk_controller_health1 );
CVAR_REGISTER( &sk_controller_health2 );
@ -654,6 +771,28 @@ void GameDLLInit( void ) @@ -654,6 +771,28 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_nihilanth_zap2 );
CVAR_REGISTER( &sk_nihilanth_zap3 );
// Otis
CVAR_REGISTER( &sk_otis_health1 );// {"sk_otis_health1","0"};
CVAR_REGISTER( &sk_otis_health2 );// {"sk_otis_health2","0"};
CVAR_REGISTER( &sk_otis_health3 );// {"sk_otis_health3","0"};
// Pitdrone
CVAR_REGISTER( &sk_pitdrone_health1 );// {"sk_pitdrone_health1","0"};
CVAR_REGISTER( &sk_pitdrone_health2 );// {"sk_pitdrone_health2","0"};
CVAR_REGISTER( &sk_pitdrone_health3 );// {"sk_pitdrone_health3","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_bite1 );// {"sk_pitdrone_dmg_bite1","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_bite2 );// {"sk_pitdrone_dmg_bite2","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_bite3 );// {"sk_pitdrone_dmg_bite3","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_whip1 );// {"sk_pitdrone_dmg_whip1","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_whip2 );// {"sk_pitdrone_dmg_whip2","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_whip3 );// {"sk_pitdrone_dmg_whip3","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_spit1 );// {"sk_pitdrone_dmg_spit1","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_spit2 );// {"sk_pitdrone_dmg_spit2","0"};
CVAR_REGISTER( &sk_pitdrone_dmg_spit3 );// {"sk_pitdrone_dmg_spit3","0"};
// Scientist
CVAR_REGISTER( &sk_scientist_health1 );// {"sk_scientist_health1","0"};
CVAR_REGISTER( &sk_scientist_health2 );// {"sk_scientist_health2","0"};
@ -672,6 +811,19 @@ void GameDLLInit( void ) @@ -672,6 +811,19 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_snark_dmg_pop2 );// {"sk_snark_dmg_pop2","0"};
CVAR_REGISTER( &sk_snark_dmg_pop3 );// {"sk_snark_dmg_pop3","0"};
// Zombie Grunt
CVAR_REGISTER( &sk_zgrunt_health1 );// {"sk_zgrunt_health1","0"};
CVAR_REGISTER( &sk_zgrunt_health2 );// {"sk_zgrunt_health2","0"};
CVAR_REGISTER( &sk_zgrunt_health3 );// {"sk_zgrunt_health3","0"};
CVAR_REGISTER( &sk_zgrunt_kick1 );// {"sk_zgrunt_kick1","0"};
CVAR_REGISTER( &sk_zgrunt_kick2 );// {"sk_zgrunt_kick2","0"};
CVAR_REGISTER( &sk_zgrunt_kick3 );// {"sk_zgrunt_kick3","0"};
CVAR_REGISTER( &sk_zgrunt_pellets1 );// {"sk_zgrunt_pellets1","0"};
CVAR_REGISTER( &sk_zgrunt_pellets2 );// {"sk_zgrunt_pellets2","0"};
CVAR_REGISTER( &sk_zgrunt_pellets3 );// {"sk_zgrunt_pellets3","0"};
// Zombie
CVAR_REGISTER( &sk_zombie_health1 );// {"sk_zombie_health1","0"};
CVAR_REGISTER( &sk_zombie_health2 );// {"sk_zombie_health3","0"};
@ -685,6 +837,11 @@ void GameDLLInit( void ) @@ -685,6 +837,11 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_zombie_dmg_both_slash2 );// {"sk_zombie_dmg_both_slash2","0"};
CVAR_REGISTER( &sk_zombie_dmg_both_slash3 );// {"sk_zombie_dmg_both_slash3","0"};
// Zombie Soldier
CVAR_REGISTER( &sk_zombie_soldier_health1 );// {"sk_zombie_soldier_health1","0"};
CVAR_REGISTER( &sk_zombie_soldier_health2 );// {"sk_zombie_soldier_health2","0"};
CVAR_REGISTER( &sk_zombie_soldier_health3 );// {"sk_zombie_soldier_health3","0"};
//Turret
CVAR_REGISTER( &sk_turret_health1 );// {"sk_turret_health1","0"};
CVAR_REGISTER( &sk_turret_health2 );// {"sk_turret_health2","0"};

32
dlls/gamerules.cpp

@ -137,6 +137,12 @@ void CGameRules::RefreshSkillData ( void ) @@ -137,6 +137,12 @@ void CGameRules::RefreshSkillData ( void )
// Apache
gSkillData.apacheHealth = GetSkillCvar( "sk_apache_health" );
// Alien Worker
gSkillData.aworkerHealth = GetSkillCvar( "sk_aworker_health" );
gSkillData.aworkerDmgClaw = GetSkillCvar( "sk_aworker_dmg_claw" );
gSkillData.aworkerDmgClawrake = GetSkillCvar( "sk_aworker_dmg_clawrake" );
gSkillData.aworkerDmgZap = GetSkillCvar( "sk_aworker_dmg_zap" );
// Barney
gSkillData.barneyHealth = GetSkillCvar( "sk_barney_health" );
@ -158,6 +164,11 @@ void CGameRules::RefreshSkillData ( void ) @@ -158,6 +164,11 @@ void CGameRules::RefreshSkillData ( void )
gSkillData.gargantuaDmgFire = GetSkillCvar( "sk_gargantua_dmg_fire" );
gSkillData.gargantuaDmgStomp = GetSkillCvar( "sk_gargantua_dmg_stomp" );
// Gonome
gSkillData.gonomeHealth = GetSkillCvar( "sk_gonome_health" );
gSkillData.gonomeDmgOneBite = GetSkillCvar( "sk_gonome_dmg_bite" );
gSkillData.gonomeDmgOneSlash = GetSkillCvar( "sk_gonome_dmg_whip" );
// Hassassin
gSkillData.hassassinHealth = GetSkillCvar( "sk_hassassin_health" );
@ -190,6 +201,10 @@ void CGameRules::RefreshSkillData ( void ) @@ -190,6 +201,10 @@ void CGameRules::RefreshSkillData ( void )
gSkillData.leechDmgBite = GetSkillCvar( "sk_leech_dmg_bite" );
// Male assassin
gSkillData.massnHealth = GetSkillCvar( "sk_massassin_health" );
gSkillData.massnDmgKick = GetSkillCvar( "sk_massassin_kick" );
// Controller
gSkillData.controllerHealth = GetSkillCvar( "sk_controller_health" );
gSkillData.controllerDmgZap = GetSkillCvar( "sk_controller_dmgzap" );
@ -200,6 +215,15 @@ void CGameRules::RefreshSkillData ( void ) @@ -200,6 +215,15 @@ void CGameRules::RefreshSkillData ( void )
gSkillData.nihilanthHealth = GetSkillCvar( "sk_nihilanth_health" );
gSkillData.nihilanthZap = GetSkillCvar( "sk_nihilanth_zap" );
// Otis
gSkillData.otisHealth = GetSkillCvar( "sk_otis_health" );
// Pitdrone
gSkillData.pitdroneHealth = GetSkillCvar( "sk_pitdrone_health" );
gSkillData.pitdroneDmgBite = GetSkillCvar( "sk_pitdrone_dmg_bite" );
gSkillData.pitdroneDmgWhip = GetSkillCvar( "sk_pitdrone_dmg_whip" );
gSkillData.pitdroneDmgSpit = GetSkillCvar( "sk_pitdrone_dmg_spit" );
// Scientist
gSkillData.scientistHealth = GetSkillCvar( "sk_scientist_health" );
@ -208,11 +232,19 @@ void CGameRules::RefreshSkillData ( void ) @@ -208,11 +232,19 @@ void CGameRules::RefreshSkillData ( void )
gSkillData.snarkDmgBite = GetSkillCvar( "sk_snark_dmg_bite" );
gSkillData.snarkDmgPop = GetSkillCvar( "sk_snark_dmg_pop" );
// Zombie grunt
gSkillData.zgruntHealth = GetSkillCvar( "sk_zgrunt_health" );
gSkillData.zgruntDmgKick = GetSkillCvar( "sk_zgrunt_kick" );
gSkillData.zgruntShotgunPellets = GetSkillCvar( "sk_zgrunt_pellets" );
// Zombie
gSkillData.zombieHealth = GetSkillCvar( "sk_zombie_health" );
gSkillData.zombieDmgOneSlash = GetSkillCvar( "sk_zombie_dmg_one_slash" );
gSkillData.zombieDmgBothSlash = GetSkillCvar( "sk_zombie_dmg_both_slash" );
// Zombie soldier
gSkillData.zsoldierHealth = GetSkillCvar( "sk_zombie_soldier_health" );
//Turret
gSkillData.turretHealth = GetSkillCvar( "sk_turret_health" );

78
dlls/hgrunt.cpp

@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include "soundent.h"
#include "effects.h"
#include "customentity.h"
#include "hgrunt.h"
int g_fGruntQuestion; // true if an idle grunt asked a question. Cleared when someone answers.
@ -119,73 +120,6 @@ enum @@ -119,73 +120,6 @@ enum
//=========================================================
#define bits_COND_GRUNT_NOFIRE ( bits_COND_SPECIAL1 )
class CHGrunt : public CSquadMonster
{
public:
void Spawn( void );
void Precache( void );
void SetYawSpeed( void );
int Classify( void );
int ISoundMask( void );
void HandleAnimEvent( MonsterEvent_t *pEvent );
BOOL FCanCheckAttacks( void );
BOOL CheckMeleeAttack1( float flDot, float flDist );
BOOL CheckRangeAttack1( float flDot, float flDist );
BOOL CheckRangeAttack2( float flDot, float flDist );
void CheckAmmo( void );
void SetActivity( Activity NewActivity );
void StartTask( Task_t *pTask );
void RunTask( Task_t *pTask );
void DeathSound( void );
void PainSound( void );
void IdleSound( void );
Vector GetGunPosition( void );
void Shoot( void );
void Shotgun( void );
void PrescheduleThink( void );
void GibMonster( void );
void SpeakSentence( void );
int Save( CSave &save );
int Restore( CRestore &restore );
CBaseEntity *Kick( void );
Schedule_t *GetSchedule( void );
Schedule_t *GetScheduleOfType( int Type );
void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );
int IRelationship( CBaseEntity *pTarget );
BOOL FOkToSpeak( void );
void JustSpoke( void );
CUSTOM_SCHEDULES
static TYPEDESCRIPTION m_SaveData[];
// checking the feasibility of a grenade toss is kind of costly, so we do it every couple of seconds,
// not every server frame.
float m_flNextGrenadeCheck;
float m_flNextPainTime;
float m_flLastEnemySightTime;
Vector m_vecTossVelocity;
BOOL m_fThrowGrenade;
BOOL m_fStanding;
BOOL m_fFirstEncounter;// only put on the handsign show in the squad's first encounter.
int m_cClipSize;
int m_voicePitch;
int m_iBrassShell;
int m_iShotgunShell;
int m_iSentence;
static const char *pGruntSentences[];
};
LINK_ENTITY_TO_CLASS( monster_human_grunt, CHGrunt )
TYPEDESCRIPTION CHGrunt::m_SaveData[] =
@ -2343,16 +2277,6 @@ Schedule_t *CHGrunt::GetScheduleOfType( int Type ) @@ -2343,16 +2277,6 @@ Schedule_t *CHGrunt::GetScheduleOfType( int Type )
// CHGruntRepel - when triggered, spawns a monster_human_grunt
// repelling down a line.
//=========================================================
class CHGruntRepel : public CBaseMonster
{
public:
void Spawn( void );
void Precache( void );
void EXPORT RepelUse ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
int m_iSpriteTexture; // Don't save, precache
};
LINK_ENTITY_TO_CLASS( monster_grunt_repel, CHGruntRepel )
void CHGruntRepel::Spawn( void )

103
dlls/hgrunt.h

@ -0,0 +1,103 @@ @@ -0,0 +1,103 @@
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve LLC and its suppliers. Access to this code is restricted to
* persons who have executed a written SDK license with Valve. Any access,
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef HGRUNT_H
#define HGRUNT_H
//=========================================================
// hgrunt
//=========================================================
class CHGrunt : public CSquadMonster
{
public:
virtual void Spawn(void);
virtual void Precache(void);
void SetYawSpeed(void);
virtual int Classify(void);
int ISoundMask(void);
virtual void HandleAnimEvent(MonsterEvent_t *pEvent);
BOOL FCanCheckAttacks(void);
BOOL CheckMeleeAttack1(float flDot, float flDist);
BOOL CheckRangeAttack1(float flDot, float flDist);
BOOL CheckRangeAttack2(float flDot, float flDist);
void CheckAmmo(void);
void SetActivity(Activity NewActivity);
void StartTask(Task_t *pTask);
void RunTask(Task_t *pTask);
virtual void DeathSound(void);
virtual void PainSound(void);
virtual void IdleSound(void);
Vector GetGunPosition(void);
void Shoot(void);
void Shotgun(void);
void PrescheduleThink(void);
virtual void GibMonster(void);
virtual void SpeakSentence(void);
int Save(CSave &save);
int Restore(CRestore &restore);
CBaseEntity *Kick(void);
Schedule_t *GetSchedule(void);
Schedule_t *GetScheduleOfType(int Type);
void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
int IRelationship(CBaseEntity *pTarget);
virtual BOOL FOkToSpeak(void);
void JustSpoke(void);
CUSTOM_SCHEDULES;
static TYPEDESCRIPTION m_SaveData[];
// checking the feasibility of a grenade toss is kind of costly, so we do it every couple of seconds,
// not every server frame.
float m_flNextGrenadeCheck;
float m_flNextPainTime;
float m_flLastEnemySightTime;
Vector m_vecTossVelocity;
BOOL m_fThrowGrenade;
BOOL m_fStanding;
BOOL m_fFirstEncounter;// only put on the handsign show in the squad's first encounter.
int m_cClipSize;
int m_voicePitch;
int m_iBrassShell;
int m_iShotgunShell;
int m_iSentence;
static const char *pGruntSentences[];
};
//=========================================================
// CHGruntRepel - when triggered, spawns a monster_human_grunt
// repelling down a line.
//=========================================================
class CHGruntRepel : public CBaseMonster
{
public:
virtual void Spawn(void);
virtual void Precache(void);
virtual void EXPORT RepelUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
int m_iSpriteTexture; // Don't save, precache
};
#endif // HGRUNT_H

33
dlls/monsters.cpp

@ -2162,22 +2162,23 @@ int CBaseMonster::TaskIsRunning( void ) @@ -2162,22 +2162,23 @@ int CBaseMonster::TaskIsRunning( void )
//=========================================================
int CBaseMonster::IRelationship( CBaseEntity *pTarget )
{
static int iEnemy[14][14] =
{ // NONE MACH PLYR HPASS HMIL AMIL APASS AMONST APREY APRED INSECT PLRALY PBWPN ABWPN
/*NONE*/ { R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO, R_NO, R_NO },
/*MACHINE*/ { R_NO ,R_NO ,R_DL ,R_DL ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_DL, R_DL, R_DL },
/*PLAYER*/ { R_NO ,R_DL ,R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO, R_DL, R_DL },
/*HUMANPASSIVE*/{ R_NO ,R_NO ,R_AL ,R_AL ,R_HT ,R_FR ,R_NO ,R_HT ,R_DL ,R_FR ,R_NO ,R_AL, R_NO, R_NO },
/*HUMANMILITAR*/{ R_NO ,R_NO ,R_HT ,R_DL ,R_NO ,R_HT ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_HT, R_NO, R_NO },
/*ALIENMILITAR*/{ R_NO ,R_DL ,R_HT ,R_DL ,R_HT ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_DL, R_NO, R_NO },
/*ALIENPASSIVE*/{ R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO, R_NO, R_NO },
/*ALIENMONSTER*/{ R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_DL, R_NO, R_NO },
/*ALIENPREY */{ R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_NO ,R_FR ,R_NO ,R_DL, R_NO, R_NO },
/*ALIENPREDATO*/{ R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_HT ,R_DL ,R_NO ,R_DL, R_NO, R_NO },
/*INSECT*/ { R_FR ,R_FR ,R_FR ,R_FR ,R_FR ,R_NO ,R_FR ,R_FR ,R_FR ,R_FR ,R_NO ,R_FR, R_NO, R_NO },
/*PLAYERALLY*/ { R_NO ,R_DL ,R_AL ,R_AL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO, R_NO, R_NO },
/*PBIOWEAPON*/ { R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_DL, R_NO, R_DL },
/*ABIOWEAPON*/ { R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_AL ,R_NO ,R_DL ,R_DL ,R_NO ,R_NO ,R_DL, R_DL, R_NO }
static int iEnemy[15][15] =
{ // NONE MACH PLYR HPASS HMIL AMIL APASS AMONST APREY APRED INSECT PLRALY PBWPN ABWPN XPRD
/*NONE*/ { R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO, R_NO, R_NO, R_NO },
/*MACHINE*/ { R_NO ,R_NO ,R_DL ,R_DL ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_DL, R_DL, R_DL, R_DL },
/*PLAYER*/ { R_NO ,R_DL ,R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO, R_DL, R_DL, R_DL },
/*HUMANPASSIVE*/{ R_NO ,R_NO ,R_AL ,R_AL ,R_HT ,R_FR ,R_NO ,R_HT ,R_DL ,R_FR ,R_NO ,R_AL, R_NO, R_NO, R_DL },
/*HUMANMILITAR*/{ R_NO ,R_NO ,R_HT ,R_DL ,R_NO ,R_HT ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_HT, R_NO, R_NO, R_HT },
/*ALIENMILITAR*/{ R_NO ,R_DL ,R_HT ,R_DL ,R_HT ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_DL, R_NO, R_NO, R_NO },
/*ALIENPASSIVE*/{ R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO, R_NO, R_NO, R_NO },
/*ALIENMONSTER*/{ R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_DL, R_NO, R_NO, R_NO },
/*ALIENPREY */{ R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_NO ,R_FR ,R_NO ,R_DL, R_NO, R_NO, R_FR },
/*ALIENPREDATO*/{ R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_HT ,R_DL ,R_NO ,R_DL, R_NO, R_NO, R_DL },
/*INSECT*/ { R_FR ,R_FR ,R_FR ,R_FR ,R_FR ,R_NO ,R_FR ,R_FR ,R_FR ,R_FR ,R_NO ,R_FR, R_NO, R_NO, R_NO },
/*PLAYERALLY*/ { R_NO ,R_DL ,R_AL ,R_AL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO, R_NO, R_NO, R_DL },
/*PBIOWEAPON*/ { R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_DL, R_NO, R_DL, R_DL },
/*ABIOWEAPON*/ { R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_AL ,R_NO ,R_DL ,R_DL ,R_NO ,R_NO ,R_DL, R_DL, R_NO, R_DL },
/*XPREDATOR*/ { R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO ,R_NO ,R_DL ,R_DL ,R_NO ,R_NO, R_NO, R_AL, R_AL }
};
return iEnemy[Classify()][pTarget->Classify()];

1
dlls/monsters.h

@ -148,6 +148,7 @@ public: @@ -148,6 +148,7 @@ public:
virtual int ObjectCaps( void ) { return ( CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION ) | FCAP_DONT_SAVE; }
static void SpawnHeadGib( entvars_t *pevVictim );
static void SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human );
static void SpawnRandomGibs( entvars_t *pevVictim, int cGibs, const char* gibModel, int gibBodiesNum, int startGibNum = 0 );
static void SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs );
int m_bloodColor;

77
dlls/osprey.cpp

@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
#include "soundent.h"
#include "effects.h"
#include "customentity.h"
#include "osprey.h"
typedef struct
{
@ -33,76 +34,6 @@ typedef struct @@ -33,76 +34,6 @@ typedef struct
#define SF_WAITFORTRIGGER 0x40
#define MAX_CARRY 24
class COsprey : public CBaseMonster
{
public:
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
int ObjectCaps( void ) { return CBaseMonster::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
void Spawn( void );
void Precache( void );
int Classify( void ) { return CLASS_MACHINE; };
int BloodColor( void ) { return DONT_BLEED; }
void Killed( entvars_t *pevAttacker, int iGib );
void UpdateGoal( void );
BOOL HasDead( void );
void EXPORT FlyThink( void );
void EXPORT DeployThink( void );
void Flight( void );
void EXPORT HitTouch( CBaseEntity *pOther );
void EXPORT FindAllThink( void );
void EXPORT HoverThink( void );
CBaseMonster *MakeGrunt( Vector vecSrc );
void EXPORT CrashTouch( CBaseEntity *pOther );
void EXPORT DyingThink( void );
void EXPORT CommandUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
// int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );
void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType );
void ShowDamage( void );
CBaseEntity *m_pGoalEnt;
Vector m_vel1;
Vector m_vel2;
Vector m_pos1;
Vector m_pos2;
Vector m_ang1;
Vector m_ang2;
float m_startTime;
float m_dTime;
Vector m_velocity;
float m_flIdealtilt;
float m_flRotortilt;
float m_flRightHealth;
float m_flLeftHealth;
int m_iUnits;
EHANDLE m_hGrunt[MAX_CARRY];
Vector m_vecOrigin[MAX_CARRY];
EHANDLE m_hRepel[4];
int m_iSoundState;
int m_iSpriteTexture;
int m_iPitch;
int m_iExplode;
int m_iTailGibs;
int m_iBodyGibs;
int m_iEngineGibs;
int m_iDoLeftSmokePuff;
int m_iDoRightSmokePuff;
};
LINK_ENTITY_TO_CLASS( monster_osprey, COsprey )
TYPEDESCRIPTION COsprey::m_SaveData[] =
@ -126,8 +57,8 @@ TYPEDESCRIPTION COsprey::m_SaveData[] = @@ -126,8 +57,8 @@ TYPEDESCRIPTION COsprey::m_SaveData[] =
DEFINE_FIELD( COsprey, m_flLeftHealth, FIELD_FLOAT ),
DEFINE_FIELD( COsprey, m_iUnits, FIELD_INTEGER ),
DEFINE_ARRAY( COsprey, m_hGrunt, FIELD_EHANDLE, MAX_CARRY ),
DEFINE_ARRAY( COsprey, m_vecOrigin, FIELD_POSITION_VECTOR, MAX_CARRY ),
DEFINE_ARRAY( COsprey, m_hGrunt, FIELD_EHANDLE, OSPREY_MAX_CARRY ),
DEFINE_ARRAY( COsprey, m_vecOrigin, FIELD_POSITION_VECTOR, OSPREY_MAX_CARRY ),
DEFINE_ARRAY( COsprey, m_hRepel, FIELD_EHANDLE, 4 ),
// DEFINE_FIELD( COsprey, m_iSoundState, FIELD_INTEGER ),
@ -206,7 +137,7 @@ void COsprey::FindAllThink( void ) @@ -206,7 +137,7 @@ void COsprey::FindAllThink( void )
CBaseEntity *pEntity = NULL;
m_iUnits = 0;
while( m_iUnits < MAX_CARRY && ( pEntity = UTIL_FindEntityByClassname( pEntity, "monster_human_grunt" ) ) != NULL )
while( m_iUnits < OSPREY_MAX_CARRY && ( pEntity = UTIL_FindEntityByClassname( pEntity, "monster_human_grunt" ) ) != NULL )
{
if( pEntity->IsAlive() )
{

88
dlls/osprey.h

@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve LLC and its suppliers. Access to this code is restricted to
* persons who have executed a written SDK license with Valve. Any access,
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef OSPREY_H
#define OSPREY_H
#define OSPREY_MAX_CARRY 24
class COsprey : public CBaseMonster
{
public:
int Save(CSave &save);
int Restore(CRestore &restore);
static TYPEDESCRIPTION m_SaveData[];
int ObjectCaps(void) { return CBaseMonster::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
virtual void Spawn(void);
virtual void Precache(void);
int Classify(void) { return CLASS_MACHINE; };
int BloodColor(void) { return DONT_BLEED; }
void Killed(entvars_t *pevAttacker, int iGib);
void UpdateGoal(void);
BOOL HasDead(void);
void EXPORT FlyThink(void);
void EXPORT DeployThink(void);
void Flight(void);
void EXPORT HitTouch(CBaseEntity *pOther);
virtual void EXPORT FindAllThink(void);
void EXPORT HoverThink(void);
virtual CBaseMonster *MakeGrunt(Vector vecSrc);
void EXPORT CrashTouch(CBaseEntity *pOther);
void EXPORT DyingThink(void);
void EXPORT CommandUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
// int TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType );
void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
void ShowDamage(void);
CBaseEntity *m_pGoalEnt;
Vector m_vel1;
Vector m_vel2;
Vector m_pos1;
Vector m_pos2;
Vector m_ang1;
Vector m_ang2;
float m_startTime;
float m_dTime;
Vector m_velocity;
float m_flIdealtilt;
float m_flRotortilt;
float m_flRightHealth;
float m_flLeftHealth;
int m_iUnits;
EHANDLE m_hGrunt[OSPREY_MAX_CARRY];
Vector m_vecOrigin[OSPREY_MAX_CARRY];
EHANDLE m_hRepel[4];
int m_iSoundState;
int m_iSpriteTexture;
int m_iPitch;
int m_iExplode;
int m_iTailGibs;
int m_iBodyGibs;
int m_iEngineGibs;
int m_iDoLeftSmokePuff;
int m_iDoRightSmokePuff;
};
#endif // OSPREY_H

2
dlls/rp/otis.cpp

@ -118,7 +118,7 @@ void COtis::BarneyFirePistol(void) @@ -118,7 +118,7 @@ void COtis::BarneyFirePistol(void)
SetBlending(0, angDir.x);
pev->effects = EF_MUZZLEFLASH;
FireBullets(1, vecShootOrigin, vecShootDir, VECTOR_CONE_2DEGREES, 1024, BULLET_MONSTER_357);
FireBullets(1, vecShootOrigin, vecShootDir, VECTOR_CONE_2DEGREES, 1024, BULLET_MONSTER_9MM);
int pitchShift = RANDOM_LONG(0, 20);

25
dlls/skill.h

@ -26,6 +26,11 @@ struct skilldata_t @@ -26,6 +26,11 @@ struct skilldata_t
float apacheHealth;
float aworkerHealth;
float aworkerDmgClaw;
float aworkerDmgClawrake;
float aworkerDmgZap;
float barneyHealth;
float bigmommaHealthFactor; // Multiply each node's health by this
@ -43,6 +48,10 @@ struct skilldata_t @@ -43,6 +48,10 @@ struct skilldata_t
float gargantuaDmgFire;
float gargantuaDmgStomp;
float gonomeHealth;
float gonomeDmgOneBite;
float gonomeDmgOneSlash;
float hassassinHealth;
float headcrabHealth;
@ -67,6 +76,9 @@ struct skilldata_t @@ -67,6 +76,9 @@ struct skilldata_t
float leechHealth;
float leechDmgBite;
float massnHealth;
float massnDmgKick;
float controllerHealth;
float controllerDmgZap;
float controllerSpeedBall;
@ -75,6 +87,13 @@ struct skilldata_t @@ -75,6 +87,13 @@ struct skilldata_t
float nihilanthHealth;
float nihilanthZap;
float otisHealth;
float pitdroneHealth;
float pitdroneDmgBite;
float pitdroneDmgWhip;
float pitdroneDmgSpit;
float scientistHealth;
float snarkHealth;
@ -85,6 +104,12 @@ struct skilldata_t @@ -85,6 +104,12 @@ struct skilldata_t
float zombieDmgOneSlash;
float zombieDmgBothSlash;
float zgruntHealth;
float zgruntDmgKick;
float zgruntShotgunPellets;
float zsoldierHealth;
float turretHealth;
float miniturretHealth;
float sentryHealth;

Loading…
Cancel
Save