2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-01-29 15:07:57 +03:00

Merge branch 'master' of https://github.com/s1lentq/reapi into upstream-master

This commit is contained in:
Sergey Shorokhov 2021-09-11 12:20:38 +03:00
commit b49bf798ec
7 changed files with 127 additions and 15 deletions

View File

@ -291,7 +291,7 @@
#define SF_WALL_TOOGLE_NOTSOLID 0x0008
/**
* func_converyor
* func_conveyor
*/
#define SF_CONVEYOR_VISUAL 0x0001
#define SF_CONVEYOR_NOTSOLID 0x0002
@ -1338,3 +1338,13 @@ enum InfoMapBuyParam
#define BRIGHT_GUN_FLASH 512
#define NORMAL_GUN_FLASH 256
#define DIM_GUN_FLASH 128
/**
* Player zoom constants
* For m_iFOV
*/
#define DEFAULT_LARGE_AWP_ZOOM 10
#define DEFAULT_LARGE_OTHER_SNIPERS_ZOOM 15
#define DEFAULT_SMALL_SNIPERS_ZOOM 40
#define DEFAULT_AUG_SG552_ZOOM 55
#define DEFAULT_NO_ZOOM 90

View File

@ -702,33 +702,33 @@ enum EntVars
/*
* Description: -
* Member type: int
* Get params: get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, value);
* Member type: float
* Get params: Float:get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, Float:value);
*/
var_dmg_take,
/*
* Description: -
* Member type: int
* Get params: get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, value);
* Member type: float
* Get params: Float:get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, Float:value);
*/
var_dmg_save,
/*
* Description: -
* Member type: int
* Get params: get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, value);
* Member type: float
* Get params: Float:get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, Float:value);
*/
var_dmg,
/*
* Description: -
* Member type: int
* Get params: get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, value);
* Member type: float
* Get params: Float:get_entvar(index, EntVars:var);
* Set params: set_entvar(index, EntVars:var, Float:value);
*/
var_dmgtime,

View File

@ -342,6 +342,23 @@ native rg_multidmg_add(const inflictor, const victim, const Float:flDamage, cons
*/
native rg_fire_bullets(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const Bullet:iBulletType, const iTracerFreq, const iDamage);
/*
* Fires buckshots from entity.
*
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner)
* @param shots The number of shots
* @param vecSrc The source position of the barrel
* @param vecDirShooting Shooting direction
* @param vecSpread Spread
* @param flDistance Max shot distance
* @param iTracerFreq Tracer frequency
* @param iDamage Damage amount
*
* @noreturn
*/
native rg_fire_buckshots(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const iTracerFreq, const iDamage);
/*
* Fires bullets from player's weapon.
*

View File

@ -747,7 +747,7 @@ enum GamedllFunc_CBasePlayer
/*
* Description: Called when a player throws the grenade.
* Return type: CGrenade * (Entity index of hegrenade)
* Return type: CGrenade * (Entity index of grenade)
* Params: (const this, const grenade, Float:vecSrc[3], Float:vecThrow[3], Float:time, const usEvent)
*/
RG_CBasePlayer_ThrowGrenade,

View File

@ -40,8 +40,46 @@ public:
virtual ~CCSEntity() {}
virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) = 0;
virtual void FireBuckshots(ULONG cShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iTracerFreq, int iDamage, entvars_t *pevAttacker) = 0;
virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) = 0;
#if defined(_MSC_VER)
#pragma region reserve_vfuncs_Region
#endif
virtual void func_reserve1() {};
virtual void func_reserve2() {};
virtual void func_reserve3() {};
virtual void func_reserve4() {};
virtual void func_reserve5() {};
virtual void func_reserve6() {};
virtual void func_reserve7() {};
virtual void func_reserve8() {};
virtual void func_reserve9() {};
virtual void func_reserve10() {};
virtual void func_reserve11() {};
virtual void func_reserve12() {};
virtual void func_reserve13() {};
virtual void func_reserve14() {};
virtual void func_reserve15() {};
virtual void func_reserve16() {};
virtual void func_reserve17() {};
virtual void func_reserve18() {};
virtual void func_reserve19() {};
virtual void func_reserve20() {};
virtual void func_reserve21() {};
virtual void func_reserve22() {};
virtual void func_reserve23() {};
virtual void func_reserve24() {};
virtual void func_reserve25() {};
virtual void func_reserve26() {};
virtual void func_reserve27() {};
virtual void func_reserve28() {};
virtual void func_reserve29() {};
virtual void func_reserve30() {};
#if defined(_MSC_VER)
#pragma endregion
#endif
public:
CBaseEntity *m_pContainingEntity;
};
@ -74,4 +112,4 @@ public:
};
#define CSENTITY_API_INTERFACE_VERSION "CSENTITY_API_INTERFACE_VERSION001"
#define CSENTITY_API_INTERFACE_VERSION "CSENTITY_API_INTERFACE_VERSION002"

View File

@ -28,6 +28,10 @@ public:
{
return m_value;
}
operator ULONG() const
{
return ULONG(m_value);
}
operator size_t() const
{
return size_t(m_value);

View File

@ -325,6 +325,48 @@ cell AMX_NATIVE_CALL rg_fire_bullets(AMX *amx, cell *params)
return TRUE;
}
/*
* Fires buckshots from entity.
*
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner)
* @param shots The number of shots
* @param vecSrc The source position of the barrel
* @param vecDirShooting Shooting direction
* @param vecSpread Spread
* @param flDistance Max shot distance
* @param iTracerFreq Tracer frequency
* @param iDamage Damage amount
*
* @noreturn
*
* native rg_fire_buckshots(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const iTracerFreq, const iDamage);
*/
cell AMX_NATIVE_CALL rg_fire_buckshots(AMX *amx, cell *params)
{
enum args_e { arg_count, arg_inflictor, arg_attacker, arg_shots, arg_vecSrc, arg_dir, arg_spread, arg_dist, arg_tracefrq, arg_dmg };
CHECK_ISENTITY(arg_inflictor);
CHECK_ISENTITY(arg_attacker);
CAmxArgs args(amx, params);
CBaseEntity *pInflictor = args[arg_inflictor];
pInflictor->m_pEntity->FireBuckshots
(
args[arg_shots],
args[arg_vecSrc],
args[arg_dir],
args[arg_spread],
args[arg_dist],
args[arg_tracefrq],
args[arg_dmg],
args[arg_attacker]
);
return TRUE;
}
/*
* Fires bullets from player's weapon.
*
@ -2441,6 +2483,7 @@ AMX_NATIVE_INFO Misc_Natives_RG[] =
{ "rg_multidmg_add", rg_multidmg_add },
{ "rg_fire_bullets", rg_fire_bullets },
{ "rg_fire_buckshots", rg_fire_buckshots },
{ "rg_fire_bullets3", rg_fire_bullets3 },
{ "rg_round_end", rg_round_end },