mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-07 20:55:31 +03:00
dc7f20acc8
- Added custom map compile tools (vbsp, vvis, vrad) - Changed blink fix (shouldn't change anything in-game) - Added auto-completion to ent_create, npc_create, and the main set of "npc_" debug commands - Added ent_create_aimed, an ent_create equivalent of npc_create_aimed - Made hunters start using the "vs. player" melee animation against smaller NPCs that look weird with the "stab" attack - Added "explosion_sparks" convar, which fixes broken code for giving explosions sparks (disabled by default because of how different it looks) - Made interaction code capable of being dispatched on any entity, not just combat characters - Added npc_barnacle_ignite convar, which lets barnacles be ignited by flares - Fixed certain NPCs getting out of the way for the player when they hate them - Fixed auto-generated "speak" scene responses not using parameters that work on real VCDs - Made "stop_on_nonidle" capable of being used in any mod, not just HL2 episodic mods - Selectable color for ragdoll boogie/point_ragdollboogie - Fixed PickupWeaponInstant not firing weapon pickup outputs - Introduced inputs and keyvalues for "lerping" to math_counter_advanced - Fixed ClearConsole on logic_console - logic_convar should now detect client convars correctly - New NormalizeAngles input on math_vector - logic_modelinfo LookupActivity input - math_generate fixed and expanded to be more like math_counter - Added a WIP game logging system for playtesting maps - Introduced logic_playerinfo, an entity that can read a player's name or ID - Fixed some new filters not working with filter_multi - Added radius pickup spawnflag to func_physbox - Added "Preserve name" spawnflag to weapons - Added cc_achievement_debug message for when an achievement doesn't exist - Made npc_combine_s not speak while in logic_choreographed_scenes - Fixed zombie torsos/legs/headcrabs not being serverside when zombie is forced to server ragdoll - Expanded and cleaned up npc_zombie_custom - Fixed func_commandredirects not cleaning up correctly and sometimes crashing the game - Allowed player squad commands to go through +USE-held objects - Added a bunch of I/O/KV to trigger_waterydeath for better configuration - Changed save comment system to use the chapter title from world properties, and the ability to suppress the title popup that normally results from it - Adjusted game_convar_mod for MP planning - Removed the func_precipitation custom particle/splash code for now, as it was causing problems - Fixed env_global_light not accepting lightcolor - Added "Additional Buttons" to player_speedmod - Added save comment to RPC - Added env_projectedtexture attenuation - Added scripted_sequence OnPreIdleSequence - Added OnCrab to zombies - Added skill_changed game event (may need further testing) - Added a fix for viewmodels flipping under extreme FOV values - Added code that allows mappers to change the skin on shotgunners without it usually flipping back randomly - Fixed a very, very, very major shader performance issue - New SetAbsOrigin/Angles inputs on all entities, analogous to SetLocalOrigin/Angles - Code improvements for I/O involving angles - logic_entity_position improvements/fixes, including a new OutAngles output that outputs the angles on position calls - Alternate collision/player avoidance spawnflag obsoletion enforcement disabled - Enable/DisableHazardLights inputs on the EP2 jalopy, equivalent to the keyvalue - Miscellaneous shader formatting adjustments and fixes - Fixed AlwaysDrawOff on env_projectedtexture not being a valid input
166 lines
3.7 KiB
C++
166 lines
3.7 KiB
C++
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//=============================================================================//
|
|
|
|
#ifndef C_ENVPROJECTEDTEXTURE_H
|
|
#define C_ENVPROJECTEDTEXTURE_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "c_baseentity.h"
|
|
#include "basetypes.h"
|
|
|
|
#ifdef ASW_PROJECTED_TEXTURES
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
class C_EnvProjectedTexture : public C_BaseEntity
|
|
{
|
|
DECLARE_CLASS( C_EnvProjectedTexture, C_BaseEntity );
|
|
public:
|
|
DECLARE_CLIENTCLASS();
|
|
|
|
void SetMaterial( IMaterial *pMaterial );
|
|
void SetLightColor( byte r, byte g, byte b, byte a );
|
|
void SetSize( float flSize );
|
|
void SetRotation( float flRotation );
|
|
|
|
virtual void OnDataChanged( DataUpdateType_t updateType );
|
|
void ShutDownLightHandle( void );
|
|
|
|
#ifdef MAPBASE
|
|
virtual void Simulate();
|
|
#else
|
|
virtual bool Simulate();
|
|
#endif
|
|
|
|
void UpdateLight( void );
|
|
|
|
C_EnvProjectedTexture();
|
|
~C_EnvProjectedTexture();
|
|
|
|
static void SetVisibleBBoxMinHeight( float flVisibleBBoxMinHeight ) { m_flVisibleBBoxMinHeight = flVisibleBBoxMinHeight; }
|
|
static float GetVisibleBBoxMinHeight( void ) { return m_flVisibleBBoxMinHeight; }
|
|
static C_EnvProjectedTexture *Create( );
|
|
|
|
private:
|
|
|
|
inline bool IsBBoxVisible( void );
|
|
bool IsBBoxVisible( Vector vecExtentsMin,
|
|
Vector vecExtentsMax );
|
|
|
|
ClientShadowHandle_t m_LightHandle;
|
|
bool m_bForceUpdate;
|
|
|
|
EHANDLE m_hTargetEntity;
|
|
#ifdef MAPBASE
|
|
bool m_bDontFollowTarget;
|
|
#endif
|
|
|
|
bool m_bState;
|
|
bool m_bAlwaysUpdate;
|
|
float m_flLightFOV;
|
|
#ifdef MAPBASE
|
|
float m_flLightHorFOV;
|
|
#endif
|
|
bool m_bEnableShadows;
|
|
bool m_bLightOnlyTarget;
|
|
bool m_bLightWorld;
|
|
bool m_bCameraSpace;
|
|
float m_flBrightnessScale;
|
|
color32 m_LightColor;
|
|
Vector m_CurrentLinearFloatLightColor;
|
|
float m_flCurrentLinearFloatLightAlpha;
|
|
#ifdef MAPBASE
|
|
float m_flCurrentBrightnessScale;
|
|
#endif
|
|
float m_flColorTransitionTime;
|
|
float m_flAmbient;
|
|
float m_flNearZ;
|
|
float m_flFarZ;
|
|
char m_SpotlightTextureName[ MAX_PATH ];
|
|
CTextureReference m_SpotlightTexture;
|
|
int m_nSpotlightTextureFrame;
|
|
int m_nShadowQuality;
|
|
#ifdef MAPBASE
|
|
float m_flConstantAtten;
|
|
float m_flLinearAtten;
|
|
float m_flQuadraticAtten;
|
|
float m_flShadowAtten;
|
|
|
|
bool m_bAlwaysDraw;
|
|
//bool m_bProjectedTextureVersion;
|
|
#endif
|
|
|
|
Vector m_vecExtentsMin;
|
|
Vector m_vecExtentsMax;
|
|
|
|
static float m_flVisibleBBoxMinHeight;
|
|
};
|
|
|
|
|
|
|
|
bool C_EnvProjectedTexture::IsBBoxVisible( void )
|
|
{
|
|
return IsBBoxVisible( GetAbsOrigin() + m_vecExtentsMin, GetAbsOrigin() + m_vecExtentsMax );
|
|
}
|
|
|
|
#else
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
class C_EnvProjectedTexture : public C_BaseEntity
|
|
{
|
|
DECLARE_CLASS( C_EnvProjectedTexture, C_BaseEntity );
|
|
public:
|
|
DECLARE_CLIENTCLASS();
|
|
|
|
C_EnvProjectedTexture();
|
|
~C_EnvProjectedTexture();
|
|
|
|
virtual void OnDataChanged( DataUpdateType_t updateType );
|
|
void ShutDownLightHandle( void );
|
|
|
|
virtual void Simulate();
|
|
|
|
void UpdateLight( bool bForceUpdate );
|
|
|
|
bool ShadowsEnabled();
|
|
|
|
float GetFOV();
|
|
|
|
private:
|
|
|
|
ClientShadowHandle_t m_LightHandle;
|
|
|
|
EHANDLE m_hTargetEntity;
|
|
|
|
bool m_bState;
|
|
float m_flLightFOV;
|
|
bool m_bEnableShadows;
|
|
bool m_bLightOnlyTarget;
|
|
bool m_bLightWorld;
|
|
bool m_bCameraSpace;
|
|
color32 m_cLightColor;
|
|
float m_flAmbient;
|
|
char m_SpotlightTextureName[ MAX_PATH ];
|
|
int m_nSpotlightTextureFrame;
|
|
int m_nShadowQuality;
|
|
bool m_bCurrentShadow;
|
|
|
|
public:
|
|
C_EnvProjectedTexture *m_pNext;
|
|
};
|
|
|
|
C_EnvProjectedTexture* GetEnvProjectedTextureList();
|
|
|
|
#endif
|
|
|
|
#endif // C_ENVPROJECTEDTEXTURE_H
|