source-engine/game/server/portal2/point_laser_target.cpp
tupoy-ya 881d4a91c9
fix(EngineTrace)!: Update Engine Trace to CSGO version.
Fixes portals getting stuck in objects.

fix(Portal Trace Filter): Can shoot through cubes now.

refactor(Soundscape)!: Updated to the CSGO Version.

chore(Copyright): Remove dates and unicode characters.
2023-09-30 15:41:04 +05:00

59 lines
1.4 KiB
C++

//===== Copyright Valve Corporation, All rights reserved. ======//
//
// Purpose: One of the two ends of a portal pair which can be picked up and placed by weapon_camera
//
//===========================================================================//
#include "point_laser_target.h"
#include "baseentity.h"
#include "string_t.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//-----------------------------------------------------------------------------
// Context think
//-----------------------------------------------------------------------------
LINK_ENTITY_TO_CLASS( prop_button, CPortalLaserTarget );
BEGIN_DATADESC( CPortalLaserTarget )
DEFINE_KEYFIELD( m_ModelName, FIELD_STRING, "ModelName" ),
DEFINE_FIELD( m_bPowered, FIELD_BOOLEAN ),
DEFINE_OUTPUT( m_OnPowered, "OnPowered" ),
DEFINE_OUTPUT( m_OnUnpowered, "OnUnpowered" ),
END_DATADESC()
//-----------------------------------------------------------------------------
// Purpose: constructor
//-----------------------------------------------------------------------------
CPortalLaserTarget::CPortalLaserTarget( void )
{
}
//-----------------------------------------------------------------------------
// Purpose: Spawn the laser target.
//-----------------------------------------------------------------------------
void CPortalLaserTarget::Spawn( void )
{
Precache();
CBaseEntity::AddFlag(0x2000000);
m_bPowered = false;
}