mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-23 12:17:57 +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
161 lines
5.4 KiB
C++
161 lines
5.4 KiB
C++
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose:
|
|
//
|
|
//=============================================================================
|
|
|
|
#ifndef VEHICLE_JEEP_EPISODIC_H
|
|
#define VEHICLE_JEEP_EPISODIC_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "vehicle_jeep.h"
|
|
#include "ai_basenpc.h"
|
|
#include "hl2_vehicle_radar.h"
|
|
|
|
class CParticleSystem;
|
|
class CVehicleCargoTrigger;
|
|
class CSprite;
|
|
|
|
#define NUM_WHEEL_EFFECTS 2
|
|
#define NUM_HAZARD_LIGHTS 4
|
|
|
|
//=============================================================================
|
|
// Episodic jeep
|
|
|
|
class CPropJeepEpisodic : public CPropJeep
|
|
{
|
|
DECLARE_CLASS( CPropJeepEpisodic, CPropJeep );
|
|
DECLARE_SERVERCLASS();
|
|
|
|
public:
|
|
CPropJeepEpisodic( void );
|
|
|
|
virtual void Spawn( void );
|
|
virtual void Activate( void );
|
|
virtual void Think( void );
|
|
virtual void UpdateOnRemove( void );
|
|
|
|
virtual void NPC_FinishedEnterVehicle( CAI_BaseNPC *pPassenger, bool bCompanion );
|
|
virtual void NPC_FinishedExitVehicle( CAI_BaseNPC *pPassenger, bool bCompanion );
|
|
|
|
virtual bool NPC_CanEnterVehicle( CAI_BaseNPC *pPassenger, bool bCompanion );
|
|
virtual bool NPC_CanExitVehicle( CAI_BaseNPC *pPassenger, bool bCompanion );
|
|
virtual void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
|
|
virtual void Precache( void );
|
|
virtual void EnterVehicle( CBaseCombatCharacter *pPassenger );
|
|
virtual void ExitVehicle( int nRole );
|
|
virtual bool AllowBlockedExit( CBaseCombatCharacter *pPassenger, int nRole );
|
|
|
|
// Passengers take no damage except what we pass them
|
|
virtual bool PassengerShouldReceiveDamage( CTakeDamageInfo &info )
|
|
{
|
|
if ( GetServerVehicle() && GetServerVehicle()->IsPassengerExiting() )
|
|
return false;
|
|
|
|
return ( info.GetDamageType() & DMG_VEHICLE ) != 0;
|
|
}
|
|
|
|
virtual int ObjectCaps( void ) { return (BaseClass::ObjectCaps() | FCAP_NOTIFY_ON_TRANSITION); }
|
|
|
|
void SpawnRadarPanel();
|
|
void DestroyRadarPanel();
|
|
int NumRadarContacts() { return m_iNumRadarContacts; }
|
|
|
|
void AddPropToCargoHold( CPhysicsProp *pProp );
|
|
|
|
virtual CBaseEntity *OnFailedPhysGunPickup( Vector vPhysgunPos );
|
|
virtual void DriveVehicle( float flFrameTime, CUserCmd *ucmd, int iButtonsDown, int iButtonsReleased );
|
|
virtual int DrawDebugTextOverlays( void );
|
|
|
|
DECLARE_DATADESC();
|
|
|
|
protected:
|
|
void HazardBlinkThink( void );
|
|
void CreateHazardLights( void );
|
|
void DestroyHazardLights( void );
|
|
|
|
void UpdateCargoEntry( void );
|
|
void ReleasePropFromCargoHold( void );
|
|
void CreateCargoTrigger( void );
|
|
virtual float GetUprightTime( void ) { return 1.0f; }
|
|
virtual float GetUprightStrength( void );
|
|
virtual bool ShouldPuntUseLaunchForces( PhysGunForce_t reason ) { return ( reason == PHYSGUN_FORCE_PUNTED ); }
|
|
virtual void HandleWater( void );
|
|
|
|
virtual AngularImpulse PhysGunLaunchAngularImpulse( void );
|
|
virtual Vector PhysGunLaunchVelocity( const Vector &forward, float flMass );
|
|
bool PassengerInTransition( void );
|
|
|
|
void SetBusterHopperVisibility(bool visible);
|
|
|
|
private:
|
|
|
|
void UpdateWheelDust( void );
|
|
void UpdateRadar( bool forceUpdate = false );
|
|
|
|
void InputLockEntrance( inputdata_t &data );
|
|
void InputUnlockEntrance( inputdata_t &data );
|
|
void InputLockExit( inputdata_t &data );
|
|
void InputUnlockExit( inputdata_t &data );
|
|
void InputEnableRadar( inputdata_t &data );
|
|
void InputDisableRadar( inputdata_t &data );
|
|
void InputEnableRadarDetectEnemies( inputdata_t &data );
|
|
void InputAddBusterToCargo( inputdata_t &data );
|
|
void InputSetCargoVisibility( inputdata_t &data );
|
|
#ifdef MAPBASE
|
|
void InputEnableHazardLights( inputdata_t &data );
|
|
void InputDisableHazardLights( inputdata_t &data );
|
|
#endif
|
|
void InputOutsideTransition( inputdata_t &data );
|
|
#ifndef MAPBASE
|
|
void InputDisablePhysGun( inputdata_t &data );
|
|
void InputEnablePhysGun( inputdata_t &data );
|
|
#endif
|
|
void InputCreateLinkController( inputdata_t &data );
|
|
void InputDestroyLinkController( inputdata_t &data );
|
|
void CreateAvoidanceZone( void );
|
|
|
|
bool m_bEntranceLocked;
|
|
bool m_bExitLocked;
|
|
bool m_bAddingCargo;
|
|
bool m_bBlink;
|
|
|
|
#ifdef MAPBASE
|
|
bool m_bNoHazardLights;
|
|
#endif
|
|
|
|
float m_flCargoStartTime; // Time when the cargo was first added to the vehicle (used for animating into hold)
|
|
float m_flNextAvoidBroadcastTime; // Next time we'll warn entity to move out of us
|
|
|
|
COutputEvent m_OnCompanionEnteredVehicle; // Passenger has completed entering the vehicle
|
|
COutputEvent m_OnCompanionExitedVehicle; // Passenger has completed exited the vehicle
|
|
COutputEvent m_OnHostileEnteredVehicle; // Passenger has completed entering the vehicle
|
|
COutputEvent m_OnHostileExitedVehicle; // Passenger has completed exited the vehicle
|
|
|
|
CHandle< CParticleSystem > m_hWheelDust[NUM_WHEEL_EFFECTS];
|
|
CHandle< CParticleSystem > m_hWheelWater[NUM_WHEEL_EFFECTS];
|
|
CHandle< CVehicleCargoTrigger > m_hCargoTrigger;
|
|
CHandle< CPhysicsProp > m_hCargoProp;
|
|
|
|
CHandle< CSprite > m_hHazardLights[NUM_HAZARD_LIGHTS];
|
|
float m_flNextWaterSound;
|
|
|
|
bool m_bRadarEnabled;
|
|
bool m_bRadarDetectsEnemies;
|
|
float m_flNextRadarUpdateTime;
|
|
EHANDLE m_hRadarScreen;
|
|
|
|
EHANDLE m_hLinkControllerFront;
|
|
EHANDLE m_hLinkControllerRear;
|
|
|
|
bool m_bBusterHopperVisible; // is the hopper assembly visible on the vehicle? please do not set this directly - use the accessor funct.
|
|
|
|
CNetworkVar( int, m_iNumRadarContacts );
|
|
CNetworkArray( Vector, m_vecRadarContactPos, RADAR_MAX_CONTACTS );
|
|
CNetworkArray( int, m_iRadarContactType, RADAR_MAX_CONTACTS );
|
|
};
|
|
|
|
#endif // VEHICLE_JEEP_EPISODIC_H
|