Skip to content

Commit

Permalink
server: restructurized monster_generic source code
Browse files Browse the repository at this point in the history
  • Loading branch information
APAmk2 authored and SNMetamorph committed Feb 1, 2024
1 parent b578f7c commit 0e10667
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 26 deletions.
27 changes: 1 addition & 26 deletions server/monsters/genericmonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,8 @@
//=========================================================
// Generic Monster - purely for scripted sequence work.
//=========================================================
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
#include "talkmonster.h"
#include "genericmonster.h"

// For holograms, make them not solid so the player can walk through them
#define SF_GENERICMONSTER_NOTSOLID 4
#define SF_HEAD_CONTROLLER 8

//=========================================================
// Monster's Anim Events Go Here
//=========================================================

class CGenericMonster : public CTalkMonster
{
DECLARE_CLASS( CGenericMonster, CTalkMonster );
public:
void Spawn( void );
void Precache( void );
void SetYawSpeed( void );
int Classify ( void );
void HandleAnimEvent( MonsterEvent_t *pEvent );
void KeyValue( KeyValueData *pkvd );
int ISoundMask ( void );
};
LINK_ENTITY_TO_CLASS( monster_generic, CGenericMonster );

void CGenericMonster::KeyValue( KeyValueData *pkvd )
Expand Down
47 changes: 47 additions & 0 deletions server/monsters/genericmonster.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/***
*
* 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.
*
****/
//=========================================================
// Generic Monster - purely for scripted sequence work.
//=========================================================

#pragma once

#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
#include "talkmonster.h"

// For holograms, make them not solid so the player can walk through them
#define SF_GENERICMONSTER_NOTSOLID 4
#define SF_HEAD_CONTROLLER 8

//=========================================================
// Monster's Anim Events Go Here
//=========================================================

class CGenericMonster : public CTalkMonster
{
DECLARE_CLASS( CGenericMonster, CTalkMonster );
public:
void Spawn( void );
void Precache( void );
void SetYawSpeed( void );
int Classify ( void );
void HandleAnimEvent( MonsterEvent_t *pEvent );
void KeyValue( KeyValueData *pkvd );
int ISoundMask ( void );
};

0 comments on commit 0e10667

Please sign in to comment.