mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-10 22:16:52 +03:00
dd9f5ac766
- Experimental RPC stuff for the future - Fixed players running over allies with vehicles (kind of) - Modified redirect filter infrastructure to support when there's no target filter (meaning it will just make sure the entity exists) - Fixed SDK_EyeRefract - Fixed env_beam SetStart/EndEntity - New "OnStateChange" output on NPCs - scripted_face removed (use generic facing VCDs instead) - Fixed RPC - View ID nodraw keyvalue + reflective glass view ID fix - CopyAnimationDataFrom expansion (more variables copied) - Fixed pre-Mapbase env_projectedtextures not updating after loading a save - Fixed(?) player companion grenade throwing being interrupted - Added convars for secondary and NPC shotgun pellet amounts - NPC fade distance/scale transfers to its ragdoll - Made node graph rebuild occur sooner after map load - Added option to disable "node graph out of date" message - Fixed ent_fire delay (decimals discarded before) - "SetFilter" on func_clip_vphysics - Fixed func_tank zero barrel (untested) - Fixed npc_turret_ground parenting fix - Added toggle-able weapon_crossbow experimental hit location code - Fixed ally grenades being considered Combine grenades - Added SDK_MonitorScreen and SDK_UnlitTwoTexture - Updated README - Added !activator/!caller support to logic_collision_pair - Fixed ortho not working in script_intro - Added Nbc66's closed captioning language fix - Applied fade fix to server ragdolls - Added combine_mine friend/foe filters - Fixed env_starfield pausing - Reworked PickupWeapon/Item inputs - Fixed context response system $ usage - Fixed env_break_shooter velocity/speed - Made func_breakable "Spawn on break" support other entities - Fixed OnThrowGrenade > point_entity_replace blip - Added mapname to logic_externaldata - Added "Random Template" to point_template - Added "Use LOS" to trigger_look - Added flags based on L4D(2) to trigger_playermovement - Added npc_combine_s "Alternate Capable" keyvalue that enables both grenades and alt-fire at the same time regardless of elite status - Fixed npc_combine_s DropGrenade input - Miscellaneous code and comment changes
82 lines
2.3 KiB
C++
82 lines
2.3 KiB
C++
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose: Point entity used to create templates out of other entities or groups of entities
|
|
//
|
|
//=============================================================================//
|
|
|
|
#ifndef POINT_TEMPLATE_H
|
|
#define POINT_TEMPLATE_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
#define MAX_NUM_TEMPLATES 16
|
|
|
|
struct template_t
|
|
{
|
|
int iTemplateIndex;
|
|
VMatrix matEntityToTemplate;
|
|
|
|
DECLARE_SIMPLE_DATADESC();
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
class CPointTemplate : public CLogicalEntity
|
|
{
|
|
DECLARE_CLASS( CPointTemplate, CLogicalEntity );
|
|
public:
|
|
DECLARE_DATADESC();
|
|
|
|
virtual void Spawn( void );
|
|
virtual void Precache();
|
|
|
|
// Template initialization
|
|
void StartBuildingTemplates( void );
|
|
void FinishBuildingTemplates( void );
|
|
|
|
// Template Entity accessors
|
|
int GetNumTemplateEntities( void );
|
|
CBaseEntity *GetTemplateEntity( int iTemplateNumber );
|
|
void AddTemplate( CBaseEntity *pEntity, const char *pszMapData, int nLen );
|
|
bool ShouldRemoveTemplateEntities( void );
|
|
bool AllowNameFixup();
|
|
|
|
// Templates accessors
|
|
int GetNumTemplates( void );
|
|
int GetTemplateIndexForTemplate( int iTemplate );
|
|
|
|
// Template instancing
|
|
bool CreateInstance( const Vector &vecOrigin, const QAngle &vecAngles, CUtlVector<CBaseEntity*> *pEntities );
|
|
#ifdef MAPBASE
|
|
bool CreateSpecificInstance( int iTemplate, const Vector &vecOrigin, const QAngle &vecAngles, CBaseEntity **pOutEntity );
|
|
#endif
|
|
|
|
// Inputs
|
|
void InputForceSpawn( inputdata_t &inputdata );
|
|
#ifdef MAPBASE
|
|
void InputForceSpawnRandomTemplate( inputdata_t &inputdata );
|
|
#endif
|
|
|
|
virtual void PerformPrecache();
|
|
|
|
private:
|
|
string_t m_iszTemplateEntityNames[MAX_NUM_TEMPLATES];
|
|
|
|
// List of map entities this template targets. Built inside our Spawn().
|
|
// It's only valid between Spawn() & Activate(), because the map entity parsing
|
|
// code removes all the entities in it once it finishes turning them into templates.
|
|
CUtlVector< CBaseEntity * > m_hTemplateEntities;
|
|
|
|
// List of templates, generated from our template entities.
|
|
CUtlVector< template_t > m_hTemplates;
|
|
|
|
COutputEvent m_pOutputOnSpawned;
|
|
#ifdef MAPBASE
|
|
COutputEHANDLE m_pOutputOutEntity;
|
|
#endif
|
|
};
|
|
|
|
#endif // POINT_TEMPLATE_H
|