mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Added original SDK code for Alien Swarm.
This commit is contained in:
33
game/client/c_basetoggle.cpp
Normal file
33
game/client/c_basetoggle.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
// Copyright (c) 2007 Turtle Rock Studios, Inc.
|
||||
|
||||
#include "cbase.h"
|
||||
#include "c_basetoggle.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
IMPLEMENT_CLIENTCLASS_DT( C_BaseToggle, DT_BaseToggle, CBaseToggle )
|
||||
END_RECV_TABLE()
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
// Returns the velocity imparted to players standing on us.
|
||||
void C_BaseToggle::GetGroundVelocityToApply( Vector &vecGroundVel )
|
||||
{
|
||||
vecGroundVel = GetLocalVelocity();
|
||||
vecGroundVel.z = 0.0f; // don't give upward velocity, or it could predict players into the air.
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
IMPLEMENT_CLIENTCLASS_DT( C_BaseButton, DT_BaseButton, CBaseButton )
|
||||
RecvPropBool( RECVINFO( m_usable ) ),
|
||||
END_RECV_TABLE()
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
bool C_BaseButton::IsPotentiallyUsable( void )
|
||||
{
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user