mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-23 06:36:54 +00:00
36 lines
864 B
C++
36 lines
864 B
C++
|
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||
|
//
|
||
|
// Purpose:
|
||
|
//
|
||
|
//=============================================================================//
|
||
|
|
||
|
#include "cbase.h"
|
||
|
#include <KeyValues.h>
|
||
|
#include "sdk_weapon_parse.h"
|
||
|
|
||
|
|
||
|
FileWeaponInfo_t* CreateWeaponInfo()
|
||
|
{
|
||
|
return new CSDKWeaponInfo;
|
||
|
}
|
||
|
|
||
|
|
||
|
CSDKWeaponInfo::CSDKWeaponInfo()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
|
||
|
void CSDKWeaponInfo::Parse( KeyValues *pKeyValuesData, const char *szWeaponName )
|
||
|
{
|
||
|
BaseClass::Parse( pKeyValuesData, szWeaponName );
|
||
|
|
||
|
m_iDamage = pKeyValuesData->GetInt( "Damage", 42 ); // Douglas Adams 1952 - 2001
|
||
|
m_iBullets = pKeyValuesData->GetInt( "Bullets", 1 );
|
||
|
m_flCycleTime = pKeyValuesData->GetFloat( "CycleTime", 0.15 );
|
||
|
|
||
|
const char *pAnimEx = pKeyValuesData->GetString( "PlayerAnimationExtension", "mp5" );
|
||
|
Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) );
|
||
|
}
|
||
|
|
||
|
|