mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-25 13:17:57 +03:00
af85131deb
- Fixed filter_damage_mod blocking all damage which doesn't match the secondary filter regardless of secondary filter mode - Fixed impulse 101 and other give-related commands leaving behind weapons with occupied slots - Fixed a crash with scripted_sound's PlaySoundOnEntity when the entity doesn't exist - Added OnSoundFinished output to ambient_generic - Added the ability to use custom models/nuggets with item_grubnugget - Fixed a crash with citizen medics healing nonexistent targets - Added "SetDistLook" and "SetDistTooFar" inputs for NPCs, allowing manual adjustment of NPC sight distance - Added keyvalue and input to env_microphone for utilizing a different audio channel - Added "SetPitchScale" input to env_microphone - Fixed info_player_view_proxy not using angles - Fixed dirt variant elite model not being recognized as elite - Made headcrab hints properly register the start of use (for hint outputs) - Made RPG use a more realistic firing rate for NPCs which aren't constrained by slow RPG animations, like soldiers - Added spawnflag for func_breakable_surf to correctly play the break sound - Added keyvalue for using cheaper warn sound code for combine_mines - Added "OnSpawnNPC" output for npc_combinedropship when it spawns a soldier, rollermine, or strider - Added signal gesture activities - Fixed stunstick not using metrocop knockout/stun code correctly - Fixed a possible crash involving a NPC's weapon being removed during alt-fire - Fixed(?) flashlight shadow filters - Added support for multiple look entities in trigger_look - Added npc_metropolice alt-firing - Fixed npc_metropolice using pistol burst firing on weapon_357 - Fixed npc_metropolice not deploying manhacks/throwing grenades in standoffs - Fixed npc_metropolice not recognizing some crouch activities correctly - Changed weapon_357 so it runs a tracer each shot from NPCs - Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass - Added "SetSpeedModifier" to NPCs, based on 1upD's shadow walker code - Made game_convar_mod much more reliable - Fixed non-mirrored npc_turret_lab refusing to die - Made npc_turret_lab use SMG1 ammo instead of AR2 ammo - Fixed block LOS brushes sometimes not working with players (and possibly similar issues) - Raised maximum renderable entities from 4096 to 16384, based on ficool2's limit research - Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass. Can display parallax corrected cubemaps from its unbroken form - Fixed VBSP breaking func_breakable_surf, etc. when using parallax corrected cubemaps - Raised maximum VBSP entities from 8192 to 65536, based on ficool2's limit research - Raised maximum VBSP worldlights from 8192 to 65536, based on ficool2's limit research - Raised maximum VBSP overlays from 512 to 8192, based on ficool2's limit research - Other misc. fixes
167 lines
4.3 KiB
C++
167 lines
4.3 KiB
C++
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose:
|
|
//
|
|
//=============================================================================//
|
|
|
|
#include "Color.h"
|
|
|
|
#ifndef COMBINE_MINE_H
|
|
#define COMBINE_MINE_H
|
|
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
class CSoundPatch;
|
|
|
|
//---------------------------------------------------------
|
|
//---------------------------------------------------------
|
|
#define BOUNCEBOMB_HOOK_RANGE 64
|
|
#define BOUNCEBOMB_WARN_RADIUS 245.0 // Must be slightly less than physcannon!
|
|
#define BOUNCEBOMB_DETONATE_RADIUS 100.0
|
|
|
|
#define BOUNCEBOMB_EXPLODE_RADIUS 125.0
|
|
#define BOUNCEBOMB_EXPLODE_DAMAGE 150.0
|
|
#include "player_pickup.h"
|
|
#ifdef MAPBASE
|
|
#include "filters.h"
|
|
#endif
|
|
|
|
class CBounceBomb : public CBaseAnimating, public CDefaultPlayerPickupVPhysics
|
|
{
|
|
DECLARE_CLASS( CBounceBomb, CBaseAnimating );
|
|
|
|
public:
|
|
#ifdef MAPBASE
|
|
CBounceBomb() { m_pWarnSound = NULL; m_bPlacedByPlayer = false; m_flExplosionDelay = 0.5f; }
|
|
#else
|
|
CBounceBomb() { m_pWarnSound = NULL; m_bPlacedByPlayer = false; }
|
|
#endif
|
|
void Precache();
|
|
void Spawn();
|
|
void OnRestore();
|
|
int DrawDebugTextOverlays(void);
|
|
void SetMineState( int iState );
|
|
int GetMineState() { return m_iMineState; }
|
|
bool IsValidLocation();
|
|
void Flip( const Vector &vecForce, const AngularImpulse &torque );
|
|
void SearchThink();
|
|
void BounceThink();
|
|
void SettleThink();
|
|
void CaptiveThink();
|
|
void ExplodeThink();
|
|
void ExplodeTouch( CBaseEntity *pOther );
|
|
void CavernBounceThink(); ///< an alternative style of bouncing used for the citizen modded bouncers
|
|
bool IsAwake() { return m_bAwake; }
|
|
void Wake( bool bWake );
|
|
float FindNearestNPC();
|
|
void SetNearestNPC( CBaseEntity *pNearest ) { m_hNearestNPC.Set( pNearest ); }
|
|
int OnTakeDamage( const CTakeDamageInfo &info );
|
|
bool IsFriend( CBaseEntity *pEntity );
|
|
|
|
void UpdateLight( bool bTurnOn, unsigned int r, unsigned int g, unsigned int b, unsigned int a );
|
|
bool IsLightOn() { return m_hSprite.Get() != NULL; }
|
|
|
|
void OnPhysGunPickup( CBasePlayer *pPhysGunUser, PhysGunPickup_t reason = PICKED_UP_BY_CANNON );
|
|
void OnPhysGunDrop( CBasePlayer *pPhysGunUser, PhysGunDrop_t reason );
|
|
bool ForcePhysgunOpen( CBasePlayer *pPlayer ) { return true; }
|
|
bool HasPreferredCarryAnglesForPlayer( CBasePlayer *pPlayer ) { return true; }
|
|
virtual QAngle PreferredCarryAngles( void ) { return vec3_angle; }
|
|
CBasePlayer *HasPhysicsAttacker( float dt );
|
|
|
|
bool IsPlayerPlaced() { return m_bPlacedByPlayer; }
|
|
|
|
bool CreateVPhysics()
|
|
{
|
|
VPhysicsInitNormal( SOLID_VPHYSICS, 0, false );
|
|
return true;
|
|
}
|
|
|
|
void Pickup();
|
|
|
|
void OpenHooks( bool bSilent = false );
|
|
void CloseHooks();
|
|
|
|
#ifdef MAPBASE
|
|
// Uses the new CBaseEntity interaction implementation and replaces the dynamic_casting from npc_barnacle
|
|
bool HandleInteraction( int interactionType, void *data, CBaseCombatCharacter* sourceEnt );
|
|
|
|
void UpdateWarnSound( float flVolume, float flDelta );
|
|
void SilenceWarnSound( float flDelta );
|
|
#endif
|
|
|
|
DECLARE_DATADESC();
|
|
|
|
static string_t gm_iszFloorTurretClassname;
|
|
static string_t gm_iszGroundTurretClassname;
|
|
|
|
private:
|
|
float m_flExplosionDelay;
|
|
|
|
bool m_bAwake;
|
|
bool m_bBounce;
|
|
EHANDLE m_hNearestNPC;
|
|
EHANDLE m_hSprite;
|
|
Color m_LastSpriteColor;
|
|
|
|
float m_flHookPositions;
|
|
int m_iHookN;
|
|
int m_iHookE;
|
|
int m_iHookS;
|
|
int m_iAllHooks;
|
|
|
|
CSoundPatch *m_pWarnSound;
|
|
|
|
bool m_bLockSilently;
|
|
bool m_bFoeNearest;
|
|
|
|
float m_flIgnoreWorldTime;
|
|
|
|
bool m_bDisarmed;
|
|
#ifdef MAPBASE
|
|
int m_iInitialState;
|
|
bool m_bCheapWarnSound;
|
|
#endif
|
|
|
|
bool m_bPlacedByPlayer;
|
|
|
|
bool m_bHeldByPhysgun;
|
|
|
|
int m_iFlipAttempts;
|
|
int m_iModification;
|
|
|
|
CHandle<CBasePlayer> m_hPhysicsAttacker;
|
|
float m_flLastPhysicsInfluenceTime;
|
|
|
|
float m_flTimeGrabbed;
|
|
IPhysicsConstraint *m_pConstraint;
|
|
int m_iMineState;
|
|
|
|
#ifdef MAPBASE
|
|
// Makes the filters the exclusive factor in determining friend/foe
|
|
bool m_bFilterExclusive;
|
|
|
|
string_t m_iszEnemyFilter;
|
|
CHandle<CBaseFilter> m_hEnemyFilter;
|
|
void InputSetEnemyFilter( inputdata_t &inputdata );
|
|
|
|
string_t m_iszFriendFilter;
|
|
CHandle<CBaseFilter> m_hFriendFilter;
|
|
void InputSetFriendFilter( inputdata_t &inputdata );
|
|
#endif
|
|
|
|
COutputEvent m_OnPulledUp;
|
|
void InputDisarm( inputdata_t &inputdata );
|
|
#ifdef MAPBASE
|
|
void InputBounce( inputdata_t &inputdata );
|
|
void InputBounceAtTarget( inputdata_t &inputdata );
|
|
COutputEvent m_OnTriggered;
|
|
COutputEvent m_OnExplode;
|
|
#endif
|
|
};
|
|
|
|
|
|
|
|
#endif // COMBINE_MINE_H
|