upload "kind" alien swarm

This commit is contained in:
nillerusr
2023-10-03 17:23:56 +03:00
parent b7bd94c52e
commit 7d3c0d8b5a
4229 changed files with 462900 additions and 495155 deletions
+28 -19
View File
@@ -1,4 +1,4 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: A base class for model-based doors. The exact movement required to
// open or close the door is not dictated by this class, only that
@@ -46,6 +46,8 @@ public:
void Activate();
int ObjectCaps();
virtual bool IsAbleToCloseAreaPortals( void ) const;
void HandleAnimEvent( animevent_t *pEvent );
// Base class services.
@@ -55,13 +57,14 @@ public:
inline bool IsDoorAjar();
inline bool IsDoorOpening();
inline bool IsDoorClosed();
inline bool IsDoorClosing();
inline bool IsDoorLocked();
inline bool IsDoorClosing();
inline bool IsDoorBlocked() const;
inline bool IsNPCOpening(CAI_BaseNPC *pNPC);
inline bool IsPlayerOpening();
inline bool IsOpener(CBaseEntity *pEnt);
virtual bool IsDoorLocked() { return m_bLocked; }
bool NPCOpenDoor(CAI_BaseNPC *pNPC);
bool TestCollision( const Ray_t &ray, unsigned int mask, trace_t& trace );
// }
@@ -73,8 +76,16 @@ public:
virtual void GetNPCOpenData(CAI_BaseNPC *pNPC, opendata_t &opendata) = 0;
virtual float GetOpenInterval(void) = 0;
enum DoorExtent_t
{
DOOR_EXTENT_OPEN = 1,
DOOR_EXTENT_CLOSED = 2,
};
virtual void ComputeDoorExtent( Extent *extent, unsigned int extentType ) = 0; // extent contains the volume encompassing by the door in the specified states
// }
protected:
enum DoorState_t
@@ -94,11 +105,17 @@ protected:
inline void SetDoorState( DoorState_t eDoorState );
virtual void CalcDoorSounds();
float m_flAutoReturnDelay; // How many seconds to wait before automatically closing, -1 never closes automatically.
CUtlVector< CHandle< CBasePropDoor > > m_hDoorList; // List of doors linked to us
inline CBaseEntity *GetActivator();
int m_nHardwareType;
// Called when the door becomes fully closed.
virtual void OnDoorClosed() {}
private:
// Implement these in your leaf class.
@@ -106,10 +123,7 @@ private:
// Called when the door becomes fully open.
virtual void OnDoorOpened() {}
// Called when the door becomes fully closed.
virtual void OnDoorClosed() {}
// Called to tell the door to start opening.
// Called to tell the door to start opening.
virtual void BeginOpening(CBaseEntity *pOpenAwayFrom) = 0;
// Called to tell the door to start closing.
@@ -125,6 +139,10 @@ private:
virtual void DoorTeleportToSpawnPosition() = 0;
// }
protected:
void UpdateAreaPortals( bool bOpen );
void DisableAreaPortalThink( void );
private:
// Main entry points for the door base behaviors.
@@ -154,8 +172,6 @@ private:
void EndBlocked(void);
void OnEndBlocked( void );
void UpdateAreaPortals(bool bOpen);
// Input handlers
void InputClose(inputdata_t &inputdata);
void InputLock(inputdata_t &inputdata);
@@ -167,11 +183,6 @@ private:
void SetDoorBlocker( CBaseEntity *pBlocker );
void SetMaster( CBasePropDoor *pMaster ) { m_hMaster = pMaster; }
void CalcDoorSounds();
// }
int m_nHardwareType;
DoorState_t m_eDoorState; // Holds whether the door is open, closed, opening, or closing.
@@ -182,12 +193,15 @@ private:
EHANDLE m_hBlocker; // Entity blocking the door currently
bool m_bFirstBlocked; // Marker for being the first door (in a group) to be blocked (needed for motion control)
protected:
bool m_bForceClosed; // True if this door must close no matter what.
string_t m_SoundMoving;
string_t m_SoundOpen;
string_t m_SoundClose;
int m_nPhysicsMaterial;
// dvs: FIXME: can we remove m_flSpeed from CBaseEntity?
//float m_flSpeed; // Rotation speed when opening or closing in degrees per second.
@@ -242,11 +256,6 @@ bool CBasePropDoor::IsDoorClosing()
return m_eDoorState == DOOR_STATE_CLOSING;
}
bool CBasePropDoor::IsDoorLocked()
{
return m_bLocked;
}
CBaseEntity *CBasePropDoor::GetActivator()
{
return m_hActivator;