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
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. |
|
* |
|
****/ |
|
|
|
//========================================================= |
|
// Alien slave |
|
//========================================================= |
|
#include "extdll.h" |
|
#include "util.h" |
|
#include "cbase.h" |
|
#include "monsters.h" |
|
#include "schedule.h" |
|
|
|
//========================================================= |
|
// DEAD ISLAVE PROP |
|
//========================================================= |
|
class CDeadISlave : 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 const char *m_szPoses[1]; |
|
}; |
|
|
|
const char *CDeadISlave::m_szPoses[] = { "dead_on_stomach" }; |
|
|
|
void CDeadISlave::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_alien_slave_dead, CDeadISlave); |
|
|
|
//========================================================= |
|
// ********** DeadHoundeye SPAWN ********** |
|
//========================================================= |
|
void CDeadISlave::Spawn(void) |
|
{ |
|
PRECACHE_MODEL("models/islave.mdl"); |
|
SET_MODEL(ENT(pev), "models/islave.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 islave with bad pose\n"); |
|
pev->sequence = 0; |
|
pev->effects = EF_BRIGHTFIELD; |
|
} |
|
|
|
// Corpses have less health |
|
pev->health = 8; |
|
|
|
MonsterInitDead(); |
|
}
|
|
|