WeaponMod константы
Версия от 12:08, 14 июня 2013; Nikita (обсуждение | вклад) (Новая страница: « == Максимальное количество доступного оружия == #define MAX_WEAPONS 32 == Отскакивающие гильзы ==…»)
Содержание
- 1 Максимальное количество доступного оружия
- 2 Отскакивающие гильзы
- 3 Громкость звуков оружия
- 4 Вспышки
- 5 Фраги оружия
- 6 Разброс оружия
- 7 For CLASSIFY
- 8 Grenade explosion flags
- 9 Анимация игрока
- 10 Форварды для аммобоксов
- 11 Типы форвардов для оружия
- 12 Информация о патронах
- 13 Информация о предметах
- 14 Оффсеты
Максимальное количество доступного оружия
#define MAX_WEAPONS 32
Отскакивающие гильзы
#define TE_BOUNCE_NULL 0 // Без звука. #define TE_BOUNCE_SHELL 1 // Обычная гильза. #define TE_BOUNCE_SHOTSHELL 2 // Гильза от патронов для дробовиков.
Громкость звуков оружия
#define LOUD_GUN_VOLUME 1000 #define NORMAL_GUN_VOLUME 600 #define QUIET_GUN_VOLUME 200
Вспышки
#define BRIGHT_GUN_FLASH 512 #define NORMAL_GUN_FLASH 256 #define DIM_GUN_FLASH 128
Фраги оружия
#define ITEM_FLAG_SELECTONEMPTY 1 #define ITEM_FLAG_NOAUTORELOAD 2 #define ITEM_FLAG_NOAUTOSWITCHEMPTY 4 #define ITEM_FLAG_LIMITINWORLD 8 #define ITEM_FLAG_EXHAUSTIBLE 16 // A player can totally exhaust their ammo supply and lose this weapon
Разброс оружия
#define VECTOR_CONE_1DEGREES Float:{ 0.00873, 0.00873, 0.00873 }
#define VECTOR_CONE_2DEGREES Float:{ 0.01745, 0.01745, 0.01745 }
#define VECTOR_CONE_3DEGREES Float:{ 0.02618, 0.02618, 0.02618 }
#define VECTOR_CONE_4DEGREES Float:{ 0.03490, 0.03490, 0.03490 }
#define VECTOR_CONE_5DEGREES Float:{ 0.04362, 0.04362, 0.04362 }
#define VECTOR_CONE_6DEGREES Float:{ 0.05234, 0.05234, 0.05234 }
#define VECTOR_CONE_7DEGREES Float:{ 0.06105, 0.06105, 0.06105 }
#define VECTOR_CONE_8DEGREES Float:{ 0.06976, 0.06976, 0.06976 }
#define VECTOR_CONE_9DEGREES Float:{ 0.07846, 0.07846, 0.07846 }
#define VECTOR_CONE_10DEGREES Float:{ 0.08716, 0.08716, 0.08716 }
#define VECTOR_CONE_15DEGREES Float:{ 0.13053, 0.13053, 0.13053 }
#define VECTOR_CONE_20DEGREES Float:{ 0.17365, 0.17365, 0.17365 }
For CLASSIFY
#define CLASS_NONE 0 #define CLASS_MACHINE 1 #define CLASS_PLAYER 2 #define CLASS_HUMAN_PASSIVE 3 #define CLASS_HUMAN_MILITARY 4 #define CLASS_ALIEN_MILITARY 5 #define CLASS_ALIEN_PASSIVE 6 #define CLASS_ALIEN_MONSTER 7 #define CLASS_ALIEN_PREY 8 #define CLASS_ALIEN_PREDATOR 9 #define CLASS_INSECT 10 #define CLASS_PLAYER_ALLY 11 #define CLASS_PLAYER_BIOWEAPON 12 // Hornets and snarks, launched by players #define CLASS_ALIEN_BIOWEAPON 13 // Hornets and snarks, launched by the alien menace
Grenade explosion flags
#define SF_EXPLOSION_NODAMAGE ( 1 << 0 ) // When set, explosion will not actually inflict damage #define SF_EXPLOSION_NOFIREBALL ( 1 << 1 ) // Don't draw the fireball #define SF_EXPLOSION_NOSMOKE ( 1 << 2 ) // Don't draw the smoke #define SF_EXPLOSION_NODECAL ( 1 << 3 ) // Don't make a scorch mark #define SF_EXPLOSION_NOSPARKS ( 1 << 4 ) // Don't make a sparks #define SF_EXPLOSION_NODEBRIS ( 1 << 5 ) // Don't make a debris sound
Анимация игрока
enum PLAYER_ANIM
{
PLAYER_IDLE,
PLAYER_WALK,
PLAYER_JUMP,
PLAYER_SUPERJUMP,
PLAYER_DIE,
PLAYER_ATTACK1,
};
Форварды для аммобоксов
enum e_AmmoFwds
{
/**
* Forward params for all functions:
*
* @param iItem Ammobox's entity index.
*/
Fwd_Ammo_Spawn, /* This is called whenever a ammobox entity is created. */
Fwd_Ammo_AddAmmo,
Fwd_Ammo_End
};
Типы форвардов для оружия
enum e_WpnFwds
{
/**
* Forward params for all functions:
*
* @param iItem Weapon's entity index.
* @param iPlayer Player index, owner of weapon.
* @param iClip Amount of ammo in weapon's clip.
* @param iAmmo Amount of ammo in backpack on a user for weapon.
*/
Fwd_Wpn_Spawn, /* This is called whenever a weapon entity is created. */
Fwd_Wpn_CanDeploy, /* Whether or not this weapon can be deployed. */
Fwd_Wpn_Deploy, /* Deploys a weapon. */
Fwd_Wpn_Idle, /* Displays the idle animation for the weapon. */
Fwd_Wpn_PrimaryAttack, /* Called when the main attack of a weapon is triggered. */
Fwd_Wpn_SecondaryAttack, /* Called when the secondary attack of a weapon is triggered. */
Fwd_Wpn_Reload, /* Called when the weapon is reloaded. */
Fwd_Wpn_CanHolster, /* Whether or not the weapon can be holstered. */
Fwd_Wpn_Holster, /* Holsters a weapon. */
Fwd_Wpn_IsUseable, /* Whether or not the weapon is usable. (has ammo, etc.) */
Fwd_Wpn_AddToPlayer,
Fwd_Wpn_AddToPlayer2,
Fwd_Wpn_ItemPostFrame,
Fwd_Wpn_End
};
Информация о патронах
enum e_AmmoInfo
{
AmmoInfo_szName,
AmmoInfo_End
};
Информация о предметах
enum e_ItemInfo
{
ItemInfo_bCustom,
ItemInfo_iSlot,
ItemInfo_iPosition,
ItemInfo_iMaxAmmo1,
ItemInfo_iMaxAmmo2,
ItemInfo_iMaxClip,
ItemInfo_iId,
ItemInfo_iFlags,
ItemInfo_iWeight,
ItemInfo_szName,
ItemInfo_szAmmo1,
ItemInfo_szAmmo2,
ItemInfo_szTitle,
ItemInfo_szAuthor,
ItemInfo_szVersion,
ItemInfo_End
};
Оффсеты
enum e_Offsets
{
// Weapon
Offset_flStartThrow,
Offset_flReleaseThrow,
Offset_iChargeReady,
Offset_iInAttack,
Offset_iFireState,
Offset_iFireOnEmpty, // True when the gun is empty and the player is still holding down the attack key(s).
Offset_flPumpTime,
Offset_iInSpecialReload, // Are we in the middle of a reload for the shotguns.
Offset_flNextPrimaryAttack, // Soonest time ItemPostFrame will call PrimaryAttack.
Offset_flNextSecondaryAttack, // Soonest time ItemPostFrame will call SecondaryAttack.
Offset_flTimeWeaponIdle, // Soonest time ItemPostFrame will call WeaponIdle.
Offset_iPrimaryAmmoType, // "Primary" ammo index into players m_rgAmmo[].
Offset_iSecondaryAmmoType, // "Secondary" ammo index into players m_rgAmmo[].
Offset_iClip, // Number of shots left in the primary weapon clip, -1 it not used.
Offset_iInReload, // Are we in the middle of a reload.
Offset_iDefaultAmmo, // How much ammo you get when you pick up this weapon as placed by a level designer.
// Player
Offset_flNextAttack, // Cannot attack again until this time.
Offset_iWeaponVolume, // How loud the player's weapon is right now.
Offset_iWeaponFlash, // Brightness of the weapon flash.
Offset_iLastHitGroup, // The last body region that took damage.
Offset_iFOV, // Field of view.
// Custom (for weapon and "info_target" entities only)
Offset_iuser1,
Offset_iuser2,
Offset_iuser3,
Offset_iuser4,
Offset_fuser1,
Offset_fuser2,
Offset_fuser3,
Offset_fuser4,
Offset_End
};
<pre>
== Прочее ==
<pre>
enum e_CBase
{
// Weapon
CBase_pPlayer,
CBase_pNext,
// Player
CBase_rgpPlayerItems,
CBase_pActiveItem,
CBase_pLastItem,
CBase_End
};