mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-13 05:51:19 +00:00
Merge changes for monster_generic and turrets from SoHL1.5.
This commit is contained in:
parent
0a41f6ec70
commit
519fd90274
@ -21,20 +21,21 @@
|
||||
#include "monsters.h"
|
||||
#include "schedule.h"
|
||||
#include "animation.h"
|
||||
#include "talkmonster.h"
|
||||
|
||||
// For holograms, make them not solid so the player can walk through them
|
||||
//LRC- this seems to interfere with SF_MONSTER_CLIP
|
||||
#define SF_GENERICMONSTER_NOTSOLID 4
|
||||
#define SF_GENERICMONSTER_PLAYERMODEL 8
|
||||
#define SF_HEAD_CONTROLLER 8
|
||||
#define SF_GENERICMONSTER_INVULNERABLE 32
|
||||
//Not implemented:
|
||||
#define SF_GENERICMONSTER_CORPSE 64
|
||||
#define SF_GENERICMONSTER_PLAYERMODEL 64
|
||||
|
||||
//=========================================================
|
||||
// Monster's Anim Events Go Here
|
||||
//=========================================================
|
||||
|
||||
class CGenericMonster : public CBaseMonster
|
||||
class CGenericMonster : public CTalkMonster
|
||||
{
|
||||
public:
|
||||
void Spawn( void );
|
||||
@ -179,6 +180,11 @@ void CGenericMonster::Spawn()
|
||||
|
||||
MonsterInit();
|
||||
|
||||
if( pev->spawnflags & SF_HEAD_CONTROLLER )
|
||||
{
|
||||
m_afCapability = bits_CAP_TURN_HEAD;
|
||||
}
|
||||
|
||||
if( pev->spawnflags & SF_GENERICMONSTER_NOTSOLID )
|
||||
{
|
||||
pev->solid = SOLID_NOT;
|
||||
@ -195,6 +201,8 @@ void CGenericMonster::Spawn()
|
||||
//=========================================================
|
||||
void CGenericMonster::Precache()
|
||||
{
|
||||
CTalkMonster::Precache();
|
||||
TalkInit();
|
||||
PRECACHE_MODEL( (char *)STRING(pev->model) );
|
||||
if (m_iszGibModel)
|
||||
PRECACHE_MODEL( STRING(m_iszGibModel) ); //LRC
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "player.h"
|
||||
#include "talkmonster.h"
|
||||
#include "gamerules.h"
|
||||
#include "locus.h"
|
||||
|
||||
static char *memfgets( byte *pMemFile, int fileSize, int &filePos, char *pBuffer, int bufferSize );
|
||||
|
||||
@ -719,6 +720,10 @@ void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller,
|
||||
// init all ramp params for startup
|
||||
InitModulationParms();
|
||||
|
||||
// AJH / MJB - [LR] volume field:
|
||||
if( pev->noise )
|
||||
m_dpv.vol = CalcLocus_Ratio( this, STRING( pev->noise ) );
|
||||
|
||||
if (m_pPlayFrom)
|
||||
{
|
||||
EMIT_SOUND_DYN( m_pPlayFrom, m_iChannel, szSoundFile, //LRC
|
||||
|
@ -259,6 +259,12 @@ void CBaseTurret::Spawn()
|
||||
m_iAutoStart = TRUE;
|
||||
}
|
||||
|
||||
if( m_iOrientation == 1 )
|
||||
{
|
||||
pev->idealpitch = 180;
|
||||
pev->angles.x = 180;
|
||||
}
|
||||
|
||||
ResetSequenceInfo();
|
||||
SetBoneController( 0, 0 );
|
||||
SetBoneController( 1, 0 );
|
||||
@ -386,8 +392,8 @@ void CBaseTurret::Initialize( void )
|
||||
m_flStartYaw = pev->angles.y;
|
||||
if( m_iOrientation == 1 )
|
||||
{
|
||||
pev->idealpitch = 180;
|
||||
pev->angles.x = 180;
|
||||
//pev->idealpitch = 180;
|
||||
//pev->angles.x = 180; //This is moved to CBaseTurret::Spawn for fix old bug in original HL. G-Cont.
|
||||
pev->view_ofs.z = -pev->view_ofs.z;
|
||||
pev->effects |= EF_INVLIGHT;
|
||||
pev->angles.y = pev->angles.y + 180;
|
||||
@ -1183,7 +1189,9 @@ void CSentry::Spawn()
|
||||
pev->health = gSkillData.sentryHealth;
|
||||
m_HackedGunPos = Vector( 0, 0, 48 );
|
||||
pev->view_ofs.z = 48;
|
||||
m_flMaxWait = 1E6;
|
||||
// m_flMaxWait = 1E6;
|
||||
if( m_flMaxWait == 0 )
|
||||
m_flMaxWait = TURRET_MAXWAIT;//G-Cont. now sentry can deployed
|
||||
m_flMaxSpin = 1E6;
|
||||
|
||||
CBaseTurret::Spawn();
|
||||
|
Loading…
x
Reference in New Issue
Block a user