Removed obsolete parameter from Death() and Pain(), as those are now residing in globals.
This commit is contained in:
parent
ffee615ead
commit
5e821a5651
38 changed files with 198 additions and 191 deletions
|
@ -232,13 +232,13 @@ CBaseEntity::SendEntity(entity ePEnt, float fChanged)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CBaseEntity::Pain(int body)
|
CBaseEntity::Pain(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CBaseEntity::Death(int body)
|
CBaseEntity::Death(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ class CBaseEntity
|
||||||
virtual void(void) Hide;
|
virtual void(void) Hide;
|
||||||
virtual void(void) ParentUpdate;
|
virtual void(void) ParentUpdate;
|
||||||
virtual float(entity, float) SendEntity;
|
virtual float(entity, float) SendEntity;
|
||||||
virtual void(int iHitBody) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int iHitBody) Death;
|
virtual void(void) Death;
|
||||||
|
|
||||||
virtual void(float) SetEffects;
|
virtual void(float) SetEffects;
|
||||||
virtual void(float) SetFrame;
|
virtual void(float) SetFrame;
|
||||||
|
|
|
@ -103,8 +103,8 @@ class CBaseMonster:CBaseEntity
|
||||||
virtual void(void) Hide;
|
virtual void(void) Hide;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) PlayerUse;
|
virtual void(void) PlayerUse;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) Physics;
|
virtual void(void) Physics;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Gib;
|
virtual void(void) Gib;
|
||||||
|
@ -569,14 +569,14 @@ CBaseMonster::PlayerUse(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CBaseMonster::Pain(int iHitBody)
|
CBaseMonster::Pain(void)
|
||||||
{
|
{
|
||||||
if (!m_eEnemy)
|
if (!m_eEnemy)
|
||||||
m_eEnemy = g_dmg_eAttacker;
|
m_eEnemy = g_dmg_eAttacker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CBaseMonster::Death(int iHitBody)
|
CBaseMonster::Death(void)
|
||||||
{
|
{
|
||||||
/* we were already dead before, so gib */
|
/* we were already dead before, so gib */
|
||||||
if (style == MONSTER_DEAD) {
|
if (style == MONSTER_DEAD) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CBasePhysics:CBaseEntity
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) touch;
|
virtual void(void) touch;
|
||||||
virtual void(void) TouchThink;
|
virtual void(void) TouchThink;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -81,7 +81,7 @@ CBasePhysics::touch(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CBasePhysics::Pain(int body)
|
CBasePhysics::Pain(void)
|
||||||
{
|
{
|
||||||
#ifdef GS_BULLET_PHYSICS
|
#ifdef GS_BULLET_PHYSICS
|
||||||
makevectors(vectoangles(origin - trace_endpos));
|
makevectors(vectoangles(origin - trace_endpos));
|
||||||
|
|
|
@ -39,7 +39,7 @@ class button_target:CBaseTrigger
|
||||||
|
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(entity, int) Trigger;
|
virtual void(entity, int) Trigger;
|
||||||
virtual void(int) Damage;
|
virtual void(void) Damage;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -80,7 +80,7 @@ button_target::Trigger(entity act, int status)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
button_target::Damage(int hit)
|
button_target::Damage(void)
|
||||||
{
|
{
|
||||||
Trigger(g_dmg_eAttacker, TRIG_TOGGLE); /* TODO: Set state? */
|
Trigger(g_dmg_eAttacker, TRIG_TOGGLE); /* TODO: Set state? */
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,11 +30,11 @@ class cycler:CBaseTrigger
|
||||||
{
|
{
|
||||||
void(void) cycler;
|
void(void) cycler;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
cycler::Pain(int body)
|
cycler::Pain(void)
|
||||||
{
|
{
|
||||||
if (frame >= modelframecount(modelindex)) {
|
if (frame >= modelframecount(modelindex)) {
|
||||||
frame = 0;
|
frame = 0;
|
||||||
|
|
|
@ -118,12 +118,12 @@ class func_breakable:CBaseTrigger
|
||||||
virtual void(entity, int) Trigger;
|
virtual void(entity, int) Trigger;
|
||||||
virtual void(void) PlayerTouch;
|
virtual void(void) PlayerTouch;
|
||||||
/*virtual void(void) PressureDeath;*/
|
/*virtual void(void) PressureDeath;*/
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
func_breakable::Pain(int body)
|
func_breakable::Pain(void)
|
||||||
{
|
{
|
||||||
if (spawnflags & SF_TRIGGER) {
|
if (spawnflags & SF_TRIGGER) {
|
||||||
return;
|
return;
|
||||||
|
@ -172,7 +172,7 @@ func_breakable::Explode(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_breakable::Death(int body)
|
func_breakable::Death(void)
|
||||||
{
|
{
|
||||||
static void break_spawnobject(void) {
|
static void break_spawnobject(void) {
|
||||||
/* these might get overwritten by the entity spawnfunction */
|
/* these might get overwritten by the entity spawnfunction */
|
||||||
|
@ -228,15 +228,9 @@ void
|
||||||
func_breakable::Trigger(entity act, int state)
|
func_breakable::Trigger(entity act, int state)
|
||||||
{
|
{
|
||||||
if (health > 0)
|
if (health > 0)
|
||||||
func_breakable::Death(0);
|
func_breakable::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void
|
|
||||||
func_breakable::PressureDeath(void)
|
|
||||||
{
|
|
||||||
func_breakable::Death(m_pressAttacker, m_pressType, m_pressDamage);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
func_breakable::PlayerTouch(void)
|
func_breakable::PlayerTouch(void)
|
||||||
{
|
{
|
||||||
|
@ -249,6 +243,12 @@ func_breakable::PlayerTouch(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (other.solid == SOLID_CORPSE) {
|
||||||
|
if (vlen(other.velocity) > 100) {
|
||||||
|
Trigger(this, TRIG_ON);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (spawnflags & SF_TOUCH) {
|
if (spawnflags & SF_TOUCH) {
|
||||||
int fDamage = (float)(vlen(other.velocity) * 0.01f);
|
int fDamage = (float)(vlen(other.velocity) * 0.01f);
|
||||||
|
|
||||||
|
|
|
@ -135,8 +135,7 @@ class func_button:CBaseTrigger
|
||||||
virtual void(void) Blocked;
|
virtual void(void) Blocked;
|
||||||
virtual void(entity, int) Trigger;
|
virtual void(entity, int) Trigger;
|
||||||
virtual void(void) Use;
|
virtual void(void) Use;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Death;
|
||||||
virtual void(int) Death;
|
|
||||||
|
|
||||||
virtual void(void) SetMovementDirection;
|
virtual void(void) SetMovementDirection;
|
||||||
virtual void(vector, void(void)) MoveToDestination;
|
virtual void(vector, void(void)) MoveToDestination;
|
||||||
|
@ -282,12 +281,7 @@ void func_button::Use(void)
|
||||||
Trigger(eActivator, TRIG_TOGGLE);
|
Trigger(eActivator, TRIG_TOGGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_button::Pain (int body)
|
void func_button::Death(void)
|
||||||
{
|
|
||||||
/* how you doin? */
|
|
||||||
}
|
|
||||||
|
|
||||||
void func_button::Death (int body)
|
|
||||||
{
|
{
|
||||||
Trigger(g_dmg_eAttacker, TRIG_TOGGLE);
|
Trigger(g_dmg_eAttacker, TRIG_TOGGLE);
|
||||||
health = m_oldHealth;
|
health = m_oldHealth;
|
||||||
|
|
|
@ -72,11 +72,11 @@ enum
|
||||||
|
|
||||||
class func_door:CBaseTrigger
|
class func_door:CBaseTrigger
|
||||||
{
|
{
|
||||||
|
string m_strTargetClose;
|
||||||
vector m_vecPos1;
|
vector m_vecPos1;
|
||||||
vector m_vecPos2;
|
vector m_vecPos2;
|
||||||
vector m_vecDest;
|
vector m_vecDest;
|
||||||
vector m_vecMoveDir;
|
vector m_vecMoveDir;
|
||||||
string m_strFire;
|
|
||||||
float m_flSpeed;
|
float m_flSpeed;
|
||||||
float m_flLip;
|
float m_flLip;
|
||||||
float m_iState;
|
float m_iState;
|
||||||
|
@ -123,6 +123,14 @@ func_door::Arrived(void)
|
||||||
sound(this, CHAN_VOICE, "common/null.wav", 1.0f, ATTN_NORM);
|
sound(this, CHAN_VOICE, "common/null.wav", 1.0f, ATTN_NORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_strTargetClose)
|
||||||
|
for (entity f = world; (f = find(f, CBaseTrigger::m_strTargetName, m_strTargetClose));) {
|
||||||
|
CBaseTrigger trigger = (CBaseTrigger)f;
|
||||||
|
if (trigger.Trigger != __NULL__) {
|
||||||
|
trigger.Trigger(this, TRIG_TOGGLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(spawnflags & SF_MOV_USE)) {
|
if (!(spawnflags & SF_MOV_USE)) {
|
||||||
touch = Touch;
|
touch = Touch;
|
||||||
}
|
}
|
||||||
|
@ -149,15 +157,6 @@ func_door::Returned(void)
|
||||||
touch = Touch;
|
touch = Touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_strFire) {
|
|
||||||
CBaseTrigger t;
|
|
||||||
t = (CBaseTrigger)find(world, CBaseTrigger::m_strTargetName, m_strFire);
|
|
||||||
|
|
||||||
if (t) {
|
|
||||||
t.Trigger(this, TRIG_TOGGLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_iState = DOORSTATE_LOWERED;
|
m_iState = DOORSTATE_LOWERED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +416,7 @@ func_door::func_door(void)
|
||||||
m_flWait = stof(argv(i+1));
|
m_flWait = stof(argv(i+1));
|
||||||
break;
|
break;
|
||||||
case "netname":
|
case "netname":
|
||||||
m_strFire = argv(i+1);
|
m_strTargetClose = argv(i+1);
|
||||||
netname = __NULL__;
|
netname = __NULL__;
|
||||||
break;
|
break;
|
||||||
case "dmg":
|
case "dmg":
|
||||||
|
|
|
@ -40,6 +40,8 @@ enumflags
|
||||||
|
|
||||||
class func_door_rotating:CBaseTrigger
|
class func_door_rotating:CBaseTrigger
|
||||||
{
|
{
|
||||||
|
string m_strTargetClose;
|
||||||
|
|
||||||
int m_iMoveSnd;
|
int m_iMoveSnd;
|
||||||
int m_iStopSnd;
|
int m_iStopSnd;
|
||||||
int m_iDamage;
|
int m_iDamage;
|
||||||
|
@ -133,6 +135,14 @@ void func_door_rotating::Returned(void)
|
||||||
if (!(spawnflags & SF_ROT_USE)) {
|
if (!(spawnflags & SF_ROT_USE)) {
|
||||||
touch = Touch;
|
touch = Touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_strTargetClose)
|
||||||
|
for (entity f = world; (f = find(f, CBaseTrigger::m_strTargetName, m_strTargetClose));) {
|
||||||
|
CBaseTrigger trigger = (CBaseTrigger)f;
|
||||||
|
if (trigger.Trigger != __NULL__) {
|
||||||
|
trigger.Trigger(this, TRIG_TOGGLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_iState = STATE_LOWERED;
|
m_iState = STATE_LOWERED;
|
||||||
}
|
}
|
||||||
|
@ -389,6 +399,12 @@ void func_door_rotating::func_door_rotating(void)
|
||||||
case "dmg":
|
case "dmg":
|
||||||
m_iDamage = stoi(argv(i+1));
|
m_iDamage = stoi(argv(i+1));
|
||||||
break;
|
break;
|
||||||
|
case "wait":
|
||||||
|
m_flWait = stof(argv(i+1));
|
||||||
|
break;
|
||||||
|
case "netname":
|
||||||
|
m_strTargetClose = argv(i+1);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ class func_guntarget:CBaseTrigger
|
||||||
virtual void(void) Move;
|
virtual void(void) Move;
|
||||||
virtual void(void) Stop;
|
virtual void(void) Stop;
|
||||||
virtual void(entity act, int) Trigger;
|
virtual void(entity act, int) Trigger;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
};
|
};
|
||||||
|
|
||||||
void func_guntarget::Move(void)
|
void func_guntarget::Move(void)
|
||||||
|
@ -93,7 +93,7 @@ void func_guntarget::NextPath(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_guntarget::Death(int iHitBody)
|
void func_guntarget::Death(void)
|
||||||
{
|
{
|
||||||
entity a;
|
entity a;
|
||||||
Stop();
|
Stop();
|
||||||
|
|
|
@ -66,7 +66,7 @@ class func_rot_button:CBaseTrigger
|
||||||
virtual void(void) TurnToggle;
|
virtual void(void) TurnToggle;
|
||||||
virtual void(void) PlayerUse;
|
virtual void(void) PlayerUse;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) touch;
|
virtual void(void) touch;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ func_rot_button::TurnToggle(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_rot_button::Death(int i)
|
func_rot_button::Death(void)
|
||||||
{
|
{
|
||||||
takedamage = DAMAGE_NO;
|
takedamage = DAMAGE_NO;
|
||||||
TurnToggle();
|
TurnToggle();
|
||||||
|
|
|
@ -84,8 +84,8 @@ class hostage_entity:CBaseNPC
|
||||||
|
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) PlayerUse;
|
virtual void(void) PlayerUse;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual int(void) AnimIdle;
|
virtual int(void) AnimIdle;
|
||||||
virtual int(void) AnimWalk;
|
virtual int(void) AnimWalk;
|
||||||
virtual int(void) AnimRun;
|
virtual int(void) AnimRun;
|
||||||
|
@ -129,9 +129,9 @@ hostage_entity::PlayerUse(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hostage_entity::Pain(int iHitBody)
|
hostage_entity::Pain(void)
|
||||||
{
|
{
|
||||||
switch (iHitBody) {
|
switch (g_dmg_iHitBody) {
|
||||||
case BODY_HEAD:
|
case BODY_HEAD:
|
||||||
case BODY_DEFAULT:
|
case BODY_DEFAULT:
|
||||||
case BODY_CHEST:
|
case BODY_CHEST:
|
||||||
|
@ -160,7 +160,7 @@ hostage_entity::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hostage_entity::Death(int iHitBody)
|
hostage_entity::Death(void)
|
||||||
{
|
{
|
||||||
WarnAllies();
|
WarnAllies();
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ hostage_entity::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now mark our state as 'dead' */
|
/* now mark our state as 'dead' */
|
||||||
CBaseNPC::Death(iHitBody);
|
CBaseNPC::Death();
|
||||||
|
|
||||||
/* penalties */
|
/* penalties */
|
||||||
if (g_dmg_eAttacker.classname != "player")
|
if (g_dmg_eAttacker.classname != "player")
|
||||||
|
|
|
@ -94,7 +94,7 @@ class ammo_spore:item_ammo
|
||||||
void(void) ammo_spore;
|
void(void) ammo_spore;
|
||||||
virtual void(void) touch;
|
virtual void(void) touch;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -106,7 +106,7 @@ ammo_spore::ammo_spore(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ammo_spore::Death(int a)
|
ammo_spore::Death(void)
|
||||||
{
|
{
|
||||||
makevectors(m_oldAngle);
|
makevectors(m_oldAngle);
|
||||||
Sporelauncher_AltFire(this, origin, v_forward);
|
Sporelauncher_AltFire(this, origin, v_forward);
|
||||||
|
|
|
@ -319,8 +319,8 @@ class monster_scientist:CBaseNPC
|
||||||
virtual void(void) Hide;
|
virtual void(void) Hide;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) PlayerUse;
|
virtual void(void) PlayerUse;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) Physics;
|
virtual void(void) Physics;
|
||||||
virtual void(void) Scream;
|
virtual void(void) Scream;
|
||||||
virtual void(void) WarnOthers;
|
virtual void(void) WarnOthers;
|
||||||
|
@ -558,7 +558,7 @@ void monster_scientist::PlayerUse(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_scientist::Pain(int iHitBody)
|
void monster_scientist::Pain(void)
|
||||||
{
|
{
|
||||||
if (style == MONSTER_DEAD) {
|
if (style == MONSTER_DEAD) {
|
||||||
return;
|
return;
|
||||||
|
@ -583,7 +583,7 @@ void monster_scientist::Pain(int iHitBody)
|
||||||
m_flPainTime = time + 0.25f;
|
m_flPainTime = time + 0.25f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_scientist::Death(int iHitBody)
|
void monster_scientist::Death(void)
|
||||||
{
|
{
|
||||||
if (style == MONSTER_DEAD) {
|
if (style == MONSTER_DEAD) {
|
||||||
Gib();
|
Gib();
|
||||||
|
|
|
@ -77,13 +77,13 @@ Damage_Apply(entity t, entity c, float dmg, int w, int type)
|
||||||
if (s.flags & FL_CLIENT) {
|
if (s.flags & FL_CLIENT) {
|
||||||
rules.PlayerDeath((player)s);
|
rules.PlayerDeath((player)s);
|
||||||
} else {
|
} else {
|
||||||
s.Death(trace_surface_id);
|
s.Death();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (s.flags & FL_CLIENT) {
|
if (s.flags & FL_CLIENT) {
|
||||||
rules.PlayerPain((player)s);
|
rules.PlayerPain((player)s);
|
||||||
} else {
|
} else {
|
||||||
s.Pain(trace_surface_id);
|
s.Pain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,16 +52,16 @@ class monster_alien_controller:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_alien_controller;
|
void(void) monster_alien_controller;
|
||||||
|
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_alien_controller::Pain(int iHitBody)
|
monster_alien_controller::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flPainTime > time) {
|
if (m_flPainTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -77,7 +77,7 @@ monster_alien_controller::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_alien_controller::Death(int iHitBody)
|
monster_alien_controller::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -86,7 +86,7 @@ monster_alien_controller::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -65,16 +65,16 @@ class monster_alien_grunt:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_alien_grunt;
|
void(void) monster_alien_grunt;
|
||||||
|
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_alien_grunt::Pain(int iHitBody)
|
monster_alien_grunt::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flPainTime > time) {
|
if (m_flPainTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -90,12 +90,12 @@ monster_alien_grunt::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_alien_grunt::Death(int iHitBody)
|
monster_alien_grunt::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
/* headshots == different animation */
|
/* headshots == different animation */
|
||||||
if (iHitBody == BODY_HEAD) {
|
if (g_dmg_iHitBody == BODY_HEAD) {
|
||||||
if (random() < 0.5) {
|
if (random() < 0.5) {
|
||||||
SetFrame(AG_DIEHS);
|
SetFrame(AG_DIEHS);
|
||||||
} else {
|
} else {
|
||||||
|
@ -109,7 +109,7 @@ monster_alien_grunt::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -63,8 +63,8 @@ class monster_alien_slave:CBaseNPC
|
||||||
|
|
||||||
void(void) monster_alien_slave;
|
void(void) monster_alien_slave;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(void) IdleChat;
|
virtual void(void) IdleChat;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
|
|
||||||
|
@ -167,9 +167,9 @@ monster_alien_slave::IdleChat(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_alien_slave::Pain(int iHitBody)
|
monster_alien_slave::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseNPC::Pain(iHitBody);
|
CBaseNPC::Pain();
|
||||||
|
|
||||||
if (m_flPainTime > time) {
|
if (m_flPainTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -185,12 +185,12 @@ monster_alien_slave::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_alien_slave::Death(int iHitBody)
|
monster_alien_slave::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
/* headshots == different animation */
|
/* headshots == different animation */
|
||||||
if (iHitBody == BODY_HEAD) {
|
if (g_dmg_iHitBody == BODY_HEAD) {
|
||||||
if (random() < 0.5) {
|
if (random() < 0.5) {
|
||||||
SetFrame(SLV_DIEHS);
|
SetFrame(SLV_DIEHS);
|
||||||
} else {
|
} else {
|
||||||
|
@ -204,7 +204,7 @@ monster_alien_slave::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseNPC::Death(iHitBody);
|
CBaseNPC::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -33,13 +33,11 @@ enum
|
||||||
BCL_DIE
|
BCL_DIE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class monster_barnacle:CBaseMonster
|
class monster_barnacle:CBaseMonster
|
||||||
{
|
{
|
||||||
void(void) monster_barnacle;
|
void(void) monster_barnacle;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) Physics;
|
virtual void(void) Physics;
|
||||||
};
|
};
|
||||||
|
@ -51,7 +49,7 @@ monster_barnacle::Physics(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_barnacle::Death(int iHitBody)
|
monster_barnacle::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -60,7 +58,7 @@ monster_barnacle::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -50,8 +50,8 @@ class monster_barney:CBaseNPC
|
||||||
|
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) PlayerUse;
|
virtual void(void) PlayerUse;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual int(void) AnimIdle;
|
virtual int(void) AnimIdle;
|
||||||
virtual int(void) AnimWalk;
|
virtual int(void) AnimWalk;
|
||||||
virtual int(void) AnimRun;
|
virtual int(void) AnimRun;
|
||||||
|
@ -126,9 +126,9 @@ monster_barney::PlayerUse(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_barney::Pain(int iHitBody)
|
monster_barney::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseNPC::Pain(iHitBody);
|
CBaseNPC::Pain();
|
||||||
|
|
||||||
WarnAllies();
|
WarnAllies();
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ monster_barney::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_barney::Death(int iHitBody)
|
monster_barney::Death(void)
|
||||||
{
|
{
|
||||||
WarnAllies();
|
WarnAllies();
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ monster_barney::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now mark our state as 'dead' */
|
/* now mark our state as 'dead' */
|
||||||
CBaseNPC::Death(iHitBody);
|
CBaseNPC::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -52,8 +52,8 @@ class monster_bigmomma:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_bigmomma;
|
void(void) monster_bigmomma;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
@ -76,9 +76,9 @@ monster_bigmomma::IdleNoise(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_bigmomma::Pain(int iHitBody)
|
monster_bigmomma::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -94,7 +94,7 @@ monster_bigmomma::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_bigmomma::Death(int iHitBody)
|
monster_bigmomma::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -103,7 +103,7 @@ monster_bigmomma::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -60,8 +60,8 @@ class monster_bullchicken:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_bullchicken;
|
void(void) monster_bullchicken;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual int(void) AnimIdle;
|
virtual int(void) AnimIdle;
|
||||||
virtual int(void) AnimWalk;
|
virtual int(void) AnimWalk;
|
||||||
|
@ -104,9 +104,9 @@ monster_bullchicken::IdleNoise(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_bullchicken::Pain(int iHitBody)
|
monster_bullchicken::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -122,7 +122,7 @@ monster_bullchicken::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_bullchicken::Death(int iHitBody)
|
monster_bullchicken::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -134,7 +134,7 @@ monster_bullchicken::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_bullchicken::monster_bullchicken(void)
|
void monster_bullchicken::monster_bullchicken(void)
|
||||||
|
|
|
@ -25,11 +25,11 @@ Cockroach
|
||||||
class monster_cockroach:CBaseMonster
|
class monster_cockroach:CBaseMonster
|
||||||
{
|
{
|
||||||
void(void) monster_cockroach;
|
void(void) monster_cockroach;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_cockroach::Death(int iHitBody)
|
monster_cockroach::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -40,7 +40,7 @@ monster_cockroach::Death(int iHitBody)
|
||||||
health = -100;
|
health = -100;
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_cockroach::monster_cockroach(void)
|
void monster_cockroach::monster_cockroach(void)
|
||||||
|
|
|
@ -54,8 +54,8 @@ class monster_gargantua:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_gargantua;
|
void(void) monster_gargantua;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
@ -78,9 +78,9 @@ monster_gargantua::IdleNoise(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_gargantua::Pain(int iHitBody)
|
monster_gargantua::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -96,7 +96,7 @@ monster_gargantua::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_gargantua::Death(int iHitBody)
|
monster_gargantua::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -105,7 +105,7 @@ monster_gargantua::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -47,16 +47,14 @@ enum
|
||||||
HC_STRUGGLE
|
HC_STRUGGLE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class monster_headcrab:CBaseMonster
|
class monster_headcrab:CBaseMonster
|
||||||
{
|
{
|
||||||
float m_flIdleTime;
|
float m_flIdleTime;
|
||||||
|
|
||||||
void(void) monster_headcrab;
|
void(void) monster_headcrab;
|
||||||
|
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual int(void) AnimIdle;
|
virtual int(void) AnimIdle;
|
||||||
virtual int(void) AnimWalk;
|
virtual int(void) AnimWalk;
|
||||||
|
@ -110,9 +108,9 @@ monster_headcrab::touch(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_headcrab::Pain(int iHitBody)
|
monster_headcrab::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -128,7 +126,7 @@ monster_headcrab::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_headcrab::Death(int iHitBody)
|
monster_headcrab::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -137,7 +135,7 @@ monster_headcrab::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -165,6 +163,7 @@ monster_headcrab::monster_headcrab(void)
|
||||||
Sound_Precache("monster_headcrab.die");
|
Sound_Precache("monster_headcrab.die");
|
||||||
Sound_Precache("monster_headcrab.idle");
|
Sound_Precache("monster_headcrab.idle");
|
||||||
Sound_Precache("monster_headcrab.pain");
|
Sound_Precache("monster_headcrab.pain");
|
||||||
|
|
||||||
if (classname == "monster_babycrab") {
|
if (classname == "monster_babycrab") {
|
||||||
netname = "Baby Headcrab";
|
netname = "Baby Headcrab";
|
||||||
model = "models/baby_headcrab.mdl";
|
model = "models/baby_headcrab.mdl";
|
||||||
|
|
|
@ -65,8 +65,8 @@ class monster_houndeye:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_houndeye;
|
void(void) monster_houndeye;
|
||||||
|
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
|
|
||||||
|
@ -129,9 +129,9 @@ monster_houndeye::AttackBlast(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_houndeye::Pain(int iHitBody)
|
monster_houndeye::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -147,7 +147,7 @@ monster_houndeye::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_houndeye::Death(int iHitBody)
|
monster_houndeye::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -157,7 +157,7 @@ monster_houndeye::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -49,18 +49,18 @@ class monster_human_assassin:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_human_assassin;
|
void(void) monster_human_assassin;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_human_assassin::Death(int iHitBody)
|
monster_human_assassin::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
/* headshots == different animation */
|
/* headshots == different animation */
|
||||||
/* this animation may not have been used, but it looks cool */
|
/* this animation may not have been used, but it looks cool */
|
||||||
if (iHitBody == BODY_HEAD) {
|
if (g_dmg_iHitBody == BODY_HEAD) {
|
||||||
if (random() < 0.5) {
|
if (random() < 0.5) {
|
||||||
SetFrame(HAS_DIERUN);
|
SetFrame(HAS_DIERUN);
|
||||||
} else {
|
} else {
|
||||||
|
@ -72,7 +72,7 @@ monster_human_assassin::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -119,8 +119,8 @@ class monster_human_grunt:CBaseNPC
|
||||||
virtual void(void) Scream;
|
virtual void(void) Scream;
|
||||||
virtual void(void) IdleChat;
|
virtual void(void) IdleChat;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
|
|
||||||
virtual int(void) AnimIdle;
|
virtual int(void) AnimIdle;
|
||||||
virtual int(void) AnimWalk;
|
virtual int(void) AnimWalk;
|
||||||
|
@ -227,9 +227,9 @@ void monster_human_grunt::IdleChat(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_human_grunt::Pain(int iHitBody)
|
monster_human_grunt::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -245,13 +245,13 @@ monster_human_grunt::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_human_grunt::Death(int iHitBody)
|
monster_human_grunt::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
/* headshots == different animation */
|
/* headshots == different animation */
|
||||||
/* this animation may not have been used, but it looks cool */
|
/* this animation may not have been used, but it looks cool */
|
||||||
if (iHitBody == BODY_HEAD) {
|
if (g_dmg_iHitBody == BODY_HEAD) {
|
||||||
if (random() < 0.5) {
|
if (random() < 0.5) {
|
||||||
SetFrame(GR_DIEHS);
|
SetFrame(GR_DIEHS);
|
||||||
} else {
|
} else {
|
||||||
|
@ -263,8 +263,9 @@ monster_human_grunt::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
Sound_Play(this, CHAN_VOICE, "monster_human_grunt.die");
|
Sound_Play(this, CHAN_VOICE, "monster_human_grunt.die");
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -48,16 +48,16 @@ class monster_ichthyosaur:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_ichthyosaur;
|
void(void) monster_ichthyosaur;
|
||||||
|
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_ichthyosaur::Pain(int iHitBody)
|
monster_ichthyosaur::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -73,7 +73,7 @@ monster_ichthyosaur::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_ichthyosaur::Death(int iHitBody)
|
monster_ichthyosaur::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -95,7 +95,7 @@ monster_ichthyosaur::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -40,7 +40,7 @@ class monster_leech:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_leech;
|
void(void) monster_leech;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) DeathEnd;
|
virtual void(void) DeathEnd;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
@ -52,7 +52,7 @@ monster_leech::DeathEnd(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_leech::Death(int iHitBody)
|
monster_leech::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -62,7 +62,7 @@ monster_leech::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -53,8 +53,8 @@ class monster_nihilanth:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_nihilanth;
|
void(void) monster_nihilanth;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
@ -70,6 +70,7 @@ monster_nihilanth::IdleNoise(void)
|
||||||
if (m_flIdleTime > time) {
|
if (m_flIdleTime > time) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* timing needs to adjusted as sounds conflict */
|
/* timing needs to adjusted as sounds conflict */
|
||||||
m_flIdleTime = time + random(2,10);
|
m_flIdleTime = time + random(2,10);
|
||||||
|
|
||||||
|
@ -77,9 +78,9 @@ monster_nihilanth::IdleNoise(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_nihilanth::Pain(int iHitBody)
|
monster_nihilanth::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -96,7 +97,7 @@ monster_nihilanth::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_nihilanth::Death(int iHitBody)
|
monster_nihilanth::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -105,7 +106,7 @@ monster_nihilanth::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -75,8 +75,8 @@ class monster_scientist:CBaseNPC
|
||||||
|
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(void) PlayerUse;
|
virtual void(void) PlayerUse;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual int(void) AnimIdle;
|
virtual int(void) AnimIdle;
|
||||||
virtual int(void) AnimWalk;
|
virtual int(void) AnimWalk;
|
||||||
virtual int(void) AnimRun;
|
virtual int(void) AnimRun;
|
||||||
|
@ -112,7 +112,7 @@ monster_scientist::PlayerUse(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_scientist::Pain(int iHitBody)
|
monster_scientist::Pain(void)
|
||||||
{
|
{
|
||||||
WarnAllies();
|
WarnAllies();
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ monster_scientist::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_scientist::Death(int iHitBody)
|
monster_scientist::Death(void)
|
||||||
{
|
{
|
||||||
WarnAllies();
|
WarnAllies();
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ monster_scientist::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now mark our state as 'dead' */
|
/* now mark our state as 'dead' */
|
||||||
CBaseNPC::Death(iHitBody);
|
CBaseNPC::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -37,13 +37,13 @@ class monster_sentry:CBaseMonster
|
||||||
{
|
{
|
||||||
void(void) monster_sentry;
|
void(void) monster_sentry;
|
||||||
|
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_sentry::Death(int iHitBody)
|
monster_sentry::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
|
@ -52,7 +52,7 @@ monster_sentry::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -40,24 +40,20 @@ class monster_sitting_scientist:CBaseMonster
|
||||||
|
|
||||||
virtual void(void) Hide;
|
virtual void(void) Hide;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
virtual void(int) Pain;
|
virtual void(void) Death;
|
||||||
virtual void(int) Death;
|
|
||||||
virtual void(void) Gib;
|
virtual void(void) Gib;
|
||||||
};
|
};
|
||||||
|
|
||||||
void monster_sitting_scientist::Gib(void)
|
void
|
||||||
|
monster_sitting_scientist::Gib(void)
|
||||||
{
|
{
|
||||||
takedamage = DAMAGE_NO;
|
takedamage = DAMAGE_NO;
|
||||||
FX_GibHuman(this.origin);
|
FX_GibHuman(this.origin);
|
||||||
Hide();
|
Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_sitting_scientist::Pain(int iHitBody)
|
void
|
||||||
{
|
monster_sitting_scientist::Death(void)
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void monster_sitting_scientist::Death(int iHitBody)
|
|
||||||
{
|
{
|
||||||
if (health < -50) {
|
if (health < -50) {
|
||||||
Gib();
|
Gib();
|
||||||
|
@ -65,14 +61,16 @@ void monster_sitting_scientist::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_sitting_scientist::Hide(void)
|
void
|
||||||
|
monster_sitting_scientist::Hide(void)
|
||||||
{
|
{
|
||||||
SetModel("");
|
SetModel("");
|
||||||
solid = SOLID_NOT;
|
solid = SOLID_NOT;
|
||||||
movetype = MOVETYPE_NONE;
|
movetype = MOVETYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_sitting_scientist::Respawn(void)
|
void
|
||||||
|
monster_sitting_scientist::Respawn(void)
|
||||||
{
|
{
|
||||||
v_angle[0] = Math_FixDelta(m_oldAngle[0]);
|
v_angle[0] = Math_FixDelta(m_oldAngle[0]);
|
||||||
v_angle[1] = Math_FixDelta(m_oldAngle[1]);
|
v_angle[1] = Math_FixDelta(m_oldAngle[1]);
|
||||||
|
@ -93,7 +91,8 @@ void monster_sitting_scientist::Respawn(void)
|
||||||
droptofloor();
|
droptofloor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void monster_sitting_scientist::monster_sitting_scientist(void)
|
void
|
||||||
|
monster_sitting_scientist::monster_sitting_scientist(void)
|
||||||
{
|
{
|
||||||
model = "models/scientist.mdl";
|
model = "models/scientist.mdl";
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ class monster_zombie:CBaseMonster
|
||||||
|
|
||||||
void(void) monster_zombie;
|
void(void) monster_zombie;
|
||||||
|
|
||||||
virtual void(int) Pain;
|
virtual void(void) Pain;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(void) IdleNoise;
|
virtual void(void) IdleNoise;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
|
|
||||||
|
@ -140,9 +140,9 @@ monster_zombie::AttackFlail(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_zombie::Pain(int iHitBody)
|
monster_zombie::Pain(void)
|
||||||
{
|
{
|
||||||
CBaseMonster::Pain(iHitBody);
|
CBaseMonster::Pain();
|
||||||
|
|
||||||
if (m_flAnimTime > time) {
|
if (m_flAnimTime > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -158,12 +158,12 @@ monster_zombie::Pain(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_zombie::Death(int iHitBody)
|
monster_zombie::Death(void)
|
||||||
{
|
{
|
||||||
/* if we're already dead (corpse) don't change animations */
|
/* if we're already dead (corpse) don't change animations */
|
||||||
if (style != MONSTER_DEAD) {
|
if (style != MONSTER_DEAD) {
|
||||||
/* headshots == different animation */
|
/* headshots == different animation */
|
||||||
if (iHitBody == BODY_HEAD) {
|
if (g_dmg_iHitBody == BODY_HEAD) {
|
||||||
if (random() < 0.5) {
|
if (random() < 0.5) {
|
||||||
SetFrame(ZO_DIEHS);
|
SetFrame(ZO_DIEHS);
|
||||||
} else {
|
} else {
|
||||||
|
@ -177,7 +177,7 @@ monster_zombie::Death(int iHitBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the functional differences */
|
/* set the functional differences */
|
||||||
CBaseMonster::Death(iHitBody);
|
CBaseMonster::Death();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -42,8 +42,7 @@ class monster_snark:CBaseMonster
|
||||||
void(void) monster_snark;
|
void(void) monster_snark;
|
||||||
|
|
||||||
virtual void(void) customphysics;
|
virtual void(void) customphysics;
|
||||||
virtual void(int) Death;
|
virtual void(void) Death;
|
||||||
virtual void(int) Pain;
|
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,7 +100,7 @@ monster_snark::customphysics(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_snark::Death(int i)
|
monster_snark::Death(void)
|
||||||
{
|
{
|
||||||
float dmg = Skill_GetValue("snark_dmg_pop");
|
float dmg = Skill_GetValue("snark_dmg_pop");
|
||||||
Damage_Radius(origin, goalentity, dmg, dmg * 2.5f, TRUE, WEAPON_SNARK);
|
Damage_Radius(origin, goalentity, dmg, dmg * 2.5f, TRUE, WEAPON_SNARK);
|
||||||
|
@ -112,12 +111,6 @@ monster_snark::Death(int i)
|
||||||
remove(this);
|
remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
monster_snark::Pain(int i)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_snark::Respawn(void)
|
monster_snark::Respawn(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,6 +49,7 @@ class monster_tripmine:CBaseMonster
|
||||||
|
|
||||||
virtual float(entity, float) SendEntity;
|
virtual float(entity, float) SendEntity;
|
||||||
virtual void(int) Trip;
|
virtual void(int) Trip;
|
||||||
|
virtual void(void) Damaged;
|
||||||
virtual void(void) Ready;
|
virtual void(void) Ready;
|
||||||
virtual void(void) Respawn;
|
virtual void(void) Respawn;
|
||||||
};
|
};
|
||||||
|
@ -87,6 +88,12 @@ monster_tripmine::Trip(int walkthrough)
|
||||||
remove(this);
|
remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
monster_tripmine::Damaged(void)
|
||||||
|
{
|
||||||
|
Trip(0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monster_tripmine::Ready(void)
|
monster_tripmine::Ready(void)
|
||||||
{
|
{
|
||||||
|
@ -99,7 +106,7 @@ monster_tripmine::Ready(void)
|
||||||
SendFlags = -1;
|
SendFlags = -1;
|
||||||
health = 1;
|
health = 1;
|
||||||
Death =
|
Death =
|
||||||
Pain = Trip;
|
Pain = Damaged;
|
||||||
takedamage = DAMAGE_YES;
|
takedamage = DAMAGE_YES;
|
||||||
m_iDist = (int)trace_plane_dist;
|
m_iDist = (int)trace_plane_dist;
|
||||||
Sound_Play(this, CHAN_WEAPON, "weapon_tripmine.activate");
|
Sound_Play(this, CHAN_WEAPON, "weapon_tripmine.activate");
|
||||||
|
|
Loading…
Reference in a new issue