dlls/point_camera.cpp
454647484950515253
CPointCamera::CPointCamera()
{
// Set these to opposites so that it'll be sent the first time around.
m_bActive = false;
m_bIsOn = false;
m_bFogEnable = false;
454647484950515253545556575859
CPointCamera::CPointCamera()
{
// Bug #0000385: point_camera & func_monitor in-titties
// Just actually did what valves comment below said - they had both
// set to false...
// Set these to opposites so that it'll be sent the first time around.
m_bActive = true;
m_bIsOn = false;
// Bug #0000390: multiple render targets for cameras
m_szRenderTarget = NULL_STRING;
m_bFogEnable = false;
777879808182
//-----------------------------------------------------------------------------
int CPointCamera::UpdateTransmitState()
{
if ( m_bActive )
{
return SetTransmitState( FL_EDICT_ALWAYS );
8384858687888990919293949596
//-----------------------------------------------------------------------------
int CPointCamera::UpdateTransmitState()
{
// --> FF
#ifdef GAME_DLL
// always transmit if you're an objective
if ( m_ObjectivePlayerRefs.Count() > 0 )
return SetTransmitState( FL_EDICT_ALWAYS );
#endif // GAME_DLL
// <-- FF
if ( m_bActive )
{
return SetTransmitState( FL_EDICT_ALWAYS );
199200201202203204205
//-----------------------------------------------------------------------------
void CPointCamera::InputSetOn( inputdata_t &inputdata )
{
m_bIsOn = true;
}
//-----------------------------------------------------------------------------
213214215216217218219220221222
//-----------------------------------------------------------------------------
void CPointCamera::InputSetOn( inputdata_t &inputdata )
{
// Bug #0000385: point_camera & func_monitor in-titties
// Added the SetActive to this function or the other one - can't remember
m_bIsOn = true;
SetActive( true );
}
//-----------------------------------------------------------------------------
207208209210211212
//-----------------------------------------------------------------------------
void CPointCamera::InputSetOff( inputdata_t &inputdata )
{
m_bIsOn = false;
SetActive( false );
}
224225226227228229230231
//-----------------------------------------------------------------------------
void CPointCamera::InputSetOff( inputdata_t &inputdata )
{
// Bug #0000385: point_camera & func_monitor in-titties
// Added the SetActive to this function or the other one - can't remember
m_bIsOn = false;
SetActive( false );
}
221222223224225226
DEFINE_KEYFIELD( m_flFogStart, FIELD_FLOAT, "fogStart" ),
DEFINE_KEYFIELD( m_flFogEnd, FIELD_FLOAT, "fogEnd" ),
DEFINE_KEYFIELD( m_bUseScreenAspectRatio, FIELD_BOOLEAN, "UseScreenAspectRatio" ),
DEFINE_FIELD( m_bActive, FIELD_BOOLEAN ),
DEFINE_FIELD( m_bIsOn, FIELD_BOOLEAN ),
240241242243244245246247
DEFINE_KEYFIELD( m_flFogStart, FIELD_FLOAT, "fogStart" ),
DEFINE_KEYFIELD( m_flFogEnd, FIELD_FLOAT, "fogEnd" ),
DEFINE_KEYFIELD( m_bUseScreenAspectRatio, FIELD_BOOLEAN, "UseScreenAspectRatio" ),
// Bug #0000390: multiple render targets for cameras
DEFINE_KEYFIELD( m_szRenderTarget, FIELD_STRING, "renderTarget" ),
DEFINE_FIELD( m_bActive, FIELD_BOOLEAN ),
DEFINE_FIELD( m_bIsOn, FIELD_BOOLEAN ),
248249250251
SendPropFloat( SENDINFO( m_flFogEnd ), 0, SPROP_NOSCALE ),
SendPropInt( SENDINFO( m_bActive ), 1, SPROP_UNSIGNED ),
SendPropInt( SENDINFO( m_bUseScreenAspectRatio ), 1, SPROP_UNSIGNED ),
END_SEND_TABLE()
269270271272273274
SendPropFloat( SENDINFO( m_flFogEnd ), 0, SPROP_NOSCALE ),
SendPropInt( SENDINFO( m_bActive ), 1, SPROP_UNSIGNED ),
SendPropInt( SENDINFO( m_bUseScreenAspectRatio ), 1, SPROP_UNSIGNED ),
// Bug #0000390: multiple render targets for cameras
SendPropStringT( SENDINFO ( m_szRenderTarget ) ),
END_SEND_TABLE()