Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

82 lines
2.1 KiB

/***
*
* 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.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
//=========================================================
// Houndeye
//=========================================================
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
//=========================================================
// DEAD HOUNDEYE PROP
//=========================================================
class CDeadHoundeye : public CBaseMonster
{
public:
void Spawn(void);
int Classify(void) { return CLASS_ALIEN_MONSTER; }
void KeyValue(KeyValueData *pkvd);
int m_iPose;// which sequence to display -- temporary, don't need to save
static char *m_szPoses[1];
};
char *CDeadHoundeye::m_szPoses[] = { "dead" };
void CDeadHoundeye::KeyValue(KeyValueData *pkvd)
{
if (FStrEq(pkvd->szKeyName, "pose"))
{
m_iPose = atoi(pkvd->szValue);
pkvd->fHandled = TRUE;
}
else
CBaseMonster::KeyValue(pkvd);
}
LINK_ENTITY_TO_CLASS(monster_houndeye_dead, CDeadHoundeye);
//=========================================================
// ********** DeadHoundeye SPAWN **********
//=========================================================
void CDeadHoundeye::Spawn(void)
{
PRECACHE_MODEL("models/houndeye_dead.mdl");
SET_MODEL(ENT(pev), "models/houndeye_dead.mdl");
pev->effects = 0;
pev->yaw_speed = 8;
pev->sequence = 0;
pev->body = 1;
m_bloodColor = BLOOD_COLOR_GREEN;
pev->sequence = LookupSequence(m_szPoses[m_iPose]);
if (pev->sequence == -1)
{
ALERT(at_console, "Dead houndeye with bad pose\n");
pev->sequence = 0;
pev->effects = EF_BRIGHTFIELD;
}
// Corpses have less health
pev->health = 8;
MonsterInitDead();
}