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.

59 lines
1.5 KiB

9 years ago
/***
*
* Copyright (c) 1996-2002, 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.
*
****/
//=========================================================
// monsterstate.cpp - base class monster functions for
// controlling core AI.
//=========================================================
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "nodes.h"
#include "monsters.h"
#include "animation.h"
#include "saverestore.h"
#include "soundent.h"
//=========================================================
// SetState
//=========================================================
8 years ago
void CBaseMonster::SetState( MONSTERSTATE State )
9 years ago
{
/*
8 years ago
if( State != m_MonsterState )
9 years ago
{
8 years ago
ALERT( at_aiconsole, "State Changed to %d\n", State );
9 years ago
}
*/
switch( State )
{
9 years ago
// Drop enemy pointers when going to idle
case MONSTERSTATE_IDLE:
if( m_hEnemy != 0 )
9 years ago
{
m_hEnemy = NULL;// not allowed to have an enemy anymore.
8 years ago
ALERT( at_aiconsole, "Stripped\n" );
9 years ago
}
break;
default:
break;
9 years ago
}
m_MonsterState = State;
m_IdealMonsterState = State;
}