mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 22:55:41 +03:00
WIP: Reversed functions all weapons
This commit is contained in:
parent
0fc3351cb8
commit
dc557b37f2
@ -294,7 +294,7 @@ bool CCSBot::IsUsingPistol(void)
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO: check it, from the dwarf should be used function IsPistol
|
||||
// TODO: check it, from the dwarf should be used function IsPistol
|
||||
// {
|
||||
// class CBasePlayerWeapon *gun; // 640
|
||||
// IsPistol(CBasePlayerWeapon *const this); // 642
|
||||
|
@ -181,11 +181,10 @@
|
||||
#define C_EXPORT
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
enum hash_types_e
|
||||
{
|
||||
CLASSNAME
|
||||
|
||||
} hash_types_e;
|
||||
};
|
||||
|
||||
typedef struct hash_item_s
|
||||
{
|
||||
@ -230,6 +229,7 @@ typedef enum
|
||||
|
||||
} TRAIN_CODE;
|
||||
|
||||
// Things that toggle (buttons/triggers/doors) need this
|
||||
typedef enum
|
||||
{
|
||||
TS_AT_TOP,
|
||||
|
@ -4689,7 +4689,7 @@ int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *ho
|
||||
UTIL_UnsetGroupTrace();
|
||||
}
|
||||
|
||||
Q_memset(state, 0, sizeof(*state));
|
||||
Q_memset(state, 0, sizeof(entity_state_t));
|
||||
|
||||
state->number = e;
|
||||
state->entityType = ENTITY_NORMAL;
|
||||
|
@ -84,12 +84,8 @@ void CGrenade::Explode(TraceResult *pTrace, int bitsDamageType)
|
||||
|
||||
switch (RANDOM_LONG(0, 1))
|
||||
{
|
||||
case 0:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-2.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 1:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-1.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 0: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-2.wav", 0.55, ATTN_NORM); break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-1.wav", 0.55, ATTN_NORM); break;
|
||||
}
|
||||
|
||||
pev->effects |= EF_NODRAW;
|
||||
@ -211,13 +207,9 @@ void CGrenade::Explode2(TraceResult *pTrace, int bitsDamageType)
|
||||
|
||||
switch (RANDOM_LONG(0, 2))
|
||||
{
|
||||
case 0:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris1.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris2.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 2: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris3.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 0: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris1.wav", 0.55, ATTN_NORM); break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris2.wav", 0.55, ATTN_NORM); break;
|
||||
case 2: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris3.wav", 0.55, ATTN_NORM); break;
|
||||
}
|
||||
|
||||
pev->effects |= EF_NODRAW;
|
||||
@ -294,15 +286,9 @@ void CGrenade::Explode3(TraceResult *pTrace, int bitsDamageType)
|
||||
|
||||
switch (RANDOM_LONG(0, 2))
|
||||
{
|
||||
case 0:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris1.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 1:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris2.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 2:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris3.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 0: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris1.wav", 0.55, ATTN_NORM); break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris2.wav", 0.55, ATTN_NORM); break;
|
||||
case 2: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/debris3.wav", 0.55, ATTN_NORM); break;
|
||||
}
|
||||
|
||||
pev->effects |= EF_NODRAW;
|
||||
@ -347,12 +333,8 @@ NOXREF void CGrenade::SG_Explode(TraceResult *pTrace, int bitsDamageType)
|
||||
|
||||
switch (RANDOM_LONG(0, 1))
|
||||
{
|
||||
case 0:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-2.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 1:
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-1.wav", 0.55, ATTN_NORM);
|
||||
break;
|
||||
case 0: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-2.wav", 0.55, ATTN_NORM); break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/flashbang-1.wav", 0.55, ATTN_NORM); break;
|
||||
}
|
||||
|
||||
pev->effects |= EF_NODRAW;
|
||||
@ -768,12 +750,9 @@ void CGrenade::__MAKE_VHOOK(BounceSound)(void)
|
||||
|
||||
switch (RANDOM_LONG(0, 2))
|
||||
{
|
||||
case 0: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/grenade_hit1.wav", 0.25, ATTN_NORM);
|
||||
break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/grenade_hit2.wav", 0.25, ATTN_NORM);
|
||||
break;
|
||||
case 2: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/grenade_hit3.wav", 0.25, ATTN_NORM);
|
||||
break;
|
||||
case 0: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/grenade_hit1.wav", 0.25, ATTN_NORM); break;
|
||||
case 1: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/grenade_hit2.wav", 0.25, ATTN_NORM); break;
|
||||
case 2: EMIT_SOUND(ENT(pev), CHAN_VOICE, "weapons/grenade_hit3.wav", 0.25, ATTN_NORM); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -935,10 +914,22 @@ CGrenade *CGrenade::ShootTimed2(entvars_t *pevOwner, Vector vecStart, Vector vec
|
||||
|
||||
return pGrenade;
|
||||
}
|
||||
|
||||
extern bool bActivateGo;
|
||||
/* <b9dd0> ../cstrike/dlls/ggrenade.cpp:1069 */
|
||||
CGrenade *CGrenade::ShootTimed(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time)
|
||||
{
|
||||
/*if (bActivateGo)
|
||||
{
|
||||
static int iNum = 0;
|
||||
|
||||
_logf("#%d. vecStart: (%.12f, %.12f, %.12f) | vecVelocity: (%.12f, %.12f, %.12f)", iNum,
|
||||
vecStart[0], vecStart[1], vecStart[2],
|
||||
vecVelocity[0], vecVelocity[1], vecVelocity[2]);
|
||||
|
||||
//_logf("\n\n");
|
||||
iNum++;
|
||||
}*/
|
||||
|
||||
CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL);
|
||||
pGrenade->Spawn();
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
*/
|
||||
#ifndef HOOK_GAMEDLL
|
||||
|
||||
cvar_t cv_hostage_stop = { "hostage_stop", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||
cvar_t cv_hostage_debug = { "hostage_debug", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||
cvar_t cv_hostage_stop = { "hostage_stop", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||
|
||||
#else
|
||||
|
||||
|
@ -1775,7 +1775,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(RestartRound)(void)
|
||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||
{
|
||||
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||
|
||||
|
||||
if (plr && !FNullEnt(plr->pev))
|
||||
plr->Reset();
|
||||
}
|
||||
|
@ -856,10 +856,13 @@ void CBasePlayer::__MAKE_VHOOK(TraceAttack)(entvars_t *pevAttacker, float flDama
|
||||
bool bShouldSpark = false;
|
||||
bool bHitShield = IsHittingShield(vecDir, ptr);
|
||||
|
||||
CBasePlayer *pAttacker = (CBasePlayer *)CBasePlayer::Instance(pevAttacker);
|
||||
CBasePlayer *pAttacker = (CBasePlayer *)CBaseEntity::Instance(pevAttacker);
|
||||
|
||||
if (m_iTeam == pAttacker->m_iTeam && CVAR_GET_FLOAT("mp_friendlyfire") == 0)
|
||||
bShouldBleed = false;
|
||||
if (pAttacker->IsPlayer()) // REGAMEDLL_FIXES
|
||||
{
|
||||
if (m_iTeam == pAttacker->m_iTeam && CVAR_GET_FLOAT("mp_friendlyfire") == 0)
|
||||
bShouldBleed = false;
|
||||
}
|
||||
|
||||
if (pev->takedamage == DAMAGE_NO)
|
||||
return;
|
||||
@ -9388,34 +9391,34 @@ int CBasePlayer::Classify(void)
|
||||
return Classify_();
|
||||
}
|
||||
|
||||
void CBasePlayer::TraceAttack(entvars_t *pevAttacker,float flDamage,Vector vecDir,TraceResult *ptr,int bitsDamageType)
|
||||
void CBasePlayer::TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType)
|
||||
{
|
||||
TraceAttack_(pevAttacker,flDamage,vecDir,ptr,bitsDamageType);
|
||||
TraceAttack_(pevAttacker, flDamage, vecDir, ptr, bitsDamageType);
|
||||
}
|
||||
|
||||
int CBasePlayer::TakeDamage(entvars_t *pevInflictor,entvars_t *pevAttacker,float flDamage,int bitsDamageType)
|
||||
int CBasePlayer::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
||||
{
|
||||
return TakeDamage_(pevInflictor,pevAttacker,flDamage,bitsDamageType);
|
||||
return TakeDamage_(pevInflictor, pevAttacker, flDamage, bitsDamageType);
|
||||
}
|
||||
|
||||
int CBasePlayer::TakeHealth(float flHealth,int bitsDamageType)
|
||||
int CBasePlayer::TakeHealth(float flHealth, int bitsDamageType)
|
||||
{
|
||||
return TakeHealth_(flHealth,bitsDamageType);
|
||||
return TakeHealth_(flHealth, bitsDamageType);
|
||||
}
|
||||
|
||||
void CBasePlayer::Killed(entvars_t *pevAttacker,int iGib)
|
||||
void CBasePlayer::Killed(entvars_t *pevAttacker, int iGib)
|
||||
{
|
||||
Killed_(pevAttacker,iGib);
|
||||
Killed_(pevAttacker, iGib);
|
||||
}
|
||||
|
||||
void CBasePlayer::AddPoints(int score,BOOL bAllowNegativeScore)
|
||||
void CBasePlayer::AddPoints(int score, BOOL bAllowNegativeScore)
|
||||
{
|
||||
AddPoints_(score,bAllowNegativeScore);
|
||||
AddPoints_(score, bAllowNegativeScore);
|
||||
}
|
||||
|
||||
void CBasePlayer::AddPointsToTeam(int score,BOOL bAllowNegativeScore)
|
||||
void CBasePlayer::AddPointsToTeam(int score, BOOL bAllowNegativeScore)
|
||||
{
|
||||
AddPointsToTeam_(score,bAllowNegativeScore);
|
||||
AddPointsToTeam_(score, bAllowNegativeScore);
|
||||
}
|
||||
|
||||
BOOL CBasePlayer::AddPlayerItem(CBasePlayerItem *pItem)
|
||||
@ -9428,9 +9431,9 @@ BOOL CBasePlayer::RemovePlayerItem(CBasePlayerItem *pItem)
|
||||
return RemovePlayerItem_(pItem);
|
||||
}
|
||||
|
||||
int CBasePlayer::GiveAmmo(int iAmount,char *szName,int iMax)
|
||||
int CBasePlayer::GiveAmmo(int iAmount, char *szName, int iMax)
|
||||
{
|
||||
return GiveAmmo_(iAmount,szName,iMax);
|
||||
return GiveAmmo_(iAmount, szName, iMax);
|
||||
}
|
||||
|
||||
const char *CBasePlayer::TeamID(void)
|
||||
@ -9498,9 +9501,9 @@ Vector CBasePlayer::GetAutoaimVector(float flDelta)
|
||||
return GetAutoaimVector_(flDelta);
|
||||
}
|
||||
|
||||
void CBasePlayer::Blind(float flUntilTime,float flHoldTime,float flFadeTime,int iAlpha)
|
||||
void CBasePlayer::Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha)
|
||||
{
|
||||
Blind_(flUntilTime,flHoldTime,flFadeTime,iAlpha);
|
||||
Blind_(flUntilTime, flHoldTime, flFadeTime, iAlpha);
|
||||
}
|
||||
|
||||
void CStripWeapons::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||
|
@ -807,7 +807,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
enum { MaxLocationLen = 32 };
|
||||
|
||||
int random_seed;
|
||||
|
@ -953,7 +953,7 @@ void CTriggerMultiple::__MAKE_VHOOK(Spawn)(void)
|
||||
|
||||
//if (pev->health > 0)
|
||||
//{
|
||||
// if (FBitSet(pev->spawnflags, SPAWNFLAG_NOTOUCH))
|
||||
// if (pev->spawnflags & SPAWNFLAG_NOTOUCH)
|
||||
// {
|
||||
// ALERT(at_error, "trigger_multiple spawn: health and notouch don't make sense");
|
||||
// }
|
||||
@ -2337,7 +2337,7 @@ void CTriggerCamera::Move(void)
|
||||
{
|
||||
FireTargets(STRING(m_pentPath->pev->message), this, this, USE_TOGGLE, 0);
|
||||
|
||||
if (m_pentPath->pev->spawnflags, SF_CORNER_FIREONCE)
|
||||
if (m_pentPath->pev->spawnflags & SF_CORNER_FIREONCE)
|
||||
{
|
||||
m_pentPath->pev->message = 0;
|
||||
}
|
||||
|
@ -580,10 +580,21 @@ CBaseEntity *UTIL_PlayerByIndex(int playerIndex)
|
||||
|
||||
return pPlayer;
|
||||
}
|
||||
|
||||
extern bool bActivateGo;
|
||||
/* <1abab0> ../cstrike/dlls/util.cpp:728 */
|
||||
void UTIL_MakeVectors(const Vector &vecAngles)
|
||||
{
|
||||
|
||||
/*if (bActivateGo)
|
||||
{
|
||||
static int iNum = 0;
|
||||
|
||||
_logf("#%d. vecAngles: (%.12f, %.12f, %.12f)", iNum,
|
||||
vecAngles[0], vecAngles[1], vecAngles[2]);
|
||||
|
||||
//_logf("\n\n");
|
||||
iNum++;
|
||||
}*/
|
||||
MAKE_VECTORS(vecAngles);
|
||||
}
|
||||
|
||||
|
@ -665,16 +665,16 @@ void CBasePlayerItem::DefaultTouch(CBaseEntity *pOther)
|
||||
/* <1d3371> ../cstrike/dlls/weapons.cpp:678 */
|
||||
void CBasePlayerWeapon::SetPlayerShieldAnim(void)
|
||||
{
|
||||
if (m_pPlayer->HasShield())
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shield");
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgun");
|
||||
}
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shield");
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgun");
|
||||
}
|
||||
}
|
||||
|
||||
@ -704,16 +704,8 @@ void CBasePlayerWeapon::EjectBrassLate(void)
|
||||
vecShellVelocity = (m_pPlayer->pev->velocity + vecRight + vecUp) + gpGlobals->v_forward * 25;
|
||||
soundType = (m_iId == WEAPON_XM1014 || m_iId == WEAPON_M3) ? 2 : 1;
|
||||
|
||||
EjectBrass
|
||||
(
|
||||
pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_up * -9 + gpGlobals->v_forward * 16,
|
||||
gpGlobals->v_right * -9,
|
||||
vecShellVelocity,
|
||||
pev->angles.y,
|
||||
m_iShellId,
|
||||
soundType,
|
||||
ENTINDEX(ENT(m_pPlayer->pev))
|
||||
);
|
||||
EjectBrass(pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_up * -9 + gpGlobals->v_forward * 16, gpGlobals->v_right * -9,
|
||||
vecShellVelocity, pev->angles.y, m_iShellId, soundType, m_pPlayer->entindex());
|
||||
}
|
||||
|
||||
/* <1d372a> ../cstrike/dlls/weapons.cpp:717 */
|
||||
@ -739,7 +731,7 @@ bool CBasePlayerWeapon::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) != WPNSTATE_SHIELD_DRAWN);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
m_flNextSecondaryAttack = 0.4f;
|
||||
@ -824,21 +816,8 @@ void CBasePlayerWeapon::FireRemaining(int &shotsFired, float &shootTime, BOOL bI
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, gpGlobals->v_forward, 0.05, 8192, 1, BULLET_PLAYER_9MM, 18, 0.9, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
m_pPlayer->ammo_9mm--;
|
||||
|
||||
PLAYBACK_EVENT_FULL
|
||||
(
|
||||
flag,
|
||||
ENT(m_pPlayer->pev),
|
||||
m_usFireGlock18,
|
||||
0,
|
||||
(float *)&g_vecZero,
|
||||
(float *)&g_vecZero,
|
||||
vecDir.x,
|
||||
vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 10000.0),
|
||||
(int)(m_pPlayer->pev->punchangle.y * 10000.0),
|
||||
m_iClip == 0,
|
||||
0
|
||||
);
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireGlock18, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 10000), (int)(m_pPlayer->pev->punchangle.y * 10000), m_iClip == 0, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -846,21 +825,8 @@ void CBasePlayerWeapon::FireRemaining(int &shotsFired, float &shootTime, BOOL bI
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, gpGlobals->v_forward, m_fBurstSpread, 8192, 2, BULLET_PLAYER_556MM, 30, 0.96, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
m_pPlayer->ammo_556nato--;
|
||||
|
||||
PLAYBACK_EVENT_FULL
|
||||
(
|
||||
flag,
|
||||
ENT(m_pPlayer->pev),
|
||||
m_usFireFamas,
|
||||
0,
|
||||
(float *)&g_vecZero,
|
||||
(float *)&g_vecZero,
|
||||
vecDir.x,
|
||||
vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 10000000.0),
|
||||
(int)(m_pPlayer->pev->punchangle.y * 10000000.0),
|
||||
0,
|
||||
0
|
||||
);
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireFamas, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 10000000), (int)(m_pPlayer->pev->punchangle.y * 10000000), FALSE, FALSE);
|
||||
}
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
@ -1819,13 +1785,10 @@ void CWeaponBox::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
|
||||
else
|
||||
ClientPrint(pPlayer->pev, HUD_PRINTCENTER, "#Got_bomb");
|
||||
|
||||
UTIL_LogPrintf
|
||||
(
|
||||
"\"%s<%i><%s><TERRORIST>\" triggered \"Got_The_Bomb\"\n",
|
||||
UTIL_LogPrintf("\"%s<%i><%s><TERRORIST>\" triggered \"Got_The_Bomb\"\n",
|
||||
STRING(pPlayer->pev->netname),
|
||||
GETPLAYERUSERID(pPlayer->edict()),
|
||||
GETPLAYERAUTHID(pPlayer->edict())
|
||||
);
|
||||
GETPLAYERAUTHID(pPlayer->edict()));
|
||||
|
||||
g_pGameRules->m_bBombDropped = FALSE;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -159,7 +159,7 @@ enum ClipGiveDefault
|
||||
FAMAS_DEFAULT_GIVE = 25,
|
||||
USP_DEFAULT_GIVE = 12,
|
||||
AWP_DEFAULT_GIVE = 10,
|
||||
MP5N_DEFAULT_GIVE = 30,
|
||||
MP5NAVY_DEFAULT_GIVE = 30,
|
||||
M249_DEFAULT_GIVE = 100,
|
||||
M3_DEFAULT_GIVE = 8,
|
||||
M4A1_DEFAULT_GIVE = 30,
|
||||
@ -205,8 +205,8 @@ enum WeightWeapon
|
||||
{
|
||||
P228_WEIGHT = 5,
|
||||
GLOCK18_WEIGHT = 5,
|
||||
SCOUT_WEIGHT = 20,
|
||||
HEGRENADE_WEIGHT = 1,
|
||||
SCOUT_WEIGHT = 30,
|
||||
HEGRENADE_WEIGHT = 2,
|
||||
XM1014_WEIGHT = 20,
|
||||
C4_WEIGHT = 3,
|
||||
MAC10_WEIGHT = 25,
|
||||
@ -217,20 +217,20 @@ enum WeightWeapon
|
||||
UMP45_WEIGHT = 25,
|
||||
SG550_WEIGHT = 20,
|
||||
GALIL_WEIGHT = 25,
|
||||
FAMAS_WEIGHT = 75,//
|
||||
USP_WEIGHT = 5,//
|
||||
AWP_WEIGHT = 30,//
|
||||
MP5N_WEIGHT = 25,
|
||||
FAMAS_WEIGHT = 75,
|
||||
USP_WEIGHT = 5,
|
||||
AWP_WEIGHT = 30,
|
||||
MP5NAVY_WEIGHT = 25,
|
||||
M249_WEIGHT = 25,
|
||||
M3_WEIGHT = 20,
|
||||
M4A1_WEIGHT = 25,
|
||||
TMP_WEIGHT = 30,
|
||||
TMP_WEIGHT = 25,
|
||||
G3SG1_WEIGHT = 20,
|
||||
FLASHBANG_WEIGHT = 1,
|
||||
DEAGLE_WEIGHT = 7,
|
||||
SG552_WEIGHT = 25,
|
||||
AK47_WEIGHT = 25,
|
||||
P90_WEIGHT = 26,//
|
||||
P90_WEIGHT = 26,
|
||||
KNIFE_WEIGHT = 0,
|
||||
};
|
||||
|
||||
@ -246,6 +246,11 @@ enum MaxAmmoType
|
||||
MAX_AMMO_338MAGNUM = 30,
|
||||
MAX_AMMO_57MM = 100,
|
||||
MAX_AMMO_357SIG = 52,
|
||||
|
||||
// custom
|
||||
MAX_AMMO_SMOKEGRENADE = 1,
|
||||
MAX_AMMO_HEGRENADE = 1,
|
||||
MAX_AMMO_FLASHBANG = 2,
|
||||
};
|
||||
|
||||
enum AmmoType
|
||||
@ -316,17 +321,24 @@ enum shieldgun_e
|
||||
SHIELDGUN_DOWN,
|
||||
};
|
||||
|
||||
typedef enum
|
||||
//custom
|
||||
enum shieldgren_e
|
||||
{
|
||||
SHIELDREN_IDLE = 4,
|
||||
SHIELDREN_UP,
|
||||
SHIELDREN_DOWN
|
||||
};
|
||||
|
||||
enum InventorySlotType
|
||||
{
|
||||
PRIMARY_WEAPON_SLOT = 1,
|
||||
PISTOL_SLOT,
|
||||
KNIFE_SLOT,
|
||||
GRENADE_SLOT,
|
||||
C4_SLOT,
|
||||
};
|
||||
|
||||
} InventorySlotType;
|
||||
|
||||
typedef enum
|
||||
enum WeaponType
|
||||
{
|
||||
PISTOL = 0,
|
||||
SHOTGUN,
|
||||
@ -336,10 +348,9 @@ typedef enum
|
||||
SNIPER_RIFLE,
|
||||
GRENADE,
|
||||
NUM_WEAPON_TYPES,
|
||||
|
||||
} WeaponType;
|
||||
|
||||
typedef enum
|
||||
};
|
||||
|
||||
enum Bullet
|
||||
{
|
||||
BULLET_NONE = 0,
|
||||
BULLET_PLAYER_9MM,
|
||||
@ -357,44 +368,35 @@ typedef enum
|
||||
BULLET_PLAYER_50AE,
|
||||
BULLET_PLAYER_57MM,
|
||||
BULLET_PLAYER_357SIG,
|
||||
};
|
||||
|
||||
} Bullet;
|
||||
|
||||
typedef struct
|
||||
struct AutoBuyInfoStruct
|
||||
{
|
||||
AutoBuyClassType m_class;
|
||||
char *m_command;
|
||||
char *m_classname;
|
||||
};/* size: 12, cachelines: 1, members: 3 */
|
||||
|
||||
} AutoBuyInfoStruct;
|
||||
/* size: 12, cachelines: 1, members: 3 */
|
||||
|
||||
typedef struct
|
||||
struct WeaponAliasInfo
|
||||
{
|
||||
char *alias;
|
||||
WeaponIdType id;
|
||||
};/* size: 8, cachelines: 1, members: 2 */
|
||||
|
||||
} WeaponAliasInfo;
|
||||
/* size: 8, cachelines: 1, members: 2 */
|
||||
|
||||
typedef struct
|
||||
struct WeaponBuyAliasInfo
|
||||
{
|
||||
char *alias;
|
||||
WeaponIdType id;
|
||||
char *failName;
|
||||
};/* size: 12, cachelines: 1, members: 3 */
|
||||
|
||||
} WeaponBuyAliasInfo;
|
||||
/* size: 12, cachelines: 1, members: 3 */
|
||||
|
||||
typedef struct
|
||||
struct WeaponClassAliasInfo
|
||||
{
|
||||
char *alias;
|
||||
WeaponClassType id;
|
||||
};/* size: 8, cachelines: 1, members: 2 */
|
||||
|
||||
} WeaponClassAliasInfo;
|
||||
/* size: 8, cachelines: 1, members: 2 */
|
||||
|
||||
typedef struct
|
||||
struct WeaponInfoStruct
|
||||
{
|
||||
int id;
|
||||
int cost;
|
||||
@ -404,9 +406,7 @@ typedef struct
|
||||
int maxRounds;
|
||||
int ammoType;
|
||||
char *entityName;
|
||||
|
||||
} WeaponInfoStruct;
|
||||
/* size: 32, cachelines: 1, members: 8 */
|
||||
};/* size: 32, cachelines: 1, members: 8 */
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
|
@ -1,68 +1,219 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define AK47_MAX_SPEED 221
|
||||
|
||||
#define AK47_DAMAGE 36
|
||||
#define AK47_RANGE_MODIFER 0.98
|
||||
|
||||
#define AK47_RELOAD_TIME 2.45
|
||||
|
||||
enum ak47_e
|
||||
{
|
||||
AK47_IDLE1,
|
||||
AK47_RELOAD,
|
||||
AK47_DRAW,
|
||||
AK47_SHOOT1,
|
||||
AK47_SHOOT2,
|
||||
AK47_SHOOT3
|
||||
};
|
||||
|
||||
/* <23556d> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_ak47, CAK47);
|
||||
|
||||
/* <235327> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:52 */
|
||||
NOBODY void CAK47::__MAKE_VHOOK(Spawn)(void)
|
||||
void CAK47::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_AK47;
|
||||
SET_MODEL(edict(), "models/w_ak47.mdl");
|
||||
|
||||
m_iDefaultAmmo = AK47_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <235280> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:66 */
|
||||
NOBODY void CAK47::__MAKE_VHOOK(Precache)(void)
|
||||
void CAK47::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_ak47.mdl");
|
||||
PRECACHE_MODEL("models/w_ak47.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/ak47-1.wav");
|
||||
PRECACHE_SOUND("weapons/ak47-2.wav");
|
||||
PRECACHE_SOUND("weapons/ak47_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/ak47_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/ak47_boltpull.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireAK47 = PRECACHE_EVENT(1, "events/ak47.sc");
|
||||
}
|
||||
|
||||
/* <2352a7> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:82 */
|
||||
NOBODY int CAK47::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
int CAK47::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "762Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_762NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = AK47_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 1;
|
||||
p->iId = m_iId = WEAPON_AK47;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = AK47_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <235300> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:99 */
|
||||
NOBODY BOOL CAK47::__MAKE_VHOOK(Deploy)(void)
|
||||
BOOL CAK47::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_ak47.mdl", "models/p_ak47.mdl", AK47_DRAW, "ak47", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2352da> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:108 */
|
||||
NOBODY void CAK47::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
void CAK47::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/* <235523> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:112 */
|
||||
NOBODY void CAK47::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
void CAK47::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 116
|
||||
// PrimaryAttack(CAK47 *const this); // 112
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
AK47Fire(0.04 + (0.4 * m_flAccuracy), 0.0955, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
AK47Fire(0.04 + (0.07 * m_flAccuracy), 0.0955, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
AK47Fire(0.0275 * m_flAccuracy, 0.0955, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <235637> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:123 */
|
||||
NOBODY void CAK47::AK47Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CAK47::AK47Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 158
|
||||
// Vector vecSrc; // 160
|
||||
// Vector vecDir; // 162
|
||||
// int flag; // 165
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 157
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 163
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 163
|
||||
// Length2D(const Vector *const this); // 193
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.35;
|
||||
|
||||
if (m_flAccuracy > 1.25)
|
||||
m_flAccuracy = 1.25;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_762MM,
|
||||
AK47_DAMAGE, AK47_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireAK47, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.9;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.5, 0.45, 0.225, 0.05, 6.5, 2.5, 7);
|
||||
}
|
||||
else if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(2.0, 1.0, 0.5, 0.35, 9.0, 6.0, 5);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.9, 0.35, 0.15, 0.025, 5.5, 1.5, 9);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(1.0, 0.375, 0.175, 0.0375, 5.75, 1.75, 8);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2353d8> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:204 */
|
||||
NOBODY void CAK47::__MAKE_VHOOK(Reload)(void)
|
||||
void CAK47::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CAK47 *const this); // 204
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// to prevent reload if not enough ammo
|
||||
if (m_pPlayer->ammo_762nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // REGAMEDLL_FIXES
|
||||
|
||||
if (DefaultReload(AK47_MAX_CLIP, AK47_RELOAD, AK47_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* <23539d> ../cstrike/dlls/wpn_shared/wpn_ak47.cpp:219 */
|
||||
NOBODY void CAK47::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
void CAK47::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CAK47 *const this); // 219
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(AK47_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
@ -1,69 +1,275 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define AUG_MAX_SPEED 240
|
||||
|
||||
#define AUG_DAMAGE 32
|
||||
#define AUG_RANGE_MODIFER 0.96
|
||||
|
||||
#define AUG_RELOAD_TIME 3.3
|
||||
|
||||
enum aug_e
|
||||
{
|
||||
AUG_IDLE1,
|
||||
AUG_RELOAD,
|
||||
AUG_DRAW,
|
||||
AUG_SHOOT1,
|
||||
AUG_SHOOT2,
|
||||
AUG_SHOOT3
|
||||
};
|
||||
|
||||
/* <23a81f> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_aug, CAUG);
|
||||
|
||||
/* <23a711> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:52 */
|
||||
NOBODY void CAUG::Spawn(void)
|
||||
void CAUG::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_AUG;
|
||||
SET_MODEL(edict(), "models/w_aug.mdl");
|
||||
|
||||
m_iDefaultAmmo = AUG_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <23a66a> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:66 */
|
||||
NOBODY void CAUG::Precache(void)
|
||||
void CAUG::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_aug.mdl");
|
||||
PRECACHE_MODEL("models/w_aug.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/aug-1.wav");
|
||||
PRECACHE_SOUND("weapons/aug_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/aug_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/aug_boltpull.wav");
|
||||
PRECACHE_SOUND("weapons/aug_boltslap.wav");
|
||||
PRECACHE_SOUND("weapons/aug_forearm.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireAug = PRECACHE_EVENT(1, "events/aug.sc");
|
||||
}
|
||||
|
||||
/* <23a691> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:83 */
|
||||
NOBODY int CAUG::GetItemInfo(ItemInfo *p)
|
||||
int CAUG::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = AUG_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 14;
|
||||
p->iId = m_iId = WEAPON_AUG;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = AUG_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <23a6ea> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:100 */
|
||||
NOBODY BOOL CAUG::Deploy(void)
|
||||
BOOL CAUG::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_aug.mdl", "models/p_aug.mdl", AUG_DRAW, "carbine", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <23a6c4> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:109 */
|
||||
NOBODY void CAUG::SecondaryAttack(void)
|
||||
void CAUG::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
if (m_pPlayer->m_iFOV == DEFAULT_FOV)
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 55;
|
||||
else
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 90;
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
|
||||
/* <23aa31> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:130 */
|
||||
NOBODY void CAUG::PrimaryAttack(void)
|
||||
void CAUG::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 134
|
||||
// PrimaryAttack(CAUG *const this); // 130
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
AUGFire(0.035 + (0.4 * m_flAccuracy), 0.0825, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
AUGFire(0.035 + (0.07 * m_flAccuracy), 0.0825, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->fov == DEFAULT_FOV)
|
||||
{
|
||||
AUGFire(0.02 * m_flAccuracy, 0.0825, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
AUGFire(0.02 * m_flAccuracy, 0.135, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <23a8e9> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:143 */
|
||||
NOBODY void CAUG::AUGFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CAUG::AUGFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 183
|
||||
// Vector vecSrc; // 185
|
||||
// Vector vecDir; // 187
|
||||
// int flag; // 190
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 182
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 188
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 188
|
||||
// Length2D(const Vector *const this); // 214
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 215) + 0.3;
|
||||
|
||||
if (m_flAccuracy > 1)
|
||||
m_flAccuracy = 1;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
AUG_DAMAGE, AUG_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireAug, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.9;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.0, 0.45, 0.275, 0.05, 4.0, 2.5, 7);
|
||||
}
|
||||
else if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.25, 0.45, 0.22, 0.18, 5.5, 4.0, 5);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.575, 0.325, 0.2, 0.011, 3.25, 2.0, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.625, 0.375, 0.25, 0.0125, 3.5, 2.25, 8);
|
||||
}
|
||||
}
|
||||
|
||||
/* <23a7c2> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:225 */
|
||||
NOBODY void CAUG::Reload(void)
|
||||
void CAUG::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 230
|
||||
// }
|
||||
// Reload(CAUG *const this); // 225
|
||||
if (m_pPlayer->ammo_556nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(AUG_MAX_CLIP, AUG_RELOAD, AUG_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
if (m_pPlayer->m_iFOV != DEFAULT_FOV)
|
||||
{
|
||||
SecondaryAttack();
|
||||
}
|
||||
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* <23a787> ../cstrike/dlls/wpn_shared/wpn_aug.cpp:245 */
|
||||
NOBODY void CAUG::WeaponIdle(void)
|
||||
void CAUG::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CAUG *const this); // 245
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(AUG_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CAUG::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CAUG::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CAUG::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CAUG::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CAUG::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CAUG::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CAUG::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CAUG::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
#define AWP_MAX_SPEED 210
|
||||
#define AWP_MAX_SPEED_ZOOM 150
|
||||
|
||||
#define AWP_DAMAGE 115
|
||||
#define AWP_RANGE_MODIFER 0.99
|
||||
|
||||
#define AWP_RELOAD_TIME 2.5
|
||||
|
||||
enum awp_e
|
||||
@ -158,7 +162,7 @@ void CAWP::AWPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer, 0);
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -176,22 +180,9 @@ void CAWP::AWPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecDir = gpGlobals->v_forward;
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecAiming = m_pPlayer->FireBullets3
|
||||
(
|
||||
vecSrc,
|
||||
vecDir,
|
||||
flSpread,
|
||||
8192.0,
|
||||
3,
|
||||
BULLET_PLAYER_338MAG,
|
||||
115,
|
||||
0.99,
|
||||
m_pPlayer->pev,
|
||||
true, // TODO: why awp is have bPistol set true?
|
||||
m_pPlayer->random_seed
|
||||
);
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 3, BULLET_PLAYER_338MAG, AWP_DAMAGE, AWP_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
@ -199,47 +190,29 @@ void CAWP::AWPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL
|
||||
(
|
||||
flag,
|
||||
ENT(m_pPlayer->pev),
|
||||
m_usFireAWP,
|
||||
0,
|
||||
(float *)&g_vecZero,
|
||||
(float *)&g_vecZero,
|
||||
vecAiming.x,
|
||||
vecAiming.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100),
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100),
|
||||
FALSE,
|
||||
FALSE
|
||||
);
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireAWP, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.x * 100), FALSE, FALSE);
|
||||
|
||||
m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
}
|
||||
|
||||
/* <23fbc1> ../cstrike/dlls/wpn_shared/wpn_awp.cpp:239 */
|
||||
void CAWP::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
int iResult;
|
||||
|
||||
if (m_pPlayer->ammo_338mag <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
iResult = DefaultReload(AWP_MAX_CLIP, AWP_RELOAD, AWP_RELOAD_TIME);
|
||||
|
||||
if (iResult)
|
||||
if (DefaultReload(AWP_MAX_CLIP, AWP_RELOAD, AWP_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
|
@ -65,7 +65,7 @@ int CC4::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
p->iPosition = 3;
|
||||
p->iId = m_iId = WEAPON_C4;
|
||||
p->iWeight = C4_WEIGHT;
|
||||
p->iFlags = (ITEM_FLAG_LIMITINWORLD | ITEM_FLAG_EXHAUSTIBLE);
|
||||
p->iFlags = ITEM_FLAG_LIMITINWORLD | ITEM_FLAG_EXHAUSTIBLE;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,66 +1,269 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define DEAGLE_MAX_SPEED 250
|
||||
|
||||
#define DEAGLE_DAMAGE 54
|
||||
#define DEAGLE_RANGE_MODIFER 0.81
|
||||
|
||||
#define DEAGLE_RELOAD_TIME 2.2
|
||||
|
||||
enum deagle_e
|
||||
{
|
||||
DEAGLE_IDLE1,
|
||||
DEAGLE_SHOOT1,
|
||||
DEAGLE_SHOOT2,
|
||||
DEAGLE_SHOOT_EMPTY,
|
||||
DEAGLE_RELOAD,
|
||||
DEAGLE_DRAW
|
||||
};
|
||||
|
||||
/* <24be52> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:49 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_deagle, CDEAGLE);
|
||||
|
||||
/* <24bbe5> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:51 */
|
||||
NOBODY void CDEAGLE::Spawn(void)
|
||||
void CDEAGLE::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_DEAGLE;
|
||||
SET_MODEL(edict(), "models/w_deagle.mdl");
|
||||
|
||||
m_iDefaultAmmo = DEAGLE_DEFAULT_GIVE;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_fMaxSpeed = DEAGLE_MAX_SPEED;
|
||||
m_flAccuracy = 0.9;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <24bb64> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:68 */
|
||||
NOBODY void CDEAGLE::Precache(void)
|
||||
void CDEAGLE::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_deagle.mdl");
|
||||
PRECACHE_MODEL("models/shield/v_shield_deagle.mdl");
|
||||
PRECACHE_MODEL("models/w_deagle.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/deagle-1.wav");
|
||||
PRECACHE_SOUND("weapons/deagle-2.wav");
|
||||
PRECACHE_SOUND("weapons/de_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/de_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/de_deploy.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireDeagle = PRECACHE_EVENT(1, "events/deagle.sc");
|
||||
}
|
||||
|
||||
/* <24bb8b> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:86 */
|
||||
NOBODY int CDEAGLE::GetItemInfo(ItemInfo *p)
|
||||
int CDEAGLE::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "50AE";
|
||||
p->iMaxAmmo1 = MAX_AMMO_50AE;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = DEAGLE_MAX_CLIP;
|
||||
p->iSlot = 1;
|
||||
p->iPosition = 1;
|
||||
p->iId = m_iId = WEAPON_DEAGLE;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = DEAGLE_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <24bccf> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:103 */
|
||||
NOBODY BOOL CDEAGLE::Deploy(void)
|
||||
BOOL CDEAGLE::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CDEAGLE *const this); // 103
|
||||
m_flAccuracy = 0.9;
|
||||
m_fMaxSpeed = DEAGLE_MAX_SPEED;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
return DefaultDeploy("models/shield/v_shield_deagle.mdl", "models/shield/p_shield_deagle.mdl", DEAGLE_DRAW, "shieldgun", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_deagle.mdl", "models/p_deagle.mdl", DEAGLE_DRAW, "onehanded", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <24be08> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:119 */
|
||||
NOBODY void CDEAGLE::PrimaryAttack(void)
|
||||
void CDEAGLE::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 123
|
||||
// PrimaryAttack(CDEAGLE *const this); // 119
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
DEAGLEFire(1.5 * (1 - m_flAccuracy), 0.3, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
DEAGLEFire(0.25 * (1 - m_flAccuracy), 0.3, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
DEAGLEFire(0.115 * (1 - m_flAccuracy), 0.3, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEAGLEFire(0.13 * (1 - m_flAccuracy), 0.3, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <24bbbe> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:131 */
|
||||
NOBODY void CDEAGLE::SecondaryAttack(void)
|
||||
void CDEAGLE::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
ShieldSecondaryFire(SHIELDGUN_UP, SHIELDGUN_DOWN);
|
||||
}
|
||||
|
||||
/* <24bf1c> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:137 */
|
||||
NOBODY void CDEAGLE::DEAGLEFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
void CDEAGLE::DEAGLEFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 193
|
||||
// Vector vecSrc; // 196
|
||||
// Vector vecDir; // 198
|
||||
// int flag; // 202
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 188
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 199
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 199
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
flCycleTime -= 0.075;
|
||||
|
||||
if (++m_iShotsFired > 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_flLastFire != 0.0)
|
||||
{
|
||||
m_flAccuracy -= (0.4 - (gpGlobals->time - m_flLastFire)) * 0.35;
|
||||
|
||||
if (m_flAccuracy > 0.9)
|
||||
{
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
else if (m_flAccuracy < 0.55)
|
||||
{
|
||||
m_flAccuracy = 0.55;
|
||||
}
|
||||
}
|
||||
|
||||
m_flLastFire = gpGlobals->time;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 4096, 2, BULLET_PLAYER_50AE, DEAGLE_DAMAGE, DEAGLE_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireDeagle, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip == 0, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, FALSE);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
ResetPlayerShieldAnim();
|
||||
}
|
||||
|
||||
/* <24bc95> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:231 */
|
||||
NOBODY void CDEAGLE::Reload(void)
|
||||
void CDEAGLE::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CDEAGLE *const this); // 231
|
||||
if (m_pPlayer->ammo_50ae <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(DEAGLE_MAX_CLIP, DEAGLE_RELOAD, DEAGLE_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
/* <24bc5b> ../cstrike/dlls/wpn_shared/wpn_deagle.cpp:243 */
|
||||
NOBODY void CDEAGLE::WeaponIdle(void)
|
||||
void CDEAGLE::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CDEAGLE *const this); // 243
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
|
||||
if (FBitSet(m_iWeaponState, WPNSTATE_SHIELD_DRAWN))
|
||||
{
|
||||
SendWeaponAnim(SHIELDGUN_DRAWN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CDEAGLE::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CDEAGLE::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CDEAGLE::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CDEAGLE::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CDEAGLE::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CDEAGLE::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CDEAGLE::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CDEAGLE::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,81 +1,291 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define ELITE_MAX_SPEED 250
|
||||
#define ELITE_RELOAD_TIME 4.5
|
||||
|
||||
#define ELITE_DAMAGE 36
|
||||
#define ELITE_RANGE_MODIFER 0.75
|
||||
|
||||
enum elite_e
|
||||
{
|
||||
ELITE_IDLE,
|
||||
ELITE_IDLE_LEFTEMPTY,
|
||||
ELITE_SHOOTLEFT1,
|
||||
ELITE_SHOOTLEFT2,
|
||||
ELITE_SHOOTLEFT3,
|
||||
ELITE_SHOOTLEFT4,
|
||||
ELITE_SHOOTLEFT5,
|
||||
ELITE_SHOOTLEFTLAST,
|
||||
ELITE_SHOOTRIGHT1,
|
||||
ELITE_SHOOTRIGHT2,
|
||||
ELITE_SHOOTRIGHT3,
|
||||
ELITE_SHOOTRIGHT4,
|
||||
ELITE_SHOOTRIGHT5,
|
||||
ELITE_SHOOTRIGHTLAST,
|
||||
ELITE_RELOAD,
|
||||
ELITE_DRAW
|
||||
};
|
||||
|
||||
/* <25137f> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:52 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_elite, CELITE);
|
||||
|
||||
/* <251034> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:54 */
|
||||
NOBODY void CELITE::Spawn(void)
|
||||
void CELITE::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_ELITE;
|
||||
SET_MODEL(edict(), "models/w_elite.mdl");
|
||||
|
||||
m_iDefaultAmmo = ELITE_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.88;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <250fb3> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:67 */
|
||||
NOBODY void CELITE::Precache(void)
|
||||
void CELITE::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_elite.mdl");
|
||||
PRECACHE_MODEL("models/w_elite.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/elite_fire.wav");
|
||||
PRECACHE_SOUND("weapons/elite_reloadstart.wav");
|
||||
PRECACHE_SOUND("weapons/elite_leftclipin.wav");
|
||||
PRECACHE_SOUND("weapons/elite_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/elite_sliderelease.wav");
|
||||
PRECACHE_SOUND("weapons/elite_rightclipin.wav");
|
||||
PRECACHE_SOUND("weapons/elite_deploy.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
|
||||
m_usFireELITE_LEFT = PRECACHE_EVENT(1, "events/elite_left.sc");
|
||||
m_usFireELITE_RIGHT = PRECACHE_EVENT(1, "events/elite_right.sc");
|
||||
}
|
||||
|
||||
/* <250fda> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:86 */
|
||||
NOBODY int CELITE::GetItemInfo(ItemInfo *p)
|
||||
int CELITE::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "9mm";
|
||||
p->iMaxAmmo1 = MAX_AMMO_9MM;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = ELITE_MAX_CLIP;
|
||||
p->iSlot = 1;
|
||||
p->iPosition = 5;
|
||||
p->iId = m_iId = WEAPON_ELITE;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = ELITE_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <25100d> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:103 */
|
||||
NOBODY BOOL CELITE::Deploy(void)
|
||||
BOOL CELITE::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.88;
|
||||
|
||||
if (!(m_iClip & 1))
|
||||
{
|
||||
m_iWeaponState |= WPNSTATE_ELITE_LEFT;
|
||||
}
|
||||
|
||||
return DefaultDeploy("models/v_elite.mdl", "models/p_elite.mdl", ELITE_DRAW, "dualpistols", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <251335> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:114 */
|
||||
NOBODY void CELITE::PrimaryAttack(void)
|
||||
void CELITE::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 118
|
||||
// PrimaryAttack(CELITE *const this); // 114
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
ELITEFire(1.3 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
ELITEFire(0.175 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
ELITEFire(0.08 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
ELITEFire(0.1 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <251449> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:126 */
|
||||
NOBODY void CELITE::ELITEFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
void CELITE::ELITEFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
{
|
||||
// {
|
||||
// float flTimeDiff; // 135
|
||||
// int flag; // 182
|
||||
// Vector vecAiming; // 190
|
||||
// Vector vecSrc; // 192
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 178
|
||||
// {
|
||||
// Vector vecDir; // 202
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 203
|
||||
// operator*(const Vector *const this,
|
||||
// float fl); // 201
|
||||
// operator-(const Vector *const this,
|
||||
// const Vector &v); // 201
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 203
|
||||
// }
|
||||
// {
|
||||
// Vector vecDir; // 219
|
||||
// edict(CBaseEntity *const this); // 221
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 220
|
||||
// operator*(const Vector *const this,
|
||||
// float fl); // 218
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 218
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 220
|
||||
// }
|
||||
// }
|
||||
float flTimeDiff;
|
||||
int flag;
|
||||
Vector vecAiming;
|
||||
Vector vecSrc;
|
||||
Vector vecDir;
|
||||
|
||||
flCycleTime -= 0.125;
|
||||
m_iShotsFired++;
|
||||
|
||||
if (m_iShotsFired > 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
flTimeDiff = gpGlobals->time - m_flLastFire;
|
||||
|
||||
if (m_flLastFire)
|
||||
{
|
||||
m_flAccuracy -= (0.325 - flTimeDiff) * 0.275;
|
||||
|
||||
if (m_flAccuracy > 0.88)
|
||||
{
|
||||
m_flAccuracy = 0.88;
|
||||
}
|
||||
else if (m_flAccuracy < 0.55)
|
||||
{
|
||||
m_flAccuracy = 0.55;
|
||||
}
|
||||
}
|
||||
|
||||
m_flLastFire = gpGlobals->time;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
m_iClip--;
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_ELITE_LEFT)
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
m_iWeaponState &= ~WPNSTATE_ELITE_LEFT;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc - gpGlobals->v_right * 5, vecAiming, flSpread,
|
||||
8192, BULLET_PLAYER_9MM, 1, ELITE_DAMAGE, ELITE_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireELITE_LEFT, 0, (float *)&g_vecZero, (float *)&g_vecZero, flTimeDiff, vecDir.x,
|
||||
(int)(vecDir.y * 100), m_iClip, FALSE, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK2);
|
||||
m_iWeaponState |= WPNSTATE_ELITE_LEFT;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc + gpGlobals->v_right * 5, vecAiming, flSpread,
|
||||
8192, BULLET_PLAYER_9MM, 1, ELITE_DAMAGE, ELITE_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireELITE_RIGHT, 0, (float *)&g_vecZero, (float *)&g_vecZero, flTimeDiff, vecDir.x,
|
||||
(int)(vecDir.y * 100), m_iClip, FALSE, FALSE);
|
||||
}
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0;
|
||||
m_pPlayer->pev->punchangle.x -= 2.0;
|
||||
}
|
||||
|
||||
/* <2510f8> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:239 */
|
||||
NOBODY void CELITE::Reload(void)
|
||||
void CELITE::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CELITE *const this); // 239
|
||||
if (m_pPlayer->ammo_9mm <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(ELITE_MAX_CLIP, ELITE_RELOAD, ELITE_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
m_flAccuracy = 0.88;
|
||||
}
|
||||
}
|
||||
|
||||
/* <24fed7> ../cstrike/dlls/wpn_shared/wpn_elite.cpp:251 */
|
||||
NOBODY void CELITE::WeaponIdle(void)
|
||||
void CELITE::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// {
|
||||
// int iAnim; // 263
|
||||
// }
|
||||
int iAnim;
|
||||
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
|
||||
{
|
||||
if (m_iClip)
|
||||
{
|
||||
iAnim = (m_iClip == 1) ? ELITE_IDLE_LEFTEMPTY : ELITE_IDLE;
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0;
|
||||
SendWeaponAnim(iAnim, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CELITE::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CELITE::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CELITE::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CELITE::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CELITE::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CELITE::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CELITE::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,76 +1,309 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
enum famas_e
|
||||
{
|
||||
FAMAS_IDLE1,
|
||||
FAMAS_RELOAD,
|
||||
FAMAS_DRAW,
|
||||
FAMAS_SHOOT1,
|
||||
FAMAS_SHOOT2,
|
||||
FAMAS_SHOOT3
|
||||
};
|
||||
|
||||
#define FAMAS_MAX_SPEED 240
|
||||
#define FAMAS_RELOAD_TIME 3.3
|
||||
|
||||
#define FAMAS_DAMAGE 30
|
||||
#define FAMAS_DAMAGE_BURST 34
|
||||
|
||||
#define FAMAS_RANGE_MODIFER 0.96
|
||||
|
||||
/* <2c0549> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_famas, CFamas);
|
||||
|
||||
/* <2c0284> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:52 */
|
||||
NOBODY void CFamas::Spawn(void)
|
||||
void CFamas::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_FAMAS;
|
||||
SET_MODEL(edict(), "models/w_famas.mdl");
|
||||
|
||||
m_iDefaultAmmo = FAMAS_DEFAULT_GIVE;
|
||||
m_iFamasShotsFired = 0;
|
||||
m_flFamasShoot = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2c01dc> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:66 */
|
||||
NOBODY void CFamas::Precache(void)
|
||||
void CFamas::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_famas.mdl");
|
||||
PRECACHE_MODEL("models/w_famas.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/famas-1.wav");
|
||||
PRECACHE_SOUND("weapons/famas-2.wav");
|
||||
PRECACHE_SOUND("weapons/famas_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/famas_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/famas_boltpull.wav");
|
||||
PRECACHE_SOUND("weapons/famas_boltslap.wav");
|
||||
PRECACHE_SOUND("weapons/famas_forearm.wav");
|
||||
PRECACHE_SOUND("weapons/famas-burst.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireFamas = PRECACHE_EVENT(1, "events/famas.sc");
|
||||
}
|
||||
|
||||
/* <2c0203> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:85 */
|
||||
NOBODY int CFamas::GetItemInfo(ItemInfo *p)
|
||||
int CFamas::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = FAMAS_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 18;
|
||||
p->iId = m_iId = WEAPON_FAMAS;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = FAMAS_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2c025d> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:102 */
|
||||
NOBODY BOOL CFamas::Deploy(void)
|
||||
BOOL CFamas::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_iShotsFired = 0;
|
||||
m_iFamasShotsFired = 0;
|
||||
m_flFamasShoot = 0;
|
||||
m_flAccuracy = 0.2;
|
||||
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_famas.mdl", "models/p_famas.mdl", FAMAS_DRAW, "carbine", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2c0236> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:114 */
|
||||
NOBODY void CFamas::SecondaryAttack(void)
|
||||
void CFamas::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
if (m_iWeaponState & WPNSTATE_FAMAS_BURST_MODE)
|
||||
{
|
||||
ClientPrint(m_pPlayer->pev, HUD_PRINTCENTER, "#Switch_To_FullAuto");
|
||||
m_iWeaponState &= ~WPNSTATE_FAMAS_BURST_MODE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ClientPrint(m_pPlayer->pev, HUD_PRINTCENTER, "#Switch_To_BurstFire");
|
||||
m_iWeaponState |= WPNSTATE_FAMAS_BURST_MODE;
|
||||
}
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
|
||||
/* <2c04fe> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:129 */
|
||||
NOBODY void CFamas::PrimaryAttack(void)
|
||||
void CFamas::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// {
|
||||
// bool bFireBurst; // 139
|
||||
// Length2D(const Vector *const this); // 145
|
||||
// }
|
||||
if (m_pPlayer->pev->waterlevel == 3)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.15);
|
||||
return;
|
||||
}
|
||||
|
||||
bool bFireBurst = (m_iWeaponState & WPNSTATE_FAMAS_BURST_MODE) == WPNSTATE_FAMAS_BURST_MODE;
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
FamasFire(0.030 + 0.3 * m_flAccuracy, 0.0825, FALSE, bFireBurst);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
FamasFire(0.030 + 0.07 * m_flAccuracy, 0.0825, FALSE, bFireBurst);
|
||||
}
|
||||
else
|
||||
{
|
||||
FamasFire(0.02 * m_flAccuracy, 0.0825, FALSE, bFireBurst);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2c0613> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:152 */
|
||||
NOBODY void CFamas::FamasFire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL bFireBurst)
|
||||
void CFamas::FamasFire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL bFireBurst)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 203
|
||||
// Vector vecSrc; // 205
|
||||
// Vector vecDir; // 207
|
||||
// int flag; // 213
|
||||
// int mask; // 221
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 202
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 211
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 211
|
||||
// Length2D(const Vector *const this); // 243
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 209
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 209
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
//int mask;
|
||||
|
||||
if (bFireBurst)
|
||||
{
|
||||
m_iFamasShotsFired = 0;
|
||||
flCycleTime = 0.55;
|
||||
}
|
||||
else
|
||||
{
|
||||
flSpread += 0.01;
|
||||
}
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = (m_iShotsFired * m_iShotsFired * m_iShotsFired / 215) + 0.3;
|
||||
|
||||
if (m_flAccuracy > 1)
|
||||
m_flAccuracy = 1;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
bFireBurst ? FAMAS_DAMAGE_BURST : FAMAS_DAMAGE, FAMAS_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireFamas, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 10000000), (int)(m_pPlayer->pev->punchangle.y * 10000000), FALSE, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.1;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.0, 0.45, 0.275, 0.05, 4.0, 2.5, 7);
|
||||
}
|
||||
else if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.25, 0.45, 0.22, 0.18, 5.5, 4.0, 5);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.575, 0.325, 0.2, 0.011, 3.25, 2.0, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.625, 0.375, 0.25, 0.0125, 3.5, 2.25, 8);
|
||||
}
|
||||
|
||||
if (bFireBurst)
|
||||
{
|
||||
m_iFamasShotsFired++;
|
||||
m_fBurstSpread = flSpread;
|
||||
m_flFamasShoot = gpGlobals->time + 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2c0336> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:262 */
|
||||
NOBODY void CFamas::Reload(void)
|
||||
void CFamas::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 267
|
||||
// }
|
||||
// Reload(CFamas *const this); // 262
|
||||
if (m_pPlayer->ammo_556nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(FAMAS_MAX_CLIP, FAMAS_RELOAD, FAMAS_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
if (m_pPlayer->m_iFOV != DEFAULT_FOV)
|
||||
{
|
||||
SecondaryAttack();
|
||||
}
|
||||
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2c02fa> ../cstrike/dlls/wpn_shared/wpn_famas.cpp:284 */
|
||||
NOBODY void CFamas::WeaponIdle(void)
|
||||
void CFamas::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CFamas *const this); // 284
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
SendWeaponAnim(FAMAS_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CFamas::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CFamas::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CFamas::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CFamas::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CFamas::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CFamas::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CFamas::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CFamas::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,66 +1,279 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define FIVESEVEN_MAX_SPEED 250
|
||||
|
||||
#define FIVESEVEN_DAMAGE 20
|
||||
#define FIVESEVEN_RANGE_MODIFER 0.885
|
||||
|
||||
#define FIVESEVEN_RELOAD_TIME 2.7
|
||||
|
||||
enum fiveseven_e
|
||||
{
|
||||
FIVESEVEN_IDLE,
|
||||
FIVESEVEN_SHOOT1,
|
||||
FIVESEVEN_SHOOT2,
|
||||
FIVESEVEN_SHOOT_EMPTY,
|
||||
FIVESEVEN_RELOAD,
|
||||
FIVESEVEN_DRAW
|
||||
};
|
||||
|
||||
/* <25698d> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:49 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_fiveseven, CFiveSeven);
|
||||
|
||||
/* <256720> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:51 */
|
||||
NOBODY void CFiveSeven::Spawn(void)
|
||||
void CFiveSeven::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_FIVESEVEN;
|
||||
SET_MODEL(edict(), "models/w_fiveseven.mdl");
|
||||
|
||||
m_iDefaultAmmo = FIVESEVEN_DEFAULT_GIVE;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_flAccuracy = 0.92;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <25669f> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:66 */
|
||||
NOBODY void CFiveSeven::Precache(void)
|
||||
void CFiveSeven::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_fiveseven.mdl");
|
||||
PRECACHE_MODEL("models/w_fiveseven.mdl");
|
||||
PRECACHE_MODEL("models/shield/v_shield_fiveseven.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/fiveseven-1.wav");
|
||||
PRECACHE_SOUND("weapons/fiveseven_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/fiveseven_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/fiveseven_sliderelease.wav");
|
||||
PRECACHE_SOUND("weapons/fiveseven_slidepull.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireFiveSeven = PRECACHE_EVENT(1, "events/fiveseven.sc");
|
||||
}
|
||||
|
||||
/* <2566c6> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:84 */
|
||||
NOBODY int CFiveSeven::GetItemInfo(ItemInfo *p)
|
||||
int CFiveSeven::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "57mm";
|
||||
p->iMaxAmmo1 = MAX_AMMO_57MM;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = FIVESEVEN_MAX_CLIP;
|
||||
p->iSlot = 1;
|
||||
p->iPosition = 6;
|
||||
p->iId = m_iId = WEAPON_FIVESEVEN;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = FIVESEVEN_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <25680a> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:101 */
|
||||
NOBODY BOOL CFiveSeven::Deploy(void)
|
||||
BOOL CFiveSeven::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CFiveSeven *const this); // 101
|
||||
m_flAccuracy = 0.92;
|
||||
m_fMaxSpeed = FIVESEVEN_MAX_SPEED;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
return DefaultDeploy("models/shield/v_shield_fiveseven.mdl", "models/shield/p_shield_fiveseven.mdl", FIVESEVEN_DRAW, "shieldgun", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_fiveseven.mdl", "models/p_fiveseven.mdl", FIVESEVEN_DRAW, "onehanded", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <256943> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:117 */
|
||||
NOBODY void CFiveSeven::PrimaryAttack(void)
|
||||
void CFiveSeven::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 121
|
||||
// PrimaryAttack(CFiveSeven *const this); // 117
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
FiveSevenFire(1.5 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
FiveSevenFire(0.255 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
FiveSevenFire(0.075 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
FiveSevenFire(0.15 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2566f9> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:129 */
|
||||
NOBODY void CFiveSeven::SecondaryAttack(void)
|
||||
void CFiveSeven::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
ShieldSecondaryFire(SHIELDGUN_UP, SHIELDGUN_DOWN);
|
||||
}
|
||||
|
||||
/* <256a57> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:134 */
|
||||
NOBODY void CFiveSeven::FiveSevenFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 190
|
||||
// Vector vecSrc; // 192
|
||||
// Vector vecDir; // 194
|
||||
// int flag; // 197
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 183
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 195
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 195
|
||||
// }
|
||||
void CFiveSeven::FiveSevenFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
{
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
flCycleTime -= 0.05;
|
||||
|
||||
if (++m_iShotsFired > 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_flLastFire != 0.0)
|
||||
{
|
||||
m_flAccuracy -= (0.275 - (gpGlobals->time - m_flLastFire)) * 0.25;
|
||||
|
||||
if (m_flAccuracy > 0.92)
|
||||
{
|
||||
m_flAccuracy = 0.92;
|
||||
}
|
||||
else if (m_flAccuracy < 0.725)
|
||||
{
|
||||
m_flAccuracy = 0.725;
|
||||
}
|
||||
}
|
||||
|
||||
m_flLastFire = gpGlobals->time;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 4096, 1, BULLET_PLAYER_57MM, FIVESEVEN_DAMAGE, FIVESEVEN_RANGE_MODIFER, m_pPlayer->pev, false, // TODO: why fiveseven not is IsPistol?
|
||||
m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireFiveSeven, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip == 0, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, FALSE);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
ResetPlayerShieldAnim();
|
||||
}
|
||||
|
||||
/* <2567d0> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:225 */
|
||||
NOBODY void CFiveSeven::Reload(void)
|
||||
void CFiveSeven::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CFiveSeven *const this); // 225
|
||||
if (m_pPlayer->ammo_57mm <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(FIVESEVEN_MAX_CLIP, FIVESEVEN_RELOAD, FIVESEVEN_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
m_flAccuracy = 0.92;
|
||||
}
|
||||
}
|
||||
|
||||
/* <256796> ../cstrike/dlls/wpn_shared/wpn_fiveseven.cpp:238 */
|
||||
NOBODY void CFiveSeven::WeaponIdle(void)
|
||||
void CFiveSeven::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CFiveSeven *const this); // 238
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
SendWeaponAnim(SHIELDGUN_DRAWN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
else if (m_iClip)
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625;
|
||||
SendWeaponAnim(FIVESEVEN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CFiveSeven::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CFiveSeven::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CFiveSeven::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CFiveSeven::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CFiveSeven::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CFiveSeven::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CFiveSeven::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CFiveSeven::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,78 +1,334 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define FLASHBANG_MAX_SPEED 250
|
||||
#define FLASHBANG_MAX_SPEED_SHIELD 180
|
||||
|
||||
enum flashbang_e
|
||||
{
|
||||
FLASHBANG_IDLE,
|
||||
FLASHBANG_PULLPIN,
|
||||
FLASHBANG_THROW,
|
||||
FLASHBANG_DRAW
|
||||
};
|
||||
|
||||
/* <25ba9b> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:37 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_flashbang, CFlashbang);
|
||||
|
||||
/* <25b72f> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:39 */
|
||||
NOBODY void CFlashbang::Spawn(void)
|
||||
{
|
||||
void CFlashbang::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_FLASHBANG;
|
||||
SET_MODEL(edict(), "models/w_flashbang.mdl");
|
||||
|
||||
pev->dmg = 4;
|
||||
|
||||
m_iDefaultAmmo = FLASHBANG_DEFAULT_GIVE;
|
||||
m_flStartThrow = 0;
|
||||
m_flReleaseThrow = -1.0;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
|
||||
// get ready to fall down.
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <25b67a> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:58 */
|
||||
NOBODY void CFlashbang::Precache(void)
|
||||
void CFlashbang::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_flashbang.mdl");
|
||||
PRECACHE_MODEL("models/shield/v_shield_flashbang.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/flashbang-1.wav");
|
||||
PRECACHE_SOUND("weapons/flashbang-2.wav");
|
||||
PRECACHE_SOUND("weapons/pinpull.wav");
|
||||
}
|
||||
|
||||
/* <25b6a1> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:69 */
|
||||
NOBODY int CFlashbang::GetItemInfo(ItemInfo *p)
|
||||
int CFlashbang::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "Flashbang";
|
||||
p->iMaxAmmo1 = MAX_AMMO_FLASHBANG;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = WEAPON_NOCLIP;
|
||||
p->iSlot = 3;
|
||||
p->iPosition = 2;
|
||||
p->iId = m_iId = WEAPON_FLASHBANG;
|
||||
p->iWeight = FLASHBANG_WEIGHT;
|
||||
p->iFlags = ITEM_FLAG_LIMITINWORLD | ITEM_FLAG_EXHAUSTIBLE;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <25b7df> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:87 */
|
||||
NOBODY BOOL CFlashbang::Deploy(void)
|
||||
BOOL CFlashbang::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CFlashbang *const this); // 87
|
||||
m_flReleaseThrow = -1.0;
|
||||
m_fMaxSpeed = FLASHBANG_MAX_SPEED;
|
||||
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
return DefaultDeploy("models/shield/v_shield_flashbang.mdl", "models/shield/p_shield_flashbang.mdl", FLASHBANG_DRAW, "shieldgren", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_flashbang.mdl", "models/p_flashbang.mdl", FLASHBANG_DRAW, "grenade", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <25b6fa> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:102 */
|
||||
NOBODY void CFlashbang::Holster(int skiplocal)
|
||||
void CFlashbang::__MAKE_VHOOK(Holster)(int skiplocal)
|
||||
{
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
m_pPlayer->pev->weapons &= ~(1 << WEAPON_FLASHBANG);
|
||||
DestroyItem();
|
||||
}
|
||||
|
||||
m_flStartThrow = 0;
|
||||
m_flReleaseThrow = -1.0;
|
||||
}
|
||||
|
||||
/* <25b7a5> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:118 */
|
||||
NOBODY void CFlashbang::PrimaryAttack(void)
|
||||
void CFlashbang::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CFlashbang *const this); // 118
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_flStartThrow && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] > 0)
|
||||
{
|
||||
m_flReleaseThrow = 0;
|
||||
m_flStartThrow = gpGlobals->time;
|
||||
|
||||
SendWeaponAnim(FLASHBANG_PULLPIN, UseDecrement() != FALSE);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/* <25bb65> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:133 */
|
||||
NOBODY bool CFlashbang::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
bool CFlashbang::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
{
|
||||
if (!m_pPlayer->HasShield() || m_flStartThrow > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
SendWeaponAnim(iDownAnim, UseDecrement() != FALSE);
|
||||
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
|
||||
m_fMaxSpeed = FLASHBANG_MAX_SPEED;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iWeaponState |= WPNSTATE_SHIELD_DRAWN;
|
||||
SendWeaponAnim(iUpAnim, UseDecrement() != FALSE);
|
||||
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shielded");
|
||||
|
||||
m_fMaxSpeed = FLASHBANG_MAX_SPEED_SHIELD;
|
||||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) != WPNSTATE_SHIELD_DRAWN);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.4);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* <25b81a> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:171 */
|
||||
NOBODY void CFlashbang::SecondaryAttack(void)
|
||||
void CFlashbang::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
// ShieldSecondaryFire(CFlashbang::SecondaryAttack(// int iUpAnim,
|
||||
// int iDownAnim); // 173
|
||||
ShieldSecondaryFire(SHIELDGUN_DRAW, SHIELDGUN_DRAWN_IDLE);
|
||||
}
|
||||
|
||||
/* <25bb97> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:176 */
|
||||
NOBODY void CFlashbang::SetPlayerShieldAnim(void)
|
||||
void CFlashbang::SetPlayerShieldAnim(void)
|
||||
{
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shield");
|
||||
else
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
}
|
||||
|
||||
/* <25bbb9> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:187 */
|
||||
NOBODY void CFlashbang::ResetPlayerShieldAnim(void)
|
||||
void CFlashbang::ResetPlayerShieldAnim(void)
|
||||
{
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
}
|
||||
}
|
||||
|
||||
/* <25a8bd> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:198 */
|
||||
NOBODY void CFlashbang::WeaponIdle(void)
|
||||
void CFlashbang::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// {
|
||||
// Vector angThrow; // 210
|
||||
// float flVel; // 217
|
||||
// Vector vecSrc; // 223
|
||||
// Vector vecThrow; // 226
|
||||
// }
|
||||
// {
|
||||
// int iAnim; // 282
|
||||
// float flRand; // 283
|
||||
// }
|
||||
if (m_flReleaseThrow == 0 && m_flStartThrow != 0.0f)
|
||||
m_flReleaseThrow = gpGlobals->time;
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
if (m_flStartThrow)
|
||||
{
|
||||
m_pPlayer->Radio("%!MRAD_FIREINHOLE", "#Fire_in_the_hole");
|
||||
|
||||
Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
|
||||
|
||||
if (angThrow.x < 0)
|
||||
angThrow.x = -10 + angThrow.x * ((90 - 10) / 90.0);
|
||||
else
|
||||
angThrow.x = -10 + angThrow.x * ((90 + 10) / 90.0);
|
||||
|
||||
float_precision flVel = (90.0 - angThrow.x) * 6.0;
|
||||
|
||||
if (flVel > 750.0f)
|
||||
flVel = 750.0f;
|
||||
|
||||
UTIL_MakeVectors(angThrow);
|
||||
|
||||
Vector vecSrc = m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16;
|
||||
Vector vecThrow = gpGlobals->v_forward * flVel + m_pPlayer->pev->velocity;
|
||||
|
||||
CGrenade::ShootTimed(m_pPlayer->pev, vecSrc, vecThrow, 1.5);
|
||||
|
||||
SendWeaponAnim(FLASHBANG_THROW, UseDecrement() != FALSE);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
// player "shoot" animation
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
m_flStartThrow = 0;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
|
||||
|
||||
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
// just threw last grenade
|
||||
// set attack times in the future, and weapon idle in the future so we can see the whole throw
|
||||
// animation, weapon idle will automatically retire the weapon for us.
|
||||
// ensure that the animation can finish playing
|
||||
m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||
}
|
||||
|
||||
ResetPlayerShieldAnim();
|
||||
}
|
||||
else if (m_flReleaseThrow > 0)
|
||||
{
|
||||
// we've finished the throw, restart.
|
||||
m_flStartThrow = 0;
|
||||
RetireWeapon();
|
||||
}
|
||||
else if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
int iAnim;
|
||||
float flRand = RANDOM_FLOAT(0, 1);
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
SendWeaponAnim(SHIELDREN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flRand <= 0.75)
|
||||
{
|
||||
iAnim = FLASHBANG_IDLE;
|
||||
|
||||
// how long till we do this again.
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
iAnim = FLASHBANG_IDLE;
|
||||
#else
|
||||
// TODO: This is a bug?
|
||||
iAnim = *(int *)&flRand;
|
||||
#endif // REGAMEDLL_FIXES
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 75.0 / 30.0;
|
||||
}
|
||||
|
||||
SendWeaponAnim(iAnim, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <25b6d4> ../cstrike/dlls/wpn_shared/wpn_flashbang.cpp:315 */
|
||||
NOBODY BOOL CFlashbang::CanDeploy(void)
|
||||
BOOL CFlashbang::__MAKE_VHOOK(CanDeploy)(void)
|
||||
{
|
||||
return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CFlashbang::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CFlashbang::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CFlashbang::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CFlashbang::CanDeploy(void)
|
||||
{
|
||||
return CanDeploy_();
|
||||
}
|
||||
|
||||
BOOL CFlashbang::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CFlashbang::Holster(int skiplocal)
|
||||
{
|
||||
Holster_(skiplocal);
|
||||
}
|
||||
|
||||
void CFlashbang::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CFlashbang::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CFlashbang::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,78 +1,294 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define G3SG1_MAX_SPEED 210
|
||||
#define G3SG1_MAX_SPEED_ZOOM 150
|
||||
|
||||
#define G3SG1_DAMAGE 80
|
||||
#define G3SG1_RANGE_MODIFER 0.98
|
||||
|
||||
#define G3SG1_RELOAD_TIME 3.5
|
||||
|
||||
enum g3sg1_e
|
||||
{
|
||||
G3SG1_IDLE,
|
||||
G3SG1_SHOOT,
|
||||
G3SG1_SHOOT2,
|
||||
G3SG1_RELOAD,
|
||||
G3SG1_DRAW
|
||||
};
|
||||
|
||||
/* <260ef4> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:48 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_g3sg1, CG3SG1);
|
||||
|
||||
/* <260ca2> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:50 */
|
||||
NOBODY void CG3SG1::Spawn(void)
|
||||
void CG3SG1::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_G3SG1;
|
||||
SET_MODEL(edict(), "models/w_g3sg1.mdl");
|
||||
|
||||
m_iDefaultAmmo = G3SG1_DEFAULT_GIVE;
|
||||
m_flLastFire = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <260b97> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:63 */
|
||||
NOBODY void CG3SG1::Precache(void)
|
||||
void CG3SG1::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_g3sg1.mdl");
|
||||
PRECACHE_MODEL("models/w_g3sg1.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/g3sg1-1.wav");
|
||||
PRECACHE_SOUND("weapons/g3sg1_slide.wav");
|
||||
PRECACHE_SOUND("weapons/g3sg1_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/g3sg1_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/zoom.wav");
|
||||
|
||||
m_iShellId = m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireG3SG1 = PRECACHE_EVENT(1, "events/g3sg1.sc");
|
||||
}
|
||||
|
||||
/* <260bbe> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:79 */
|
||||
NOBODY int CG3SG1::GetItemInfo(ItemInfo *p)
|
||||
int CG3SG1::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "762Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_762NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = G3SG1_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 3;
|
||||
p->iId = m_iId = WEAPON_G3SG1;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = G3SG1_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <260c7b> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:96 */
|
||||
NOBODY BOOL CG3SG1::Deploy(void)
|
||||
BOOL CG3SG1::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
return DefaultDeploy("models/v_g3sg1.mdl", "models/p_g3sg1.mdl", G3SG1_DRAW, "mp5", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <260c17> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:102 */
|
||||
NOBODY void CG3SG1::SecondaryAttack(void)
|
||||
void CG3SG1::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
// EMIT_SOUND(edict_t *entity,
|
||||
// int channel,
|
||||
// const char *sample,
|
||||
// float volume,
|
||||
// float attenuation); // 129
|
||||
switch (m_pPlayer->m_iFOV)
|
||||
{
|
||||
case 90: m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 40; break;
|
||||
case 40: m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15; break;
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
default:
|
||||
#else
|
||||
case 15:
|
||||
#endif // REGAMEDLL_FIXES
|
||||
m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 90; break;
|
||||
}
|
||||
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_ZOOMED, m_pPlayer);
|
||||
}
|
||||
|
||||
EMIT_SOUND(m_pPlayer->edict(), CHAN_ITEM, "weapons/zoom.wav", 0.2, 2.4);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
|
||||
/* <260eaa> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:133 */
|
||||
NOBODY void CG3SG1::PrimaryAttack(void)
|
||||
void CG3SG1::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 137
|
||||
// PrimaryAttack(CG3SG1 *const this); // 133
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
G3SG1Fire(0.45, 0.25, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
G3SG1Fire(0.15, 0.25, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
G3SG1Fire(0.035, 0.25, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
G3SG1Fire(0.055, 0.25, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <260dab> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:145 */
|
||||
NOBODY void CG3SG1::G3SG1Fire(float flSpread,float flCycleTime,BOOL fUseAutoAim)
|
||||
void CG3SG1::G3SG1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 199
|
||||
// Vector vecSrc; // 201
|
||||
// int flag; // 206
|
||||
// Vector vecDir; // 203
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 193
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 204
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 204
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
if (m_pPlayer->pev->fov == DEFAULT_FOV)
|
||||
{
|
||||
flSpread += 0.025;
|
||||
}
|
||||
|
||||
if (m_flLastFire)
|
||||
{
|
||||
m_flAccuracy = (gpGlobals->time - m_flLastFire) * 0.3 + 0.55;
|
||||
|
||||
if (m_flAccuracy > 0.98)
|
||||
{
|
||||
m_flAccuracy = 0.98;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_flAccuracy = 0.98;
|
||||
}
|
||||
|
||||
m_flLastFire = gpGlobals->time;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, (1 - m_flAccuracy) * flSpread, 8192, 3, BULLET_PLAYER_762MM, G3SG1_DAMAGE, G3SG1_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireG3SG1, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.x * 100), FALSE, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomFloat(m_pPlayer->random_seed + 4, 0.75, 1.75) + m_pPlayer->pev->punchangle.x * 0.25;
|
||||
m_pPlayer->pev->punchangle.y += UTIL_SharedRandomFloat(m_pPlayer->random_seed + 5, -0.75, 0.75);
|
||||
}
|
||||
|
||||
/* <260d53> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:234 */
|
||||
NOBODY void CG3SG1::Reload(void)
|
||||
void CG3SG1::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 239
|
||||
// }
|
||||
// Reload(CG3SG1 *const this); // 234
|
||||
if (m_pPlayer->ammo_762nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(G3SG1_MAX_CLIP, G3SG1_RELOAD, G3SG1_RELOAD_TIME))
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
if (m_pPlayer->pev->fov != DEFAULT_FOV)
|
||||
{
|
||||
m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15;
|
||||
SecondaryAttack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <260d18> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:260 */
|
||||
NOBODY void CG3SG1::WeaponIdle(void)
|
||||
void CG3SG1::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CG3SG1 *const this); // 260
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
|
||||
{
|
||||
if (m_iClip)
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60;
|
||||
SendWeaponAnim(G3SG1_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <260bf1> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:277 */
|
||||
NOBODY float CG3SG1::GetMaxSpeed(void)
|
||||
float CG3SG1::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||
{
|
||||
return (m_pPlayer->m_iFOV == DEFAULT_FOV) ? G3SG1_MAX_SPEED : G3SG1_MAX_SPEED_ZOOM;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CG3SG1::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CG3SG1::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CG3SG1::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CG3SG1::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
float CG3SG1::GetMaxSpeed(void)
|
||||
{
|
||||
return GetMaxSpeed_();
|
||||
}
|
||||
|
||||
void CG3SG1::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CG3SG1::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CG3SG1::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CG3SG1::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,68 +1,266 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define GALIL_MAX_SPEED 240
|
||||
|
||||
#define GALIL_DAMAGE 30
|
||||
#define GALIL_RANGE_MODIFER 0.98
|
||||
|
||||
#define GALIL_RELOAD_TIME 2.45
|
||||
|
||||
enum galil_e
|
||||
{
|
||||
GALIL_IDLE1,
|
||||
GALIL_RELOAD,
|
||||
GALIL_DRAW,
|
||||
GALIL_SHOOT1,
|
||||
GALIL_SHOOT2,
|
||||
GALIL_SHOOT3
|
||||
};
|
||||
|
||||
/* <2c5a1c> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_galil, CGalil);
|
||||
|
||||
/* <2c57b0> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:52 */
|
||||
NOBODY void CGalil::Spawn(void)
|
||||
void CGalil::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_GALIL;
|
||||
SET_MODEL(edict(), "models/w_galil.mdl");
|
||||
|
||||
m_iDefaultAmmo = GALIL_DEFAULT_GIVE;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2c5709> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:65 */
|
||||
NOBODY void CGalil::Precache(void)
|
||||
void CGalil::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_galil.mdl");
|
||||
PRECACHE_MODEL("models/w_galil.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/galil-1.wav");
|
||||
PRECACHE_SOUND("weapons/galil-2.wav");
|
||||
PRECACHE_SOUND("weapons/galil_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/galil_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/galil_boltpull.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireGalil = PRECACHE_EVENT(1, "events/galil.sc");
|
||||
}
|
||||
|
||||
/* <2c5730> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:81 */
|
||||
NOBODY int CGalil::GetItemInfo(ItemInfo *p)
|
||||
int CGalil::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = GALIL_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 17;
|
||||
p->iId = m_iId = WEAPON_GALIL;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = GALIL_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2c5789> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:98 */
|
||||
NOBODY BOOL CGalil::Deploy(void)
|
||||
BOOL CGalil::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_galil.mdl", "models/p_galil.mdl", GALIL_DRAW, "ak47", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2c5763> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:107 */
|
||||
NOBODY void CGalil::SecondaryAttack(void)
|
||||
void CGalil::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/* <2c59d2> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:111 */
|
||||
NOBODY void CGalil::PrimaryAttack(void)
|
||||
void CGalil::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CGalil *const this); // 111
|
||||
if (m_pPlayer->pev->waterlevel == 3)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.15);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
GalilFire(0.04 + (0.3 * m_flAccuracy), 0.0875, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
GalilFire(0.04 + (0.07 * m_flAccuracy), 0.0875, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
GalilFire(0.0375 * m_flAccuracy, 0.0875, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2c5ae6> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:129 */
|
||||
NOBODY void CGalil::GalilFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CGalil::GalilFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 165
|
||||
// Vector vecSrc; // 167
|
||||
// Vector vecDir; // 169
|
||||
// int flag; // 172
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 164
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 170
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 170
|
||||
// Length2D(const Vector *const this); // 199
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.35;
|
||||
|
||||
if (m_flAccuracy > 1.25)
|
||||
m_flAccuracy = 1.25;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
GALIL_DAMAGE, GALIL_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireGalil, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 10000000), (int)(m_pPlayer->pev->punchangle.y * 10000000), FALSE, FALSE);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.28;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.0, 0.45, 0.28, 0.045, 3.75, 3.0, 7);
|
||||
}
|
||||
else if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.2, 0.5, 0.23, 0.15, 5.5, 3.5, 6);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.6, 0.3, 0.2, 0.0125, 3.25, 2.0, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.65, 0.35, 0.25, 0.015, 3.5, 2.25, 7);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2c5861> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:210 */
|
||||
NOBODY void CGalil::Reload(void)
|
||||
void CGalil::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 215
|
||||
// }
|
||||
// Reload(CGalil *const this); // 210
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// to prevent reload if not enough ammo
|
||||
if (m_pPlayer->ammo_556nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // REGAMEDLL_FIXES
|
||||
|
||||
if (DefaultReload(GALIL_MAX_CLIP, GALIL_RELOAD, GALIL_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2c5826> ../cstrike/dlls/wpn_shared/wpn_galil.cpp:232 */
|
||||
NOBODY void CGalil::WeaponIdle(void)
|
||||
void CGalil::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CGalil *const this); // 232
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(GALIL_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CGalil::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CGalil::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CGalil::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CGalil::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CGalil::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CGalil::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CGalil::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CGalil::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,6 +1,10 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define GLOCK18_MAX_SPEED 250
|
||||
|
||||
#define GLOCK18_DAMAGE 25
|
||||
#define GLOCK18_RANGE_MODIFER 0.75
|
||||
|
||||
#define GLOCK18_RELOAD_TIME 2.2
|
||||
|
||||
enum glock18_e
|
||||
@ -249,22 +253,9 @@ void CGLOCK18::GLOCK18Fire(float flSpread, float flCycleTime, BOOL bFireBurst)
|
||||
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecDir = gpGlobals->v_forward;
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecAiming = m_pPlayer->FireBullets3
|
||||
(
|
||||
vecSrc,
|
||||
vecDir,
|
||||
flSpread,
|
||||
8192,
|
||||
1,
|
||||
BULLET_PLAYER_9MM,
|
||||
25,
|
||||
0.75,
|
||||
m_pPlayer->pev,
|
||||
true,
|
||||
m_pPlayer->random_seed
|
||||
);
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 1, BULLET_PLAYER_9MM, GLOCK18_DAMAGE, GLOCK18_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
@ -272,21 +263,8 @@ void CGLOCK18::GLOCK18Fire(float flSpread, float flCycleTime, BOOL bFireBurst)
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL
|
||||
(
|
||||
flag,
|
||||
m_pPlayer->edict(),
|
||||
m_usFireGlock18,
|
||||
0,
|
||||
(float *)&g_vecZero,
|
||||
(float *)&g_vecZero,
|
||||
vecAiming.x,
|
||||
vecAiming.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100),
|
||||
(int)(m_pPlayer->pev->punchangle.y * 100),
|
||||
m_iClip == 0,
|
||||
FALSE
|
||||
);
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireGlock18, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip == 0, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
|
@ -1,74 +1,330 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define HEGRENADE_MAX_SPEED 250
|
||||
#define HEGRENADE_MAX_SPEED_SHIELD 180
|
||||
|
||||
enum hegrenade_e
|
||||
{
|
||||
HEGRENADE_IDLE,
|
||||
HEGRENADE_PULLPIN,
|
||||
HEGRENADE_THROW,
|
||||
HEGRENADE_DRAW
|
||||
};
|
||||
|
||||
/* <26b3cd> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:38 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_hegrenade, CHEGrenade);
|
||||
|
||||
/* <26b07c> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:40 */
|
||||
NOBODY void CHEGrenade::Spawn(void)
|
||||
void CHEGrenade::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_HEGRENADE;
|
||||
SET_MODEL(edict(), "models/w_hegrenade.mdl");
|
||||
|
||||
pev->dmg = 4;
|
||||
|
||||
m_iDefaultAmmo = HEGRENADE_DEFAULT_GIVE;
|
||||
m_flStartThrow = 0;
|
||||
m_flReleaseThrow = -1;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
|
||||
// get ready to fall down.
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <26afc7> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:59 */
|
||||
NOBODY void CHEGrenade::Precache(void)
|
||||
void CHEGrenade::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_hegrenade.mdl");
|
||||
PRECACHE_MODEL("models/shield/v_shield_hegrenade.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/hegrenade-1.wav");
|
||||
PRECACHE_SOUND("weapons/hegrenade-2.wav");
|
||||
PRECACHE_SOUND("weapons/he_bounce-1.wav");
|
||||
PRECACHE_SOUND("weapons/pinpull.wav");
|
||||
|
||||
m_usCreateExplosion = PRECACHE_EVENT(1, "events/createexplo.sc");
|
||||
}
|
||||
|
||||
/* <26afee> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:74 */
|
||||
NOBODY int CHEGrenade::GetItemInfo(ItemInfo *p)
|
||||
int CHEGrenade::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "HEGrenade";
|
||||
p->iMaxAmmo1 = MAX_AMMO_HEGRENADE;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = WEAPON_NOCLIP;
|
||||
p->iSlot = 3;
|
||||
p->iPosition = 1;
|
||||
p->iId = m_iId = WEAPON_HEGRENADE;
|
||||
p->iWeight = HEGRENADE_WEIGHT;
|
||||
p->iFlags = ITEM_FLAG_LIMITINWORLD | ITEM_FLAG_EXHAUSTIBLE;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <26b12c> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:92 */
|
||||
NOBODY BOOL CHEGrenade::Deploy(void)
|
||||
BOOL CHEGrenade::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CHEGrenade *const this); // 92
|
||||
m_flReleaseThrow = -1;
|
||||
m_fMaxSpeed = HEGRENADE_MAX_SPEED;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
return DefaultDeploy("models/shield/v_shield_hegrenade.mdl", "models/shield/p_shield_hegrenade.mdl", HEGRENADE_DRAW, "shieldgren", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_hegrenade.mdl", "models/p_hegrenade.mdl", HEGRENADE_DRAW, "grenade", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <26b047> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:107 */
|
||||
NOBODY void CHEGrenade::Holster(int skiplocal)
|
||||
void CHEGrenade::__MAKE_VHOOK(Holster)(int skiplocal)
|
||||
{
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
m_pPlayer->pev->weapons &= ~(1 << WEAPON_HEGRENADE);
|
||||
DestroyItem();
|
||||
}
|
||||
|
||||
m_flStartThrow = 0;
|
||||
m_flReleaseThrow = -1;
|
||||
}
|
||||
|
||||
/* <26b0f2> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:123 */
|
||||
NOBODY void CHEGrenade::PrimaryAttack(void)
|
||||
void CHEGrenade::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CHEGrenade *const this); // 123
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_flStartThrow && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] > 0)
|
||||
{
|
||||
m_flReleaseThrow = 0;
|
||||
m_flStartThrow = gpGlobals->time;
|
||||
|
||||
SendWeaponAnim(HEGRENADE_PULLPIN, UseDecrement() != FALSE);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/* <26b497> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:138 */
|
||||
NOBODY bool CHEGrenade::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
bool CHEGrenade::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
{
|
||||
if (!m_pPlayer->HasShield() || m_flStartThrow > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
SendWeaponAnim(iDownAnim, UseDecrement() != FALSE);
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
|
||||
m_fMaxSpeed = HEGRENADE_MAX_SPEED;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iWeaponState |= WPNSTATE_SHIELD_DRAWN;
|
||||
SendWeaponAnim(iUpAnim, UseDecrement() != FALSE);
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shielded");
|
||||
|
||||
m_fMaxSpeed = HEGRENADE_MAX_SPEED_SHIELD;
|
||||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) != WPNSTATE_SHIELD_DRAWN);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.4);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* <26b167> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:176 */
|
||||
NOBODY void CHEGrenade::SecondaryAttack(void)
|
||||
void CHEGrenade::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
// ShieldSecondaryFire(CHEGrenade::SecondaryAttack(// int iUpAnim,
|
||||
// int iDownAnim); // 178
|
||||
ShieldSecondaryFire(SHIELDGUN_DRAW, SHIELDGUN_DRAWN_IDLE);
|
||||
}
|
||||
|
||||
/* <26b4c9> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:181 */
|
||||
NOBODY void CHEGrenade::SetPlayerShieldAnim(void)
|
||||
void CHEGrenade::SetPlayerShieldAnim(void)
|
||||
{
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shield");
|
||||
else
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
}
|
||||
|
||||
/* <26b4eb> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:192 */
|
||||
NOBODY void CHEGrenade::ResetPlayerShieldAnim(void)
|
||||
void CHEGrenade::ResetPlayerShieldAnim(void)
|
||||
{
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
}
|
||||
}
|
||||
|
||||
/* <26a24e> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:202 */
|
||||
NOBODY void CHEGrenade::WeaponIdle(void)
|
||||
void CHEGrenade::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// {
|
||||
// Vector angThrow; // 214
|
||||
// float flVel; // 221
|
||||
// Vector vecSrc; // 227
|
||||
// Vector vecThrow; // 230
|
||||
// }
|
||||
if (m_flReleaseThrow == 0 && m_flStartThrow != 0.0f)
|
||||
m_flReleaseThrow = gpGlobals->time;
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
if (m_flStartThrow)
|
||||
{
|
||||
m_pPlayer->Radio("%!MRAD_FIREINHOLE", "#Fire_in_the_hole");
|
||||
|
||||
Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
|
||||
|
||||
if (angThrow.x < 0)
|
||||
angThrow.x = -10 + angThrow.x * ((90 - 10) / 90.0);
|
||||
else
|
||||
angThrow.x = -10 + angThrow.x * ((90 + 10) / 90.0);
|
||||
|
||||
float_precision flVel = (90.0 - angThrow.x) * 6.0;
|
||||
|
||||
if (flVel > 750.0f)
|
||||
flVel = 750.0f;
|
||||
|
||||
UTIL_MakeVectors(angThrow);
|
||||
|
||||
Vector vecSrc = m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16;
|
||||
Vector vecThrow = gpGlobals->v_forward * flVel + m_pPlayer->pev->velocity;
|
||||
|
||||
CGrenade::ShootTimed2(m_pPlayer->pev, vecSrc, vecThrow, 1.5, m_pPlayer->m_iTeam, m_usCreateExplosion);
|
||||
|
||||
SendWeaponAnim(HEGRENADE_THROW, UseDecrement() != FALSE);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
// player "shoot" animation
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
m_flStartThrow = 0;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
|
||||
|
||||
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
// just threw last grenade
|
||||
// set attack times in the future, and weapon idle in the future so we can see the whole throw
|
||||
// animation, weapon idle will automatically retire the weapon for us.
|
||||
// ensure that the animation can finish playing
|
||||
m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||
}
|
||||
|
||||
ResetPlayerShieldAnim();
|
||||
}
|
||||
else if (m_flReleaseThrow > 0)
|
||||
{
|
||||
// we've finished the throw, restart.
|
||||
m_flStartThrow = 0;
|
||||
|
||||
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
SendWeaponAnim(HEGRENADE_DRAW, UseDecrement() != FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
RetireWeapon();
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15);
|
||||
m_flReleaseThrow = -1;
|
||||
}
|
||||
else if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
if (m_pPlayer->HasShield())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
SendWeaponAnim(SHIELDREN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendWeaponAnim(HEGRENADE_IDLE, UseDecrement() != FALSE);
|
||||
|
||||
// how long till we do this again.
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* <26b021> ../cstrike/dlls/wpn_shared/wpn_hegrenade.cpp:303 */
|
||||
NOBODY BOOL CHEGrenade::CanDeploy(void)
|
||||
BOOL CHEGrenade::__MAKE_VHOOK(CanDeploy)(void)
|
||||
{
|
||||
return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CHEGrenade::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CHEGrenade::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CHEGrenade::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CHEGrenade::CanDeploy(void)
|
||||
{
|
||||
return CanDeploy_();
|
||||
}
|
||||
|
||||
BOOL CHEGrenade::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CHEGrenade::Holster(int skiplocal)
|
||||
{
|
||||
Holster_(skiplocal);
|
||||
}
|
||||
|
||||
void CHEGrenade::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CHEGrenade::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CHEGrenade::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#define KNIFE_BODYHIT_VOLUME 128
|
||||
#define KNIFE_WALLHIT_VOLUME 512
|
||||
|
||||
#define KNIFE_MAX_SPEED 250
|
||||
#define KNIFE_MAX_SPEED_SHIELD 180
|
||||
|
||||
@ -249,7 +250,7 @@ bool CKnife::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) != WPNSTATE_SHIELD_DRAWN);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.4);
|
||||
|
@ -1,64 +1,253 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define M249_MAX_SPEED 220
|
||||
|
||||
#define M249_DAMAGE 32
|
||||
#define M249_RANGE_MODIFER 0.97
|
||||
|
||||
#define M249_RELOAD_TIME 4.7
|
||||
|
||||
enum m249_e
|
||||
{
|
||||
M249_IDLE1,
|
||||
M249_SHOOT1,
|
||||
M249_SHOOT2,
|
||||
M249_RELOAD,
|
||||
M249_DRAW
|
||||
};
|
||||
|
||||
/* <276bbd> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:49 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_m249, CM249);
|
||||
|
||||
/* <276951> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:51 */
|
||||
NOBODY void CM249::Spawn(void)
|
||||
void CM249::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_M249;
|
||||
SET_MODEL(edict(), "models/w_m249.mdl");
|
||||
|
||||
m_iDefaultAmmo = M249_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2768d0> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:65 */
|
||||
NOBODY void CM249::Precache(void)
|
||||
void CM249::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_m249.mdl");
|
||||
PRECACHE_MODEL("models/w_m249.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/m249-1.wav");
|
||||
PRECACHE_SOUND("weapons/m249-2.wav");
|
||||
PRECACHE_SOUND("weapons/m249_boxout.wav");
|
||||
PRECACHE_SOUND("weapons/m249_boxin.wav");
|
||||
PRECACHE_SOUND("weapons/m249_chain.wav");
|
||||
PRECACHE_SOUND("weapons/m249_coverup.wav");
|
||||
PRECACHE_SOUND("weapons/m249_coverdown.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireM249 = PRECACHE_EVENT(1, "events/m249.sc");
|
||||
}
|
||||
|
||||
/* <2768f7> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:84 */
|
||||
NOBODY int CM249::GetItemInfo(ItemInfo *p)
|
||||
int CM249::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556NatoBox";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATOBOX;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = M249_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 4;
|
||||
p->iId = m_iId = WEAPON_M249;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = M249_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <27692a> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:101 */
|
||||
NOBODY BOOL CM249::Deploy(void)
|
||||
BOOL CM249::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_m249.mdl", "models/p_m249.mdl", M249_DRAW, "m249", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <276b73> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:111 */
|
||||
NOBODY void CM249::PrimaryAttack(void)
|
||||
void CM249::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 115
|
||||
// PrimaryAttack(CM249 *const this); // 111
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
M249Fire(0.045 + (0.5 * m_flAccuracy), 0.1, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
M249Fire(0.045 + (0.095 * m_flAccuracy), 0.1, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
M249Fire(0.03 * m_flAccuracy, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <276c87> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:121 */
|
||||
NOBODY void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 161
|
||||
// Vector vecSrc; // 163
|
||||
// Vector vecDir; // 164
|
||||
// int flag; // 167
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 156
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 165
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 165
|
||||
// Length2D(const Vector *const this); // 192
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 175) + 0.4;
|
||||
|
||||
if (m_flAccuracy > 0.9)
|
||||
m_flAccuracy = 0.9;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
M249_DAMAGE, M249_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireM249, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.6;
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.8, 0.65, 0.45, 0.125, 5.0, 3.5, 8);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.1, 0.5, 0.3, 0.06, 4.0, 3.0, 8);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.75, 0.325, 0.25, 0.025, 3.5, 2.5, 9);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.8, 0.35, 0.3, 0.03, 3.75, 3.0, 9);
|
||||
}
|
||||
}
|
||||
|
||||
/* <276a02> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:201 */
|
||||
NOBODY void CM249::Reload(void)
|
||||
void CM249::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 206
|
||||
// }
|
||||
// Reload(CM249 *const this); // 201
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// to prevent reload if not enough ammo
|
||||
if (m_pPlayer->ammo_556natobox <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // REGAMEDLL_FIXES
|
||||
|
||||
if (DefaultReload(M249_MAX_CLIP, M249_RELOAD, M249_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0.2;
|
||||
m_bDelayFire = false;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2769c7> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:222 */
|
||||
NOBODY void CM249::WeaponIdle(void)
|
||||
void CM249::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CM249 *const this); // 222
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(M249_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CM249::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CM249::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CM249::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CM249::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CM249::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CM249::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CM249::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,59 +1,275 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define M3_MAX_SPEED 230
|
||||
#define M3_CONE_VECTOR Vector(0.0675, 0.0675, 0.0) // special shotgun spreads
|
||||
|
||||
enum m3_e
|
||||
{
|
||||
M3_IDLE,
|
||||
M3_FIRE1,
|
||||
M3_FIRE2,
|
||||
M3_RELOAD,
|
||||
M3_PUMP,
|
||||
M3_START_RELOAD,
|
||||
M3_DRAW,
|
||||
M3_HOLSTER
|
||||
};
|
||||
|
||||
/* <27bf59> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:52 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_m3, CM3);
|
||||
|
||||
/* <27be6d> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:54 */
|
||||
NOBODY void CM3::Spawn(void)
|
||||
void CM3::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_M3;
|
||||
SET_MODEL(edict(), "models/w_m3.mdl");
|
||||
|
||||
m_iDefaultAmmo = M3_DEFAULT_GIVE;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <27bc83> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:66 */
|
||||
NOBODY void CM3::Precache(void)
|
||||
void CM3::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_m3.mdl");
|
||||
PRECACHE_MODEL("models/w_m3.mdl");
|
||||
|
||||
m_iShellId = m_iShell = PRECACHE_MODEL("models/shotgunshell.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/m3-1.wav");
|
||||
PRECACHE_SOUND("weapons/m3_insertshell.wav");
|
||||
PRECACHE_SOUND("weapons/m3_pump.wav");
|
||||
PRECACHE_SOUND("weapons/reload1.wav");
|
||||
PRECACHE_SOUND("weapons/reload3.wav");
|
||||
|
||||
m_usFireM3 = PRECACHE_EVENT(1, "events/m3.sc");
|
||||
}
|
||||
|
||||
/* <27bcaa> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:84 */
|
||||
NOBODY int CM3::GetItemInfo(ItemInfo *p)
|
||||
int CM3::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "buckshot";
|
||||
p->iMaxAmmo1 = MAX_AMMO_BUCKSHOT;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = M3_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 5;
|
||||
p->iId = m_iId = WEAPON_M3;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = M3_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <27be46> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:103 */
|
||||
NOBODY BOOL CM3::Deploy(void)
|
||||
BOOL CM3::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
return DefaultDeploy("models/v_m3.mdl", "models/p_m3.mdl", M3_DRAW, "shotgun", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <27bcdd> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:109 */
|
||||
NOBODY void CM3::PrimaryAttack(void)
|
||||
void CM3::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 147
|
||||
// Vector vecSrc; // 148
|
||||
// int flag; // 152
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 146
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 147
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 149
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 149
|
||||
// Vector(Vector *const this,
|
||||
// float X,
|
||||
// float Y,
|
||||
// float Z); // 149
|
||||
// edict(CBaseEntity *const this); // 159
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
// don't fire underwater
|
||||
if (m_pPlayer->pev->waterlevel == 3)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.15);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
Reload();
|
||||
|
||||
if (!m_iClip)
|
||||
{
|
||||
PlayEmptySound();
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(1);
|
||||
return;
|
||||
}
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
m_iClip--;
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
// player "shoot" animation
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
m_pPlayer->FireBullets(9, vecSrc, vecAiming, M3_CONE_VECTOR, 3000, BULLET_PLAYER_BUCKSHOT, 0);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireM3, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, 0, 0, FALSE, FALSE);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
// HEV suit - indicate out of ammo condition
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
if (m_iClip != 0)
|
||||
m_flPumpTime = UTIL_WeaponTimeBase() + 0.5;
|
||||
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.875);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.875;
|
||||
|
||||
if (m_iClip != 0)
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.5;
|
||||
else
|
||||
m_flTimeWeaponIdle = 0.875;
|
||||
|
||||
m_fInSpecialReload = 0;
|
||||
|
||||
if (m_pPlayer->pev->flags & FL_ONGROUND)
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomLong(m_pPlayer->random_seed + 1, 4, 6);
|
||||
else
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomLong(m_pPlayer->random_seed + 1, 8, 11);
|
||||
|
||||
m_pPlayer->m_flEjectBrass = gpGlobals->time + 0.45;
|
||||
}
|
||||
|
||||
/* <27bf1e> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:182 */
|
||||
NOBODY void CM3::Reload(void)
|
||||
void CM3::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CM3 *const this); // 182
|
||||
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == M3_MAX_CLIP)
|
||||
return;
|
||||
|
||||
// don't reload until recoil is done
|
||||
if (m_flNextPrimaryAttack > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
// check to see if we're ready to reload
|
||||
if (m_fInSpecialReload == 0)
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
SendWeaponAnim(M3_START_RELOAD, UseDecrement() != FALSE);
|
||||
|
||||
m_fInSpecialReload = 1;
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.55;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.55;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.55);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.55;
|
||||
}
|
||||
else if (m_fInSpecialReload == 1)
|
||||
{
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
// was waiting for gun to move to side
|
||||
m_fInSpecialReload = 2;
|
||||
SendWeaponAnim(M3_RELOAD, UseDecrement());
|
||||
|
||||
m_flNextReload = UTIL_WeaponTimeBase() + 0.45;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.45;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iClip++;
|
||||
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
|
||||
m_pPlayer->ammo_buckshot--;
|
||||
m_fInSpecialReload = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* <27bee3> ../cstrike/dlls/wpn_shared/wpn_m3.cpp:228 */
|
||||
NOBODY void CM3::WeaponIdle(void)
|
||||
void CM3::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CM3 *const this); // 228
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES);
|
||||
|
||||
if (m_flPumpTime && m_flPumpTime < UTIL_WeaponTimeBase())
|
||||
{
|
||||
m_flPumpTime = 0;
|
||||
}
|
||||
|
||||
if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase())
|
||||
{
|
||||
if (m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
Reload();
|
||||
}
|
||||
else if (m_fInSpecialReload != 0)
|
||||
{
|
||||
if (m_iClip != M3_MAX_CLIP && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
Reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
// reload debounce has timed out
|
||||
SendWeaponAnim(M3_PUMP, UseDecrement() != FALSE);
|
||||
|
||||
m_fInSpecialReload = 0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendWeaponAnim(M3_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CM3::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CM3::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CM3::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CM3::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CM3::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CM3::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CM3::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,80 +1,342 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define M4A1_MAX_SPEED 230
|
||||
|
||||
#define M4A1_DAMAGE 32
|
||||
#define M4A1_DAMAGE_SIL 33
|
||||
|
||||
#define M4A1_RANGE_MODIFER 0.97
|
||||
#define M4A1_RANGE_MODIFER_SIL 0.95
|
||||
|
||||
#define M4A1_RELOAD_TIME 3.05
|
||||
|
||||
enum m4a1_e
|
||||
{
|
||||
M4A1_IDLE,
|
||||
M4A1_SHOOT1,
|
||||
M4A1_SHOOT2,
|
||||
M4A1_SHOOT3,
|
||||
M4A1_RELOAD,
|
||||
M4A1_DRAW,
|
||||
M4A1_ATTACH_SILENCER,
|
||||
M4A1_UNSIL_IDLE,
|
||||
M4A1_UNSIL_SHOOT1,
|
||||
M4A1_UNSIL_SHOOT2,
|
||||
M4A1_UNSIL_SHOOT3,
|
||||
M4A1_UNSIL_RELOAD,
|
||||
M4A1_UNSIL_DRAW,
|
||||
M4A1_DETACH_SILENCER
|
||||
};
|
||||
|
||||
/* <281342> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:60 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_m4a1, CM4A1);
|
||||
|
||||
/* <281059> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:62 */
|
||||
NOBODY void CM4A1::Spawn(void)
|
||||
void CM4A1::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_M4A1;
|
||||
SET_MODEL(edict(), "models/w_m4a1.mdl");
|
||||
|
||||
m_iDefaultAmmo = M4A1_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = true;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <280fb2> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:77 */
|
||||
NOBODY void CM4A1::Precache(void)
|
||||
void CM4A1::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_m4a1.mdl");
|
||||
PRECACHE_MODEL("models/w_m4a1.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/m4a1-1.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_unsil-1.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_unsil-2.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_boltpull.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_deploy.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_silencer_on.wav");
|
||||
PRECACHE_SOUND("weapons/m4a1_silencer_off.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireM4A1 = PRECACHE_EVENT(1, "events/m4a1.sc");
|
||||
}
|
||||
|
||||
/* <280fd9> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:97 */
|
||||
NOBODY int CM4A1::GetItemInfo(ItemInfo *p)
|
||||
int CM4A1::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = M4A1_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 6;
|
||||
p->iId = m_iId = WEAPON_M4A1;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = M4A1_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <281169> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:114 */
|
||||
NOBODY BOOL CM4A1::Deploy(void)
|
||||
BOOL CM4A1::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CM4A1 *const this); // 114
|
||||
m_bDelayFire = true;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
|
||||
iShellOn = 1;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_M4A1_SILENCED)
|
||||
return DefaultDeploy("models/v_m4a1.mdl", "models/p_m4a1.mdl", M4A1_DRAW, "rifle", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_m4a1.mdl", "models/p_m4a1.mdl", M4A1_UNSIL_DRAW, "rifle", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <281032> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:127 */
|
||||
NOBODY void CM4A1::SecondaryAttack(void)
|
||||
void CM4A1::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
if (m_iWeaponState & WPNSTATE_M4A1_SILENCED)
|
||||
{
|
||||
m_iWeaponState &= ~WPNSTATE_M4A1_SILENCED;
|
||||
SendWeaponAnim(M4A1_DETACH_SILENCER, UseDecrement() != FALSE);
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "rifle");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iWeaponState |= WPNSTATE_M4A1_SILENCED;
|
||||
SendWeaponAnim(M4A1_ATTACH_SILENCER, UseDecrement() != FALSE);
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "rifle");
|
||||
}
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 2.0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(2.0);
|
||||
}
|
||||
|
||||
/* <2812fd> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:149 */
|
||||
NOBODY void CM4A1::PrimaryAttack(void)
|
||||
void CM4A1::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 155
|
||||
// Length2D(const Vector *const this); // 164
|
||||
if (m_iWeaponState & WPNSTATE_M4A1_SILENCED)
|
||||
{
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
M4A1Fire(0.035 + (0.4 * m_flAccuracy), 0.0875, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
M4A1Fire(0.035 + (0.07 * m_flAccuracy), 0.0875, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
M4A1Fire(0.025 * m_flAccuracy, 0.0875, FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
M4A1Fire(0.035 + (0.4 * m_flAccuracy), 0.0875, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
M4A1Fire(0.035 + (0.07 * m_flAccuracy), 0.0875, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
M4A1Fire(0.02 * m_flAccuracy, 0.0875, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <28140c> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:173 */
|
||||
NOBODY void CM4A1::M4A1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CM4A1::M4A1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 210
|
||||
// Vector vecSrc; // 212
|
||||
// Vector vecDir; // 213
|
||||
// int flag; // 223
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 204
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 220
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 220
|
||||
// Length2D(const Vector *const this); // 246
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 216
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 216
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 220) + 0.3;
|
||||
|
||||
if (m_flAccuracy > 1)
|
||||
m_flAccuracy = 1;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_M4A1_SILENCED)
|
||||
{
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
M4A1_DAMAGE_SIL, M4A1_RANGE_MODIFER_SIL, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
}
|
||||
else
|
||||
{
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
M4A1_DAMAGE, M4A1_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
}
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
m_pPlayer->ammo_556nato--;
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireM4A1, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), (m_iWeaponState & WPNSTATE_M4A1_SILENCED) == WPNSTATE_M4A1_SILENCED, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.0, 0.45, 0.28, 0.045, 3.75, 3.0, 7);
|
||||
}
|
||||
else if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.2, 0.5, 0.23, 0.15, 5.5, 3.5, 6);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.6, 0.3, 0.2, 0.0125, 3.25, 2.0, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.65, 0.35, 0.25, 0.015, 3.5, 2.25, 7);
|
||||
}
|
||||
}
|
||||
|
||||
/* <28110b> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:257 */
|
||||
NOBODY void CM4A1::Reload(void)
|
||||
void CM4A1::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 262
|
||||
// }
|
||||
// Reload(CM4A1 *const this); // 257
|
||||
int iResult;
|
||||
if (m_pPlayer->ammo_556nato <= 0)
|
||||
return;
|
||||
|
||||
if ((m_iWeaponState & WPNSTATE_M4A1_SILENCED) == WPNSTATE_M4A1_SILENCED)
|
||||
{
|
||||
iResult = DefaultReload(M4A1_MAX_CLIP, M4A1_RELOAD, M4A1_RELOAD_TIME);
|
||||
}
|
||||
else
|
||||
iResult = DefaultReload(M4A1_MAX_CLIP, M4A1_UNSIL_RELOAD, M4A1_RELOAD_TIME);
|
||||
|
||||
if (iResult)
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2810cf> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:279 */
|
||||
NOBODY void CM4A1::WeaponIdle(void)
|
||||
void CM4A1::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CM4A1 *const this); // 279
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
SendWeaponAnim((m_iWeaponState & WPNSTATE_M4A1_SILENCED) == WPNSTATE_M4A1_SILENCED ? M4A1_IDLE : M4A1_UNSIL_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <28100c> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:296 */
|
||||
float CM4A1::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||
{
|
||||
return M4A1_MAX_SPEED;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CM4A1::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CM4A1::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CM4A1::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CM4A1::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
float CM4A1::GetMaxSpeed(void)
|
||||
{
|
||||
return 230.0f;
|
||||
return GetMaxSpeed_();
|
||||
}
|
||||
|
||||
void CM4A1::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CM4A1::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CM4A1::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CM4A1::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,60 +1,243 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define MAC10_MAX_SPEED 250
|
||||
|
||||
#define MAC10_DAMAGE 29
|
||||
#define MAC10_RANGE_MODIFER 0.82
|
||||
|
||||
#define MAC10_RELOAD_TIME 3.15
|
||||
|
||||
enum mac10_e
|
||||
{
|
||||
MAC10_IDLE1,
|
||||
MAC10_RELOAD,
|
||||
MAC10_DRAW,
|
||||
MAC10_SHOOT1,
|
||||
MAC10_SHOOT2,
|
||||
MAC10_SHOOT3
|
||||
};
|
||||
|
||||
/* <2867c0> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_mac10, CMAC10);
|
||||
|
||||
/* <28658a> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:52 */
|
||||
NOBODY void CMAC10::Spawn(void)
|
||||
void CMAC10::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_MAC10;
|
||||
SET_MODEL(edict(), "models/w_mac10.mdl");
|
||||
|
||||
m_iDefaultAmmo = MAC10_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.15;
|
||||
m_bDelayFire = false;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <286509> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:66 */
|
||||
NOBODY void CMAC10::Precache(void)
|
||||
void CMAC10::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_mac10.mdl");
|
||||
PRECACHE_MODEL("models/w_mac10.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/mac10-1.wav");
|
||||
PRECACHE_SOUND("weapons/mac10_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/mac10_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/mac10_boltpull.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireMAC10 = PRECACHE_EVENT(1, "events/mac10.sc");
|
||||
}
|
||||
|
||||
/* <286530> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:82 */
|
||||
NOBODY int CMAC10::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
int CMAC10::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "45acp";
|
||||
p->iMaxAmmo1 = MAX_AMMO_45ACP;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = MAC10_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 13;
|
||||
p->iId = m_iId = WEAPON_MAC10;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = MAC10_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <286563> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:99 */
|
||||
NOBODY BOOL CMAC10::Deploy(void)
|
||||
BOOL CMAC10::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.15;
|
||||
iShellOn = 1;
|
||||
m_bDelayFire = false;
|
||||
|
||||
return DefaultDeploy("models/v_mac10.mdl", "models/p_mac10.mdl", MAC10_DRAW, "onehanded", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <286786> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:108 */
|
||||
NOBODY void CMAC10::PrimaryAttack(void)
|
||||
void CMAC10::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CMAC10 *const this); // 108
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
MAC10Fire(0.375 * m_flAccuracy, 0.07, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
MAC10Fire(0.03 * m_flAccuracy, 0.07, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <28688a> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:116 */
|
||||
NOBODY void CMAC10::MAC10Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CMAC10::MAC10Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 159
|
||||
// Vector vecSrc; // 161
|
||||
// Vector vecDir; // 162
|
||||
// int flag; // 165
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 153
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 163
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 163
|
||||
// Length2D(const Vector *const this); // 190
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.6;
|
||||
|
||||
if (m_flAccuracy > 1.65)
|
||||
m_flAccuracy = 1.65;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 1, BULLET_PLAYER_45ACP,
|
||||
MAC10_DAMAGE, MAC10_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireMAC10, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.3, 0.55, 0.4, 0.05, 4.75, 3.75, 5);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(0.9, 0.45, 0.25, 0.035, 3.5, 2.75, 7);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.75, 0.4, 0.175, 0.03, 2.75, 2.5, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.775, 0.425, 0.2, 0.03, 3.0, 2.75, 9);
|
||||
}
|
||||
}
|
||||
|
||||
/* <28663b> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:199 */
|
||||
NOBODY void CMAC10::Reload(void)
|
||||
void CMAC10::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CMAC10 *const this); // 199
|
||||
if (m_pPlayer->ammo_45acp <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(MAC10_MAX_CLIP, MAC10_RELOAD, MAC10_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* <286600> ../cstrike/dlls/wpn_shared/wpn_mac10.cpp:213 */
|
||||
NOBODY void CMAC10::WeaponIdle(void)
|
||||
void CMAC10::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CMAC10 *const this); // 213
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(MAC10_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CMAC10::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CMAC10::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CMAC10::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CMAC10::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CMAC10::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CMAC10::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CMAC10::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,60 +1,246 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define MP5N_MAX_SPEED 250
|
||||
|
||||
#define MP5N_DAMAGE 26
|
||||
#define MP5N_RANGE_MODIFER 0.84
|
||||
|
||||
#define MP5N_RELOAD_TIME 2.63
|
||||
|
||||
enum mp5n_e
|
||||
{
|
||||
MP5N_IDLE1,
|
||||
MP5N_RELOAD,
|
||||
MP5N_DRAW,
|
||||
MP5N_SHOOT1,
|
||||
MP5N_SHOOT2,
|
||||
MP5N_SHOOT3
|
||||
};
|
||||
|
||||
/* <28bbf6> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_mp5navy, CMP5N);
|
||||
|
||||
/* <28b9c0> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:52 */
|
||||
NOBODY void CMP5N::Spawn(void)
|
||||
void CMP5N::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_MP5N;
|
||||
SET_MODEL(edict(), "models/w_mp5.mdl");
|
||||
|
||||
m_iDefaultAmmo = MP5NAVY_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0;
|
||||
m_bDelayFire = false;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <28b93f> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:66 */
|
||||
NOBODY void CMP5N::Precache(void)
|
||||
void CMP5N::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_mp5.mdl");
|
||||
PRECACHE_MODEL("models/w_mp5.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/mp5-1.wav");
|
||||
PRECACHE_SOUND("weapons/mp5-2.wav");
|
||||
PRECACHE_SOUND("weapons/mp5_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/mp5_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/mp5_slideback.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireMP5N = PRECACHE_EVENT(1, "events/mp5n.sc");
|
||||
}
|
||||
|
||||
/* <28b966> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:83 */
|
||||
NOBODY int CMP5N::GetItemInfo(ItemInfo *p)
|
||||
int CMP5N::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "9mm";
|
||||
p->iMaxAmmo1 = MAX_AMMO_9MM;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = MP5N_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 7;
|
||||
p->iId = m_iId = WEAPON_MP5N;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = MP5NAVY_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <28b999> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:100 */
|
||||
NOBODY BOOL CMP5N::Deploy(void)
|
||||
{
|
||||
BOOL CMP5N::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0;
|
||||
m_bDelayFire = false;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_mp5.mdl", "models/p_mp5.mdl", MP5N_DRAW, "mp5", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <28bbbc> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:109 */
|
||||
NOBODY void CMP5N::PrimaryAttack(void)
|
||||
void CMP5N::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CMP5N *const this); // 109
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
MP5NFire(0.2 * m_flAccuracy, 0.075, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
MP5NFire(0.04 * m_flAccuracy, 0.075, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <28bcc0> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:117 */
|
||||
NOBODY void CMP5N::MP5NFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CMP5N::MP5NFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// int flag; // 154
|
||||
// Vector vecAiming; // 161
|
||||
// Vector vecSrc; // 163
|
||||
// Vector vecDir; // 164
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 152
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 165
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 165
|
||||
// Length2D(const Vector *const this); // 192
|
||||
// }
|
||||
_LOG_TRACE
|
||||
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired) / 220.1) + 0.45;
|
||||
|
||||
if (m_flAccuracy > 0.75)
|
||||
m_flAccuracy = 0.75;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 1, BULLET_PLAYER_9MM,
|
||||
MP5N_DAMAGE, MP5N_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireMP5N, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(0.9, 0.475, 0.35, 0.0425, 5.0, 3.0, 6);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(0.5, 0.275, 0.2, 0.03, 3.0, 2.0, 10);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.225, 0.15, 0.1, 0.015, 2.0, 1.0, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.25, 0.175, 0.125, 0.02, 2.25, 1.25, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/* <28ba71> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:201 */
|
||||
NOBODY void CMP5N::Reload(void)
|
||||
void CMP5N::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CMP5N *const this); // 201
|
||||
if (m_pPlayer->ammo_9mm <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(MP5N_MAX_CLIP, MP5N_RELOAD, MP5N_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* <28ba36> ../cstrike/dlls/wpn_shared/wpn_mp5navy.cpp:215 */
|
||||
NOBODY void CMP5N::WeaponIdle(void)
|
||||
void CMP5N::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CMP5N *const this); // 215
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(MP5N_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CMP5N::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CMP5N::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CMP5N::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CMP5N::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CMP5N::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CMP5N::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CMP5N::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,69 +1,292 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define P228_MAX_SPEED 250
|
||||
|
||||
#define P228_DAMAGE 32
|
||||
#define P228_RANGE_MODIFER 0.8
|
||||
|
||||
#define P228_RELOAD_TIME 2.7
|
||||
|
||||
enum p228_e
|
||||
{
|
||||
P228_IDLE,
|
||||
P228_SHOOT1,
|
||||
P228_SHOOT2,
|
||||
P228_SHOOT3,
|
||||
P228_SHOOT_EMPTY,
|
||||
P228_RELOAD,
|
||||
P228_DRAW
|
||||
};
|
||||
|
||||
enum p228_shield_e
|
||||
{
|
||||
P228_SHIELD_IDLE,
|
||||
P228_SHIELD_SHOOT1,
|
||||
P228_SHIELD_SHOOT2,
|
||||
P228_SHIELD_SHOOT_EMPTY,
|
||||
P228_SHIELD_RELOAD,
|
||||
P228_SHIELD_DRAW,
|
||||
P228_SHIELD_IDLE_UP,
|
||||
P228_SHIELD_UP,
|
||||
P228_SHIELD_DOWN
|
||||
};
|
||||
|
||||
/* <291149> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:63 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_p228, CP228);
|
||||
|
||||
/* <290eb8> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:65 */
|
||||
NOBODY void CP228::Spawn(void)
|
||||
void CP228::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_P228;
|
||||
SET_MODEL(ENT(pev), "models/w_p228.mdl");
|
||||
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_iDefaultAmmo = P228_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.9;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <290e37> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:80 */
|
||||
NOBODY void CP228::Precache(void)
|
||||
void CP228::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_p228.mdl");
|
||||
PRECACHE_MODEL("models/w_p228.mdl");
|
||||
PRECACHE_MODEL("models/shield/v_shield_p228.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/p228-1.wav");
|
||||
PRECACHE_SOUND("weapons/p228_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/p228_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/p228_sliderelease.wav");
|
||||
PRECACHE_SOUND("weapons/p228_slidepull.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireP228 = PRECACHE_EVENT(1, "events/p228.sc");
|
||||
}
|
||||
|
||||
/* <290e5e> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:98 */
|
||||
NOBODY int CP228::GetItemInfo(ItemInfo *p)
|
||||
int CP228::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "357SIG";
|
||||
p->iMaxAmmo1 = MAX_AMMO_357SIG;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = P228_MAX_CLIP;
|
||||
p->iSlot = 1;
|
||||
p->iPosition = 3;
|
||||
p->iId = m_iId = WEAPON_P228;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = P228_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <290fc6> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:115 */
|
||||
NOBODY BOOL CP228::Deploy(void)
|
||||
BOOL CP228::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CP228 *const this); // 115
|
||||
m_flAccuracy = 0.9;
|
||||
m_fMaxSpeed = P228_MAX_SPEED;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
return DefaultDeploy("models/shield/v_shield_p228.mdl", "models/shield/p_shield_p228.mdl", P228_SHIELD_DRAW, "shieldgun", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_p228.mdl", "models/p_p228.mdl", P228_DRAW, "onehanded", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2910ff> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:130 */
|
||||
NOBODY void CP228::PrimaryAttack(void)
|
||||
void CP228::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 134
|
||||
// PrimaryAttack(CP228 *const this); // 130
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
P228Fire(1.5 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
P228Fire(0.255 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
P228Fire(0.075 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
P228Fire(0.15 * (1 - m_flAccuracy), 0.2, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <290e91> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:142 */
|
||||
NOBODY void CP228::SecondaryAttack(void)
|
||||
void CP228::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
ShieldSecondaryFire(SHIELDGUN_UP, SHIELDGUN_DOWN);
|
||||
}
|
||||
|
||||
/* <291213> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:147 */
|
||||
NOBODY void CP228::P228Fire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
void CP228::P228Fire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 203
|
||||
// Vector vecSrc; // 205
|
||||
// Vector vecDir; // 206
|
||||
// int flag; // 210
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 196
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 207
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 207
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
flCycleTime -= 0.05;
|
||||
|
||||
if (++m_iShotsFired > 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_flLastFire != 0.0)
|
||||
{
|
||||
m_flAccuracy -= (0.325 - (gpGlobals->time - m_flLastFire)) * 0.3;
|
||||
|
||||
if (m_flAccuracy > 0.9)
|
||||
{
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
else if (m_flAccuracy < 0.6)
|
||||
{
|
||||
m_flAccuracy = 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
m_flLastFire = gpGlobals->time;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 4096, 1, BULLET_PLAYER_357SIG, P228_DAMAGE, P228_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireP228, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip == 0, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, FALSE);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
ResetPlayerShieldAnim();
|
||||
}
|
||||
|
||||
/* <290f69> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:241 */
|
||||
NOBODY void CP228::Reload(void)
|
||||
void CP228::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 246
|
||||
// }
|
||||
// Reload(CP228 *const this); // 241
|
||||
if (m_pPlayer->ammo_357sig <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(P228_MAX_CLIP, m_pPlayer->HasShield() ? P228_SHIELD_RELOAD : P228_RELOAD, P228_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
/* <290f2e> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:261 */
|
||||
NOBODY void CP228::WeaponIdle(void)
|
||||
void CP228::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CP228 *const this); // 261
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
SendWeaponAnim(P228_SHIELD_IDLE_UP, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
else if (m_iClip)
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625;
|
||||
SendWeaponAnim(P228_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CP228::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CP228::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CP228::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CP228::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CP228::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CP228::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CP228::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CP228::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,6 +1,10 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define P90_MAX_SPEED 245
|
||||
|
||||
#define P90_DAMAGE 21
|
||||
#define P90_RANGE_MODIFER 0.885
|
||||
|
||||
#define P90_RELOAD_TIME 3.4
|
||||
|
||||
enum p90_e
|
||||
@ -135,22 +139,9 @@ void CP90::P90Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecDir = gpGlobals->v_forward;
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecAiming = m_pPlayer->FireBullets3
|
||||
(
|
||||
vecSrc,
|
||||
vecDir,
|
||||
flSpread,
|
||||
8192,
|
||||
1,
|
||||
BULLET_PLAYER_57MM,
|
||||
21,
|
||||
0.885,
|
||||
m_pPlayer->pev,
|
||||
false,
|
||||
m_pPlayer->random_seed
|
||||
);
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 1, BULLET_PLAYER_57MM, P90_DAMAGE, P90_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
@ -158,21 +149,8 @@ void CP90::P90Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL
|
||||
(
|
||||
flag,
|
||||
m_pPlayer->edict(),
|
||||
m_usFireP90,
|
||||
0,
|
||||
(float *)&g_vecZero,
|
||||
(float *)&g_vecZero,
|
||||
vecAiming.x,
|
||||
vecAiming.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100),
|
||||
(int)(m_pPlayer->pev->punchangle.y * 100),
|
||||
5,
|
||||
FALSE
|
||||
);
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireP90, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
|
@ -1,79 +1,295 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SCOUT_MAX_SPEED 260
|
||||
#define SCOUT_MAX_SPEED_ZOOM 220
|
||||
|
||||
#define SCOUT_DAMAGE 75
|
||||
#define SCOUT_RANGE_MODIFER 0.98
|
||||
|
||||
#define SCOUT_RELOAD_TIME 2
|
||||
|
||||
enum scout_e
|
||||
{
|
||||
SCOUT_IDLE,
|
||||
SCOUT_SHOOT,
|
||||
SCOUT_SHOOT2,
|
||||
SCOUT_RELOAD,
|
||||
SCOUT_DRAW
|
||||
};
|
||||
|
||||
/* <29ba7b> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:48 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_scout, CSCOUT);
|
||||
|
||||
/* <29b7ee> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:50 */
|
||||
NOBODY void CSCOUT::Spawn(void)
|
||||
void CSCOUT::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_SCOUT;
|
||||
SET_MODEL(edict(), "models/w_scout.mdl");
|
||||
|
||||
m_iDefaultAmmo = SCOUT_DEFAULT_GIVE;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <29b70a> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:62 */
|
||||
NOBODY void CSCOUT::Precache(void)
|
||||
void CSCOUT::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_scout.mdl");
|
||||
PRECACHE_MODEL("models/w_scout.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/scout_fire-1.wav");
|
||||
PRECACHE_SOUND("weapons/scout_bolt.wav");
|
||||
PRECACHE_SOUND("weapons/scout_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/scout_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/zoom.wav");
|
||||
|
||||
m_iShellId = m_iShell = PRECACHE_MODEL("models/rshell_big.mdl");
|
||||
m_usFireScout = PRECACHE_EVENT(1, "events/scout.sc");
|
||||
}
|
||||
|
||||
/* <29b731> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:79 */
|
||||
NOBODY int CSCOUT::GetItemInfo(ItemInfo *p)
|
||||
int CSCOUT::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "762Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_762NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = SCOUT_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 9;
|
||||
p->iId = m_iId = WEAPON_SCOUT;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = SCOUT_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <29b8f7> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:96 */
|
||||
NOBODY BOOL CSCOUT::Deploy(void)
|
||||
BOOL CSCOUT::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
// Deploy(CSCOUT *const this); // 96
|
||||
if (DefaultDeploy("models/v_scout.mdl", "models/p_scout.mdl", SCOUT_DRAW, "rifle", UseDecrement() != FALSE))
|
||||
{
|
||||
m_flNextPrimaryAttack = m_pPlayer->m_flNextAttack = GetNextAttackDelay(1.25);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* <29b78a> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:109 */
|
||||
NOBODY void CSCOUT::SecondaryAttack(void)
|
||||
void CSCOUT::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
// EMIT_SOUND(edict_t *entity,
|
||||
// int channel,
|
||||
// const char *sample,
|
||||
// float volume,
|
||||
// float attenuation); // 136
|
||||
switch (m_pPlayer->m_iFOV)
|
||||
{
|
||||
case 90: m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 40; break;
|
||||
case 40: m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15; break;
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
default:
|
||||
#else
|
||||
case 15:
|
||||
#endif // REGAMEDLL_FIXES
|
||||
m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 90; break;
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_ZOOMED, m_pPlayer);
|
||||
}
|
||||
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
EMIT_SOUND(m_pPlayer->edict(), CHAN_ITEM, "weapons/zoom.wav", 0.2, 2.4);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
|
||||
/* <29ba31> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:140 */
|
||||
NOBODY void CSCOUT::PrimaryAttack(void)
|
||||
void CSCOUT::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 144
|
||||
// PrimaryAttack(CSCOUT *const this); // 140
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
SCOUTFire(0.2, 1.25, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 170)
|
||||
{
|
||||
SCOUTFire(0.075, 1.25, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
SCOUTFire(0, 1.25, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SCOUTFire(0.007, 1.25, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <29bb45> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:154 */
|
||||
NOBODY void CSCOUT::SCOUTFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CSCOUT::SCOUTFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 197
|
||||
// Vector vecSrc; // 200
|
||||
// Vector vecDir; // 202
|
||||
// int flag; // 206
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 188
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 203
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 203
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
if (m_pPlayer->pev->fov != DEFAULT_FOV)
|
||||
{
|
||||
m_pPlayer->m_bResumeZoom = true;
|
||||
m_pPlayer->m_iLastZoom = m_pPlayer->m_iFOV;
|
||||
|
||||
// reset a fov
|
||||
m_pPlayer->m_iFOV = DEFAULT_FOV;
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
m_pPlayer->pev->fov = DEFAULT_FOV;
|
||||
#endif // REGAMEDLL_FIXES
|
||||
}
|
||||
else
|
||||
{
|
||||
flSpread += 0.025;
|
||||
}
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_flEjectBrass = gpGlobals->time + 0.56;
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 3, BULLET_PLAYER_762MM, SCOUT_DAMAGE, SCOUT_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireScout, 0, (float *)&g_vecZero, (float *)&m_pPlayer->pev->angles, (vecDir.x * 1000), (vecDir.y * 1000),
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.x * 100), FALSE, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
}
|
||||
|
||||
/* <29b89e> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:232 */
|
||||
NOBODY void CSCOUT::Reload(void)
|
||||
void CSCOUT::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 234
|
||||
// }
|
||||
// Reload(CSCOUT *const this); // 232
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// to prevent reload if not enough ammo
|
||||
if (m_pPlayer->ammo_762nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // REGAMEDLL_FIXES
|
||||
|
||||
if (DefaultReload(SCOUT_MAX_CLIP, SCOUT_RELOAD, SCOUT_RELOAD_TIME))
|
||||
{
|
||||
if (m_pPlayer->pev->fov != DEFAULT_FOV)
|
||||
{
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 15;
|
||||
SecondaryAttack();
|
||||
}
|
||||
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
}
|
||||
}
|
||||
|
||||
/* <29b864> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:250 */
|
||||
NOBODY void CSCOUT::WeaponIdle(void)
|
||||
void CSCOUT::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CSCOUT *const this); // 250
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iClip)
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60;
|
||||
SendWeaponAnim(SCOUT_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <29b764> ../cstrike/dlls/wpn_shared/wpn_scout.cpp:267 */
|
||||
NOBODY float CSCOUT::GetMaxSpeed(void)
|
||||
float CSCOUT::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||
{
|
||||
return (m_pPlayer->m_iFOV == DEFAULT_FOV) ? SCOUT_MAX_SPEED : SCOUT_MAX_SPEED_ZOOM;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CSCOUT::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CSCOUT::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CSCOUT::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CSCOUT::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
float CSCOUT::GetMaxSpeed(void)
|
||||
{
|
||||
return GetMaxSpeed_();
|
||||
}
|
||||
|
||||
void CSCOUT::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CSCOUT::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CSCOUT::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CSCOUT::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,78 +1,291 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SG550_MAX_SPEED 210
|
||||
#define SG550_MAX_SPEED_ZOOM 150
|
||||
|
||||
#define SG550_DAMAGE 70
|
||||
#define SG550_RANGE_MODIFER 0.98
|
||||
|
||||
#define SG550_RELOAD_TIME 3.35
|
||||
|
||||
enum sg550_e
|
||||
{
|
||||
SG550_IDLE,
|
||||
SG550_SHOOT,
|
||||
SG550_SHOOT2,
|
||||
SG550_RELOAD,
|
||||
SG550_DRAW
|
||||
};
|
||||
|
||||
/* <2a0f39> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:48 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_sg550, CSG550);
|
||||
|
||||
/* <2a0ce8> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:50 */
|
||||
NOBODY void CSG550::Spawn(void)
|
||||
void CSG550::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_SG550;
|
||||
SET_MODEL(edict(), "models/w_sg550.mdl");
|
||||
|
||||
m_iDefaultAmmo = SG550_DEFAULT_GIVE;
|
||||
m_flLastFire = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2a0bdd> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:63 */
|
||||
NOBODY void CSG550::Precache(void)
|
||||
void CSG550::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_sg550.mdl");
|
||||
PRECACHE_MODEL("models/w_sg550.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/sg550-1.wav");
|
||||
PRECACHE_SOUND("weapons/sg550_boltpull.wav");
|
||||
PRECACHE_SOUND("weapons/sg550_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/sg550_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/zoom.wav");
|
||||
|
||||
m_iShellId = m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireSG550 = PRECACHE_EVENT(1, "events/sg550.sc");
|
||||
}
|
||||
|
||||
/* <2a0c04> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:79 */
|
||||
NOBODY int CSG550::GetItemInfo(ItemInfo *p)
|
||||
int CSG550::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = SG550_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 16;
|
||||
p->iId = m_iId = WEAPON_SG550;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = SG550_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2a0cc1> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:96 */
|
||||
NOBODY BOOL CSG550::Deploy(void)
|
||||
BOOL CSG550::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
return DefaultDeploy("models/v_sg550.mdl", "models/p_sg550.mdl", SG550_DRAW, "rifle", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2a0c5d> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:101 */
|
||||
NOBODY void CSG550::SecondaryAttack(void)
|
||||
void CSG550::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
// EMIT_SOUND(edict_t *entity,
|
||||
// int channel,
|
||||
// const char *sample,
|
||||
// float volume,
|
||||
// float attenuation); // 128
|
||||
switch (m_pPlayer->m_iFOV)
|
||||
{
|
||||
case 90: m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 40; break;
|
||||
case 40: m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15; break;
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
default:
|
||||
#else
|
||||
case 15:
|
||||
#endif // REGAMEDLL_FIXES
|
||||
m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 90; break;
|
||||
}
|
||||
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_ZOOMED, m_pPlayer);
|
||||
}
|
||||
|
||||
EMIT_SOUND(m_pPlayer->edict(), CHAN_ITEM, "weapons/zoom.wav", 0.2, 2.4);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
|
||||
/* <2a0eef> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:132 */
|
||||
NOBODY void CSG550::PrimaryAttack(void)
|
||||
void CSG550::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 136
|
||||
// PrimaryAttack(CSG550 *const this); // 132
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
SG550Fire(0.45 * (1 - m_flAccuracy), 0.25, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
SG550Fire(0.15, 0.25, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
SG550Fire(0.04 * (1 - m_flAccuracy), 0.25, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SG550Fire(0.05 * (1 - m_flAccuracy), 0.25, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2a1003> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:144 */
|
||||
NOBODY void CSG550::SG550Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CSG550::SG550Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 193
|
||||
// Vector vecSrc; // 195
|
||||
// Vector vecDir; // 196
|
||||
// int flag; // 200
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 187
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 197
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 197
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
if (m_pPlayer->pev->fov == DEFAULT_FOV)
|
||||
{
|
||||
flSpread += 0.025;
|
||||
}
|
||||
|
||||
if (m_flLastFire)
|
||||
{
|
||||
m_flAccuracy = (gpGlobals->time - m_flLastFire) * 0.35 + 0.65;
|
||||
|
||||
if (m_flAccuracy > 0.98)
|
||||
{
|
||||
m_flAccuracy = 0.98;
|
||||
}
|
||||
}
|
||||
|
||||
m_flLastFire = gpGlobals->time;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM, SG550_DAMAGE, SG550_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireSG550, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.x * 100), 5, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomFloat(m_pPlayer->random_seed + 4, 0.75, 1.25) + m_pPlayer->pev->punchangle.x * 0.25;
|
||||
m_pPlayer->pev->punchangle.y += UTIL_SharedRandomFloat(m_pPlayer->random_seed + 5, -0.75, 0.75);
|
||||
}
|
||||
|
||||
/* <2a0d98> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:227 */
|
||||
NOBODY void CSG550::Reload(void)
|
||||
void CSG550::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 232
|
||||
// }
|
||||
// Reload(CSG550 *const this); // 227
|
||||
if (m_pPlayer->ammo_556nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(SG550_MAX_CLIP, SG550_RELOAD, SG550_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
if (m_pPlayer->pev->fov != DEFAULT_FOV)
|
||||
{
|
||||
m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15;
|
||||
SecondaryAttack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <2a0d5e> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:248 */
|
||||
NOBODY void CSG550::WeaponIdle(void)
|
||||
void CSG550::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CSG550 *const this); // 248
|
||||
ResetEmptySound();
|
||||
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iClip)
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0;
|
||||
SendWeaponAnim(SG550_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2a0c37> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:265 */
|
||||
NOBODY float CSG550::GetMaxSpeed(void)
|
||||
float CSG550::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||
{
|
||||
return (m_pPlayer->m_iFOV == DEFAULT_FOV) ? SG550_MAX_SPEED : SG550_MAX_SPEED_ZOOM;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CSG550::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CSG550::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CSG550::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CSG550::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
float CSG550::GetMaxSpeed(void)
|
||||
{
|
||||
return GetMaxSpeed_();
|
||||
}
|
||||
|
||||
void CSG550::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CSG550::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CSG550::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CSG550::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,74 +1,285 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SG552_MAX_SPEED 235
|
||||
#define SG552_MAX_SPEED_ZOOM 200
|
||||
|
||||
#define SG552_DAMAGE 33
|
||||
#define SG552_RANGE_MODIFER 0.955
|
||||
|
||||
#define SG552_RELOAD_TIME 3
|
||||
|
||||
enum sg552_e
|
||||
{
|
||||
SG552_IDLE1,
|
||||
SG552_RELOAD,
|
||||
SG552_DRAW,
|
||||
SG552_SHOOT1,
|
||||
SG552_SHOOT2,
|
||||
SG552_SHOOT3
|
||||
};
|
||||
|
||||
/* <2a61d9> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_sg552, CSG552);
|
||||
|
||||
/* <2a60cb> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:52 */
|
||||
NOBODY void CSG552::Spawn(void)
|
||||
void CSG552::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_SG552;
|
||||
SET_MODEL(edict(), "models/w_sg552.mdl");
|
||||
|
||||
m_iDefaultAmmo = SG552_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2a5ffe> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:66 */
|
||||
NOBODY void CSG552::Precache(void)
|
||||
void CSG552::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_sg552.mdl");
|
||||
PRECACHE_MODEL("models/w_sg552.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/sg552-1.wav");
|
||||
PRECACHE_SOUND("weapons/sg552-2.wav");
|
||||
PRECACHE_SOUND("weapons/sg552_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/sg552_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/sg552_boltpull.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/rshell.mdl");
|
||||
m_usFireSG552 = PRECACHE_EVENT(1, "events/sg552.sc");
|
||||
}
|
||||
|
||||
/* <2a6025> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:83 */
|
||||
NOBODY int CSG552::GetItemInfo(ItemInfo *p)
|
||||
int CSG552::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "556Nato";
|
||||
p->iMaxAmmo1 = MAX_AMMO_556NATO;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = SG552_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 10;
|
||||
p->iId = m_iId = WEAPON_SG552;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = SG552_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2a60a4> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:100 */
|
||||
NOBODY BOOL CSG552::Deploy(void)
|
||||
{
|
||||
BOOL CSG552::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_sg552.mdl", "models/p_sg552.mdl", SG552_DRAW, "mp5", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2a6058> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:109 */
|
||||
NOBODY void CSG552::SecondaryAttack(void)
|
||||
void CSG552::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
if (m_pPlayer->m_iFOV == DEFAULT_FOV)
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 55;
|
||||
else
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 90;
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
|
||||
/* <2a63eb> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:130 */
|
||||
NOBODY void CSG552::PrimaryAttack(void)
|
||||
void CSG552::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// Length2D(const Vector *const this); // 134
|
||||
// PrimaryAttack(CSG552 *const this); // 130
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
SG552Fire(0.035 + (0.45 * m_flAccuracy), 0.0825, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||
{
|
||||
SG552Fire(0.035 + (0.075 * m_flAccuracy), 0.0825, FALSE);
|
||||
}
|
||||
else if (m_pPlayer->pev->fov == DEFAULT_FOV)
|
||||
{
|
||||
SG552Fire(0.02 * m_flAccuracy, 0.0825, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SG552Fire(0.02 * m_flAccuracy, 0.135, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2a62a3> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:143 */
|
||||
NOBODY void CSG552::SG552Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CSG552::SG552Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// int flag; // 181
|
||||
// Vector vecAiming; // 190
|
||||
// Vector vecSrc; // 192
|
||||
// Vector vecDir; // 194
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 189
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 195
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 195
|
||||
// Length2D(const Vector *const this); // 214
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 220) + 0.3;
|
||||
|
||||
if (m_flAccuracy > 1)
|
||||
m_flAccuracy = 1;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 2, BULLET_PLAYER_556MM,
|
||||
SG552_DAMAGE, SG552_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireSG552, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(1.0, 0.45, 0.28, 0.04, 4.25, 2.5, 7);
|
||||
}
|
||||
else if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.25, 0.45, 0.22, 0.18, 6.0, 4.0, 5);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.6, 0.35, 0.2, 0.0125, 3.7, 2.0, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.625, 0.375, 0.25, 0.0125, 4.0, 2.25, 9);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2a617c> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:225 */
|
||||
NOBODY void CSG552::Reload(void)
|
||||
void CSG552::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// {
|
||||
// int iResult; // 230
|
||||
// }
|
||||
// Reload(CSG552 *const this); // 225
|
||||
if (m_pPlayer->ammo_556nato <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(SG552_MAX_CLIP, SG552_RELOAD, SG552_RELOAD_TIME))
|
||||
{
|
||||
if (m_pPlayer->m_iFOV != DEFAULT_FOV)
|
||||
{
|
||||
SecondaryAttack();
|
||||
}
|
||||
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2a6141> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:244 */
|
||||
NOBODY void CSG552::WeaponIdle(void)
|
||||
void CSG552::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CSG552 *const this); // 244
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(SG552_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2a607e> ../cstrike/dlls/wpn_shared/wpn_sg552.cpp:259 */
|
||||
NOBODY float CSG552::GetMaxSpeed(void)
|
||||
float CSG552::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||
{
|
||||
return (m_pPlayer->m_iFOV == DEFAULT_FOV) ? SG552_MAX_SPEED : SG552_MAX_SPEED_ZOOM;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CSG552::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CSG552::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CSG552::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CSG552::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
float CSG552::GetMaxSpeed(void)
|
||||
{
|
||||
return GetMaxSpeed_();
|
||||
}
|
||||
|
||||
void CSG552::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CSG552::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CSG552::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CSG552::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,78 +1,344 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SMOKEGRENADE_MAX_SPEED 250
|
||||
#define SMOKEGRENADE_MAX_SPEED_SHIELD 180
|
||||
|
||||
enum smokegrenade_e
|
||||
{
|
||||
SMOKEGRENADE_IDLE,
|
||||
SMOKEGRENADE_PINPULL,
|
||||
SMOKEGRENADE_THROW,
|
||||
SMOKEGRENADE_DRAW
|
||||
};
|
||||
|
||||
/* <2ab333> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:38 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_smokegrenade, CSmokeGrenade);
|
||||
|
||||
/* <2aafc7> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:40 */
|
||||
NOBODY void CSmokeGrenade::Spawn(void)
|
||||
void CSmokeGrenade::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_SMOKEGRENADE;
|
||||
|
||||
SET_MODEL(edict(), "models/w_smokegrenade.mdl");
|
||||
|
||||
pev->dmg = 4;
|
||||
|
||||
m_iDefaultAmmo = SMOKEGRENADE_DEFAULT_GIVE;
|
||||
m_flStartThrow = 0;
|
||||
m_flReleaseThrow = -1;
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
|
||||
// get ready to fall down.
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2aaf12> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:59 */
|
||||
NOBODY void CSmokeGrenade::Precache(void)
|
||||
void CSmokeGrenade::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_smokegrenade.mdl");
|
||||
PRECACHE_MODEL("models/shield/v_shield_smokegrenade.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/pinpull.wav");
|
||||
PRECACHE_SOUND("weapons/sg_explode.wav");
|
||||
|
||||
m_usCreateSmoke = PRECACHE_EVENT(1, "events/createsmoke.sc");
|
||||
}
|
||||
|
||||
/* <2aaf39> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:71 */
|
||||
NOBODY int CSmokeGrenade::GetItemInfo(ItemInfo *p)
|
||||
int CSmokeGrenade::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "SmokeGrenade";
|
||||
p->iMaxAmmo1 = MAX_AMMO_SMOKEGRENADE;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = WEAPON_NOCLIP;
|
||||
p->iSlot = 3;
|
||||
p->iPosition = 3;
|
||||
p->iId = m_iId = WEAPON_SMOKEGRENADE;
|
||||
p->iWeight = SMOKEGRENADE_WEIGHT;
|
||||
p->iFlags = ITEM_FLAG_LIMITINWORLD | ITEM_FLAG_EXHAUSTIBLE;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2ab077> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:89 */
|
||||
NOBODY BOOL CSmokeGrenade::Deploy(void)
|
||||
{
|
||||
// Deploy(CSmokeGrenade *const this); // 89
|
||||
BOOL CSmokeGrenade::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
|
||||
m_flReleaseThrow = -1;
|
||||
m_fMaxSpeed = SMOKEGRENADE_MAX_SPEED;
|
||||
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
return DefaultDeploy("models/shield/v_shield_smokegrenade.mdl", "models/shield/p_shield_smokegrenade.mdl", SMOKEGRENADE_DRAW, "shieldgren", UseDecrement() != FALSE);
|
||||
else
|
||||
return DefaultDeploy("models/v_smokegrenade.mdl", "models/p_smokegrenade.mdl", SMOKEGRENADE_DRAW, "grenade", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2aaf92> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:104 */
|
||||
NOBODY void CSmokeGrenade::Holster(int skiplocal)
|
||||
void CSmokeGrenade::__MAKE_VHOOK(Holster)(int skiplocal)
|
||||
{
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
// no more smokegrenades!
|
||||
// clear the smokegrenade of bits for HUD
|
||||
m_pPlayer->pev->weapons &= ~(1 << WEAPON_SMOKEGRENADE);
|
||||
DestroyItem();
|
||||
}
|
||||
|
||||
m_flStartThrow = 0;
|
||||
m_flReleaseThrow = -1;
|
||||
}
|
||||
|
||||
/* <2ab03d> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:120 */
|
||||
NOBODY void CSmokeGrenade::PrimaryAttack(void)
|
||||
void CSmokeGrenade::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CSmokeGrenade *const this); // 120
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
return;
|
||||
|
||||
if (!m_flStartThrow && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] > 0)
|
||||
{
|
||||
m_flReleaseThrow = 0;
|
||||
m_flStartThrow = gpGlobals->time;
|
||||
|
||||
SendWeaponAnim(SMOKEGRENADE_PINPULL, UseDecrement() != FALSE);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2ab3fd> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:135 */
|
||||
NOBODY bool CSmokeGrenade::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
bool CSmokeGrenade::ShieldSecondaryFire(int iUpAnim, int iDownAnim)
|
||||
{
|
||||
if (!m_pPlayer->HasShield() || m_flStartThrow > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
SendWeaponAnim(iDownAnim, UseDecrement() != FALSE);
|
||||
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
|
||||
m_fMaxSpeed = SMOKEGRENADE_MAX_SPEED;
|
||||
m_pPlayer->m_bShieldDrawn = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iWeaponState |= WPNSTATE_SHIELD_DRAWN;
|
||||
SendWeaponAnim(iUpAnim, UseDecrement() != FALSE);
|
||||
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shielded");
|
||||
|
||||
m_fMaxSpeed = SMOKEGRENADE_MAX_SPEED_SHIELD;
|
||||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) != WPNSTATE_SHIELD_DRAWN);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.4);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* <2ab0b2> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:173 */
|
||||
NOBODY void CSmokeGrenade::SecondaryAttack(void)
|
||||
void CSmokeGrenade::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||
{
|
||||
// ShieldSecondaryFire(CSmokeGrenade::SecondaryAttack(// int iUpAnim,
|
||||
// int iDownAnim); // 175
|
||||
ShieldSecondaryFire(SHIELDGUN_DRAW, SHIELDGUN_DRAWN_IDLE);
|
||||
}
|
||||
|
||||
/* <2ab42f> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:178 */
|
||||
NOBODY void CSmokeGrenade::SetPlayerShieldAnim(void)
|
||||
void CSmokeGrenade::SetPlayerShieldAnim(void)
|
||||
{
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shield");
|
||||
else
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
}
|
||||
|
||||
/* <2ab451> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:189 */
|
||||
NOBODY void CSmokeGrenade::ResetPlayerShieldAnim(void)
|
||||
void CSmokeGrenade::ResetPlayerShieldAnim(void)
|
||||
{
|
||||
if (!m_pPlayer->HasShield())
|
||||
return;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
Q_strcpy(m_pPlayer->m_szAnimExtention, "shieldgren");
|
||||
}
|
||||
}
|
||||
|
||||
/* <2aa17b> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:199 */
|
||||
NOBODY void CSmokeGrenade::WeaponIdle(void)
|
||||
void CSmokeGrenade::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// {
|
||||
// Vector angThrow; // 211
|
||||
// float flVel; // 218
|
||||
// Vector vecSrc; // 224
|
||||
// Vector vecThrow; // 227
|
||||
// }
|
||||
// {
|
||||
// int iAnim; // 277
|
||||
// float flRand; // 278
|
||||
// }
|
||||
if (m_flReleaseThrow == 0)
|
||||
m_flReleaseThrow = gpGlobals->time;
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
if (m_flStartThrow)
|
||||
{
|
||||
m_pPlayer->Radio("%!MRAD_FIREINHOLE", "#Fire_in_the_hole");
|
||||
|
||||
Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
|
||||
|
||||
if (angThrow.x < 0)
|
||||
angThrow.x = -10 + angThrow.x * ((90 - 10) / 90.0);
|
||||
else
|
||||
angThrow.x = -10 + angThrow.x * ((90 + 10) / 90.0);
|
||||
|
||||
float_precision flVel = (90.0 - angThrow.x) * 6.0;
|
||||
|
||||
if (flVel > 750.0f)
|
||||
flVel = 750.0f;
|
||||
|
||||
UTIL_MakeVectors(angThrow);
|
||||
|
||||
Vector vecSrc = m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16;
|
||||
Vector vecThrow = gpGlobals->v_forward * flVel + m_pPlayer->pev->velocity;
|
||||
|
||||
CGrenade::ShootSmokeGrenade(m_pPlayer->pev, vecSrc, vecThrow, 1.5, m_usCreateSmoke);
|
||||
|
||||
SendWeaponAnim(SMOKEGRENADE_THROW, UseDecrement() != FALSE);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
// player "shoot" animation
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
m_flStartThrow = 0;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
|
||||
|
||||
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
// just threw last grenade
|
||||
// set attack times in the future, and weapon idle in the future so we can see the whole throw
|
||||
// animation, weapon idle will automatically retire the weapon for us.
|
||||
// ensure that the animation can finish playing
|
||||
m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||
}
|
||||
|
||||
ResetPlayerShieldAnim();
|
||||
}
|
||||
else if (m_flReleaseThrow > 0)
|
||||
{
|
||||
// we've finished the throw, restart.
|
||||
m_flStartThrow = 0;
|
||||
|
||||
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
SendWeaponAnim(SMOKEGRENADE_DRAW, UseDecrement() != FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
RetireWeapon();
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15);
|
||||
m_flReleaseThrow = -1;
|
||||
}
|
||||
else if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
int iAnim;
|
||||
float flRand = RANDOM_FLOAT(0, 1);
|
||||
|
||||
if (m_pPlayer->HasShield())
|
||||
{
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
|
||||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
{
|
||||
SendWeaponAnim(SHIELDREN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flRand <= 0.75)
|
||||
{
|
||||
iAnim = SMOKEGRENADE_IDLE;
|
||||
|
||||
// how long till we do this again.
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15);
|
||||
}
|
||||
else
|
||||
{
|
||||
iAnim = SMOKEGRENADE_IDLE;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 75.0 / 30.0;
|
||||
}
|
||||
|
||||
SendWeaponAnim(iAnim, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <2aaf6c> ../cstrike/dlls/wpn_shared/wpn_smokegrenade.cpp:310 */
|
||||
NOBODY BOOL CSmokeGrenade::CanDeploy(void)
|
||||
BOOL CSmokeGrenade::__MAKE_VHOOK(CanDeploy)(void)
|
||||
{
|
||||
return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CSmokeGrenade::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CSmokeGrenade::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CSmokeGrenade::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CSmokeGrenade::CanDeploy(void)
|
||||
{
|
||||
return CanDeploy_();
|
||||
}
|
||||
|
||||
BOOL CSmokeGrenade::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CSmokeGrenade::Holster(int skiplocal)
|
||||
{
|
||||
Holster_(skiplocal);
|
||||
}
|
||||
|
||||
void CSmokeGrenade::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CSmokeGrenade::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CSmokeGrenade::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,60 +1,244 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define TMP_MAX_SPEED 250
|
||||
|
||||
#define TMP_DAMAGE 20
|
||||
#define TMP_RANGE_MODIFER 0.85
|
||||
|
||||
#define TMP_RELOAD_TIME 2.12
|
||||
|
||||
enum tmp_e
|
||||
{
|
||||
TMP_IDLE1,
|
||||
TMP_RELOAD,
|
||||
TMP_DRAW,
|
||||
TMP_SHOOT1,
|
||||
TMP_SHOOT2,
|
||||
TMP_SHOOT3
|
||||
};
|
||||
|
||||
/* <2b06f0> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_tmp, CTMP);
|
||||
|
||||
/* <2b04ba> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:52 */
|
||||
NOBODY void CTMP::Spawn(void)
|
||||
void CTMP::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_TMP;
|
||||
SET_MODEL(edict(), "models/w_tmp.mdl");
|
||||
|
||||
m_iDefaultAmmo = TMP_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2b0439> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:67 */
|
||||
NOBODY void CTMP::Precache(void)
|
||||
void CTMP::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_tmp.mdl");
|
||||
PRECACHE_MODEL("models/w_tmp.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/tmp-1.wav");
|
||||
PRECACHE_SOUND("weapons/tmp-2.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireTMP = PRECACHE_EVENT(1, "events/tmp.sc");
|
||||
}
|
||||
|
||||
/* <2b0460> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:81 */
|
||||
NOBODY int CTMP::GetItemInfo(ItemInfo *p)
|
||||
int CTMP::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "9mm";
|
||||
p->iMaxAmmo1 = MAX_AMMO_9MM;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = TMP_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 11;
|
||||
p->iId = m_iId = WEAPON_TMP;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = TMP_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2b0493> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:98 */
|
||||
NOBODY BOOL CTMP::Deploy(void)
|
||||
{
|
||||
BOOL CTMP::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_tmp.mdl", "models/p_tmp.mdl", TMP_DRAW, "onehanded", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2b06b6> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:108 */
|
||||
NOBODY void CTMP::PrimaryAttack(void)
|
||||
void CTMP::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CTMP *const this); // 108
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
TMPFire(0.25 * m_flAccuracy, 0.07, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
TMPFire(0.03 * m_flAccuracy, 0.07, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2b07ba> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:116 */
|
||||
NOBODY void CTMP::TMPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CTMP::TMPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 155
|
||||
// Vector vecSrc; // 157
|
||||
// Vector vecDir; // 159
|
||||
// int flag; // 163
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 150
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 160
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 160
|
||||
// Length2D(const Vector *const this); // 188
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.55;
|
||||
|
||||
if (m_flAccuracy > 1.4)
|
||||
m_flAccuracy = 1.4;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 1, BULLET_PLAYER_9MM,
|
||||
TMP_DAMAGE, TMP_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireTMP, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(1.1, 0.5, 0.35, 0.045, 4.5, 3.5, 6);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(0.8, 0.4, 0.2, 0.03, 3.0, 2.5, 7);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.7, 0.35, 0.125, 0.025, 2.5, 2.0, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.725, 0.375, 0.15, 0.025, 2.75, 2.25, 9);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2b056b> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:197 */
|
||||
NOBODY void CTMP::Reload(void)
|
||||
{
|
||||
// Reload(CTMP *const this); // 197
|
||||
void CTMP::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// to prevent reload if not enough ammo
|
||||
if (m_pPlayer->ammo_9mm <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // REGAMEDLL_FIXES
|
||||
|
||||
if (DefaultReload(TMP_MAX_CLIP, TMP_RELOAD, TMP_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2b0530> ../cstrike/dlls/wpn_shared/wpn_tmp.cpp:211 */
|
||||
NOBODY void CTMP::WeaponIdle(void)
|
||||
void CTMP::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CTMP *const this); // 211
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(TMP_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CTMP::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CTMP::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CTMP::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CTMP::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CTMP::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CTMP::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CTMP::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,60 +1,247 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define UMP45_MAX_SPEED 250
|
||||
|
||||
#define UMP45_DAMAGE 30
|
||||
#define UMP45_RANGE_MODIFER 0.82
|
||||
|
||||
#define UMP45_RELOAD_TIME 3.5
|
||||
|
||||
enum ump45_e
|
||||
{
|
||||
UMP45_IDLE1,
|
||||
UMP45_RELOAD,
|
||||
UMP45_DRAW,
|
||||
UMP45_SHOOT1,
|
||||
UMP45_SHOOT2,
|
||||
UMP45_SHOOT3
|
||||
};
|
||||
|
||||
/* <2b5b26> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:50 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_ump45, CUMP45);
|
||||
|
||||
/* <2b58f0> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:52 */
|
||||
NOBODY void CUMP45::Spawn(void)
|
||||
void CUMP45::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_UMP45;
|
||||
SET_MODEL(edict(), "models/w_ump45.mdl");
|
||||
|
||||
m_iDefaultAmmo = UMP45_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0;
|
||||
m_bDelayFire = false;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2b586f> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:66 */
|
||||
NOBODY void CUMP45::Precache(void)
|
||||
void CUMP45::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_ump45.mdl");
|
||||
PRECACHE_MODEL("models/w_ump45.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/ump45-1.wav");
|
||||
PRECACHE_SOUND("weapons/ump45_clipout.wav");
|
||||
PRECACHE_SOUND("weapons/ump45_clipin.wav");
|
||||
PRECACHE_SOUND("weapons/ump45_boltslap.wav");
|
||||
|
||||
m_iShell = PRECACHE_MODEL("models/pshell.mdl");
|
||||
m_usFireUMP45 = PRECACHE_EVENT(1, "events/ump45.sc");
|
||||
}
|
||||
|
||||
/* <2b5896> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:82 */
|
||||
NOBODY int CUMP45::GetItemInfo(ItemInfo *p)
|
||||
int CUMP45::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
p->pszAmmo1 = "45acp";
|
||||
#else
|
||||
p->pszAmmo1 = "45ACP";
|
||||
#endif // REGAMEDLL_FIXES
|
||||
p->iMaxAmmo1 = MAX_AMMO_45ACP;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = UMP45_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 15;
|
||||
p->iId = m_iId = WEAPON_UMP45;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = UMP45_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2b58c9> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:99 */
|
||||
NOBODY BOOL CUMP45::Deploy(void)
|
||||
{
|
||||
BOOL CUMP45::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
m_flAccuracy = 0;
|
||||
m_bDelayFire = false;
|
||||
iShellOn = 1;
|
||||
|
||||
return DefaultDeploy("models/v_ump45.mdl", "models/p_ump45.mdl", UMP45_DRAW, "carbine", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2b5aec> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:108 */
|
||||
NOBODY void CUMP45::PrimaryAttack(void)
|
||||
void CUMP45::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// PrimaryAttack(CUMP45 *const this); // 108
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
UMP45Fire(0.24 * m_flAccuracy, 0.1, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
UMP45Fire(0.04 * m_flAccuracy, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2b5bf0> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:116 */
|
||||
NOBODY void CUMP45::UMP45Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
void CUMP45::UMP45Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
||||
{
|
||||
// {
|
||||
// int flag; // 153
|
||||
// Vector vecAiming; // 160
|
||||
// Vector vecSrc; // 162
|
||||
// Vector vecDir; // 164
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 151
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 165
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 165
|
||||
// Length2D(const Vector *const this); // 191
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
m_bDelayFire = true;
|
||||
m_iShotsFired++;
|
||||
|
||||
m_flAccuracy = ((m_iShotsFired * m_iShotsFired) / 120) + 0.5;
|
||||
|
||||
if (m_flAccuracy > 1)
|
||||
m_flAccuracy = 1;
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
if (m_fFireOnEmpty)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.2);
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 8192, 1, BULLET_PLAYER_45ACP,
|
||||
UMP45_DAMAGE, UMP45_RANGE_MODIFER, m_pPlayer->pev, false, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireUMP45, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||
{
|
||||
KickBack(0.125, 0.65, 0.55, 0.0475, 5.5, 4.0, 10);
|
||||
}
|
||||
else if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
{
|
||||
KickBack(0.55, 0.3, 0.225, 0.03, 3.5, 2.5, 10);
|
||||
}
|
||||
else if (m_pPlayer->pev->flags & FL_DUCKING)
|
||||
{
|
||||
KickBack(0.25, 0.175, 0.125, 0.02, 2.25, 1.25, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
KickBack(0.275, 0.2, 0.15, 0.0225, 2.5, 1.5, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/* <2b59a1> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:200 */
|
||||
NOBODY void CUMP45::Reload(void)
|
||||
void CUMP45::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// Reload(CUMP45 *const this); // 200
|
||||
if (m_pPlayer->ammo_45acp <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DefaultReload(UMP45_MAX_CLIP, UMP45_RELOAD, UMP45_RELOAD_TIME))
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2b5966> ../cstrike/dlls/wpn_shared/wpn_ump45.cpp:214 */
|
||||
NOBODY void CUMP45::WeaponIdle(void)
|
||||
void CUMP45::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CUMP45 *const this); // 214
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
|
||||
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(UMP45_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CUMP45::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CUMP45::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CUMP45::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CUMP45::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CUMP45::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CUMP45::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CUMP45::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -1,6 +1,12 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define USP_MAX_SPEED 250
|
||||
|
||||
#define USP_DAMAGE 34
|
||||
#define USP_DAMAGE_SIL 30
|
||||
|
||||
#define USP_RANGE_MODIFER 0.79
|
||||
|
||||
#define USP_RELOAD_TIME 2.7
|
||||
|
||||
enum usp_e
|
||||
@ -49,7 +55,7 @@ void CUSP::__MAKE_VHOOK(Spawn)(void)
|
||||
|
||||
m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_iDefaultAmmo = USP_DEFAULT_GIVE;
|
||||
m_flAccuracy = 0.92f;
|
||||
m_flAccuracy = 0.92;
|
||||
|
||||
FallInit();
|
||||
}
|
||||
@ -78,7 +84,11 @@ void CUSP::__MAKE_VHOOK(Precache)(void)
|
||||
int CUSP::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
p->pszAmmo1 = "45acp";
|
||||
#else
|
||||
p->pszAmmo1 = "45ACP";
|
||||
#endif // REGAMEDLL_FIXES
|
||||
p->iMaxAmmo1 = MAX_AMMO_45ACP;
|
||||
p->pszAmmo2 = 0;
|
||||
p->iMaxAmmo2 = -1;
|
||||
@ -230,15 +240,14 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
return;
|
||||
}
|
||||
|
||||
m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay(flCycleTime);
|
||||
|
||||
m_iClip--;
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
m_pPlayer->m_iWeaponVolume = 2048;
|
||||
m_pPlayer->m_iWeaponFlash = 128;
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
@ -248,24 +257,11 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
}
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecDir = gpGlobals->v_forward;
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
iDamage = (m_iWeaponState & WPNSTATE_USP_SILENCED) ? 30 : 34;
|
||||
|
||||
vecAiming = m_pPlayer->FireBullets3
|
||||
(
|
||||
vecSrc,
|
||||
vecDir,
|
||||
flSpread,
|
||||
4096.0,
|
||||
1,
|
||||
BULLET_PLAYER_45ACP,
|
||||
iDamage,
|
||||
0.79,
|
||||
m_pPlayer->pev,
|
||||
true,
|
||||
m_pPlayer->random_seed
|
||||
);
|
||||
iDamage = (m_iWeaponState & WPNSTATE_USP_SILENCED) ? USP_DAMAGE_SIL : USP_DAMAGE;
|
||||
|
||||
vecDir = m_pPlayer->FireBullets3(vecSrc, vecAiming, flSpread, 4096, 1, BULLET_PLAYER_45ACP, iDamage, USP_RANGE_MODIFER, m_pPlayer->pev, true, m_pPlayer->random_seed);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
@ -273,21 +269,8 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseSemi)
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL
|
||||
(
|
||||
flag,
|
||||
ENT(m_pPlayer->pev),
|
||||
m_usFireUSP,
|
||||
0,
|
||||
(float *)&g_vecZero,
|
||||
(float *)&g_vecZero,
|
||||
vecAiming.x,
|
||||
vecAiming.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100),
|
||||
0,
|
||||
m_iClip == 0,
|
||||
(m_iWeaponState & WPNSTATE_USP_SILENCED)
|
||||
);
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireUSP, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
|
||||
(int)(m_pPlayer->pev->punchangle.x * 100), 0, m_iClip == 0, (m_iWeaponState & WPNSTATE_USP_SILENCED));
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
@ -377,16 +360,16 @@ BOOL CUSP::Deploy(void)
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CUSP::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CUSP::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CUSP::SecondaryAttack(void)
|
||||
{
|
||||
SecondaryAttack_();
|
||||
}
|
||||
|
||||
void CUSP::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
|
@ -1,59 +1,278 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#define XM1014_MAX_SPEED 240
|
||||
#define XM1014_CONE_VECTOR Vector(0.0725, 0.0725, 0.0) // special shotgun spreads
|
||||
|
||||
enum xm1014_e
|
||||
{
|
||||
XM1014_IDLE,
|
||||
XM1014_FIRE1,
|
||||
XM1014_FIRE2,
|
||||
XM1014_RELOAD,
|
||||
XM1014_PUMP,
|
||||
XM1014_START_RELOAD,
|
||||
XM1014_DRAW
|
||||
};
|
||||
|
||||
/* <2cadb2> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:51 */
|
||||
LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014);
|
||||
|
||||
/* <2cacc6> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:53 */
|
||||
NOBODY void CXM1014::Spawn(void)
|
||||
void CXM1014::__MAKE_VHOOK(Spawn)(void)
|
||||
{
|
||||
Precache();
|
||||
m_iId = WEAPON_XM1014;
|
||||
SET_MODEL(edict(), "models/w_xm1014.mdl");
|
||||
|
||||
m_iDefaultAmmo = XM1014_DEFAULT_GIVE;
|
||||
|
||||
// get ready to fall
|
||||
FallInit();
|
||||
}
|
||||
|
||||
/* <2caadc> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:65 */
|
||||
NOBODY void CXM1014::Precache(void)
|
||||
void CXM1014::__MAKE_VHOOK(Precache)(void)
|
||||
{
|
||||
PRECACHE_MODEL("models/v_xm1014.mdl");
|
||||
PRECACHE_MODEL("models/w_xm1014.mdl");
|
||||
|
||||
m_iShellId = m_iShell = PRECACHE_MODEL("models/shotgunshell.mdl");
|
||||
|
||||
PRECACHE_SOUND("weapons/xm1014-1.wav");
|
||||
PRECACHE_SOUND("weapons/reload1.wav");
|
||||
PRECACHE_SOUND("weapons/reload3.wav");
|
||||
|
||||
m_usFireXM1014 = PRECACHE_EVENT(1, "events/xm1014.sc");
|
||||
}
|
||||
|
||||
/* <2cab03> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:81 */
|
||||
NOBODY int CXM1014::GetItemInfo(ItemInfo *p)
|
||||
int CXM1014::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p)
|
||||
{
|
||||
p->pszName = STRING(pev->classname);
|
||||
p->pszAmmo1 = "buckshot";
|
||||
p->iMaxAmmo1 = MAX_AMMO_BUCKSHOT;
|
||||
p->pszAmmo2 = NULL;
|
||||
p->iMaxAmmo2 = -1;
|
||||
p->iMaxClip = XM1014_MAX_CLIP;
|
||||
p->iSlot = 0;
|
||||
p->iPosition = 12;
|
||||
p->iId = m_iId = WEAPON_XM1014;
|
||||
p->iFlags = 0;
|
||||
p->iWeight = XM1014_WEIGHT;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2cac9f> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:100 */
|
||||
NOBODY BOOL CXM1014::Deploy(void)
|
||||
BOOL CXM1014::__MAKE_VHOOK(Deploy)(void)
|
||||
{
|
||||
return DefaultDeploy("models/v_xm1014.mdl", "models/p_xm1014.mdl", XM1014_DRAW, "m249", UseDecrement() != FALSE);
|
||||
}
|
||||
|
||||
/* <2cab36> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:106 */
|
||||
NOBODY void CXM1014::PrimaryAttack(void)
|
||||
void CXM1014::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||
{
|
||||
// {
|
||||
// Vector vecAiming; // 144
|
||||
// Vector vecSrc; // 145
|
||||
// int flag; // 149
|
||||
// operator+(const Vector *const this,
|
||||
// const Vector &v); // 142
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 144
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 146
|
||||
// Vector(Vector *const this,
|
||||
// const Vector &v); // 146
|
||||
// Vector(Vector *const this,
|
||||
// float X,
|
||||
// float Y,
|
||||
// float Z); // 146
|
||||
// edict(CBaseEntity *const this); // 156
|
||||
// }
|
||||
Vector vecAiming, vecSrc, vecDir;
|
||||
int flag;
|
||||
|
||||
// don't fire underwater
|
||||
if (m_pPlayer->pev->waterlevel == 3)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.15);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
Reload();
|
||||
|
||||
if (!m_iClip)
|
||||
{
|
||||
PlayEmptySound();
|
||||
}
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
TheBots->OnEvent(EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer);
|
||||
}
|
||||
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(1);
|
||||
return;
|
||||
}
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
m_iClip--;
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
// player "shoot" animation
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
vecSrc = m_pPlayer->GetGunPosition();
|
||||
vecAiming = gpGlobals->v_forward;
|
||||
|
||||
m_pPlayer->FireBullets(6, vecSrc, vecAiming, XM1014_CONE_VECTOR, 3048, BULLET_PLAYER_BUCKSHOT, 0);
|
||||
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flag = FEV_NOTHOST;
|
||||
#else
|
||||
flag = 0;
|
||||
#endif // CLIENT_WEAPONS
|
||||
|
||||
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireXM1014, 0, (float *)&g_vecZero, (float *)&g_vecZero, m_vVecAiming.x, m_vVecAiming.y, 7,
|
||||
(int)(m_vVecAiming.x * 100), m_iClip == 0, FALSE);
|
||||
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
{
|
||||
// HEV suit - indicate out of ammo condition
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
}
|
||||
|
||||
if (m_iClip != 0)
|
||||
m_flPumpTime = UTIL_WeaponTimeBase() + 0.125;
|
||||
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.25);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.25;
|
||||
|
||||
if (m_iClip != 0)
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.25;
|
||||
else
|
||||
m_flTimeWeaponIdle = 0.75;
|
||||
|
||||
m_fInSpecialReload = 0;
|
||||
|
||||
if (m_pPlayer->pev->flags & FL_ONGROUND)
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomLong(m_pPlayer->random_seed + 1, 3, 5);
|
||||
else
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomLong(m_pPlayer->random_seed + 1, 7, 10);
|
||||
}
|
||||
|
||||
/* <2cad77> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:182 */
|
||||
NOBODY void CXM1014::Reload(void)
|
||||
void CXM1014::__MAKE_VHOOK(Reload)(void)
|
||||
{
|
||||
// CXM1014::Reload(void); // 182
|
||||
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == XM1014_MAX_CLIP)
|
||||
return;
|
||||
|
||||
// don't reload until recoil is done
|
||||
if (m_flNextPrimaryAttack > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
// check to see if we're ready to reload
|
||||
if (m_fInSpecialReload == 0)
|
||||
{
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
SendWeaponAnim(XM1014_START_RELOAD, UseDecrement() != FALSE);
|
||||
|
||||
m_fInSpecialReload = 1;
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.55;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.55;
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.55);
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.55;
|
||||
}
|
||||
else if (m_fInSpecialReload == 1)
|
||||
{
|
||||
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
|
||||
return;
|
||||
|
||||
// was waiting for gun to move to side
|
||||
m_fInSpecialReload = 2;
|
||||
|
||||
if (RANDOM_LONG(0, 1))
|
||||
EMIT_SOUND_DYN(m_pPlayer->edict(), CHAN_ITEM, "weapons/reload1.wav", VOL_NORM, ATTN_NORM, 0, 85 + RANDOM_LONG(0, 31));
|
||||
else
|
||||
EMIT_SOUND_DYN(m_pPlayer->edict(), CHAN_ITEM, "weapons/reload3.wav", VOL_NORM, ATTN_NORM, 0, 85 + RANDOM_LONG(0, 31));
|
||||
|
||||
SendWeaponAnim(XM1014_RELOAD, UseDecrement());
|
||||
|
||||
m_flNextReload = UTIL_WeaponTimeBase() + 0.3;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.3;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iClip++;
|
||||
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
|
||||
m_pPlayer->ammo_buckshot--;
|
||||
m_fInSpecialReload = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* <2cad3c> ../cstrike/dlls/wpn_shared/wpn_xm1014.cpp:231 */
|
||||
NOBODY void CXM1014::WeaponIdle(void)
|
||||
void CXM1014::__MAKE_VHOOK(WeaponIdle)(void)
|
||||
{
|
||||
// WeaponIdle(CXM1014 *const this); // 231
|
||||
ResetEmptySound();
|
||||
m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES);
|
||||
|
||||
if (m_flPumpTime && m_flPumpTime < UTIL_WeaponTimeBase())
|
||||
{
|
||||
m_flPumpTime = 0;
|
||||
}
|
||||
|
||||
if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase())
|
||||
{
|
||||
if (m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
Reload();
|
||||
}
|
||||
else if (m_fInSpecialReload != 0)
|
||||
{
|
||||
if (m_iClip != XM1014_MAX_CLIP && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
{
|
||||
Reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
// reload debounce has timed out
|
||||
SendWeaponAnim(XM1014_PUMP, UseDecrement() != FALSE);
|
||||
|
||||
m_fInSpecialReload = 0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendWeaponAnim(XM1014_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
void CXM1014::Spawn(void)
|
||||
{
|
||||
Spawn_();
|
||||
}
|
||||
|
||||
void CXM1014::Precache(void)
|
||||
{
|
||||
Precache_();
|
||||
}
|
||||
|
||||
int CXM1014::GetItemInfo(ItemInfo *p)
|
||||
{
|
||||
return GetItemInfo_(p);
|
||||
}
|
||||
|
||||
BOOL CXM1014::Deploy(void)
|
||||
{
|
||||
return Deploy_();
|
||||
}
|
||||
|
||||
void CXM1014::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
}
|
||||
|
||||
void CXM1014::Reload(void)
|
||||
{
|
||||
Reload_();
|
||||
}
|
||||
|
||||
void CXM1014::WeaponIdle(void)
|
||||
{
|
||||
WeaponIdle_();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -205,8 +205,7 @@ void CVoiceGameMgr::UpdateMasks(void)
|
||||
g_SentBanMasks[ iClient ] = g_BanMasks[ iClient ];
|
||||
|
||||
MESSAGE_BEGIN(MSG_ONE, m_msgPlayerVoiceMask, NULL, pPlayer->pev);
|
||||
int dw;
|
||||
for (dw = 0; dw < VOICE_MAX_PLAYERS_DW; dw++)
|
||||
for (int dw = 0; dw < VOICE_MAX_PLAYERS_DW; dw++)
|
||||
{
|
||||
WRITE_LONG(gameRulesMask.GetDWord(dw));
|
||||
WRITE_LONG(g_BanMasks[ iClient ].GetDWord(dw));
|
||||
|
@ -287,12 +287,10 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D66170, "_Z7BuyItemP11CBasePlayeri", (size_t)&BuyItem },
|
||||
{ 0x01D669A0, "_Z27HandleMenu_ChooseAppearanceP11CBasePlayeri", (size_t)&HandleMenu_ChooseAppearance },
|
||||
{ 0x01D66D10, "_Z21HandleMenu_ChooseTeamP11CBasePlayeri", (size_t)&HandleMenu_ChooseTeam },
|
||||
|
||||
{ 0x01D67930, "_Z6Radio1P11CBasePlayeri", (size_t)&Radio1 },
|
||||
{ 0x01D67A20, "_Z6Radio2P11CBasePlayeri", (size_t)&Radio2 },
|
||||
{ 0x01D67B10, "_Z6Radio3P11CBasePlayeri", (size_t)&Radio3 },
|
||||
{ 0x01D67C70, "_Z10BuyGunAmmoR11CBasePlayerR15CBasePlayerItemb", (size_t)&BuyGunAmmo },
|
||||
|
||||
//{ 0x01D67E50, "_Z7BuyAmmoP11CBasePlayerib", (size_t)&BuyAmmo }, // NOXREF
|
||||
//{ 0x01D67EC0, "_Z16EntityFromUserIDi", (size_t)&EntityFromUserID }, // NOXREF
|
||||
//{ 0x01D67FC0, "_Z20CountPlayersInServerv", (size_t)&CountPlayersInServer }, // NOXREF
|
||||
@ -347,17 +345,14 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D61A70, "_Z20EmptyEntityHashTablev", (size_t)&EmptyEntityHashTable },
|
||||
{ 0x01D61AE0, "_Z18AddEntityHashValueP9entvars_sPKc12hash_types_e", (size_t)&AddEntityHashValue },
|
||||
{ 0x01D61CA0, "_Z21RemoveEntityHashValueP9entvars_sPKc12hash_types_e", (size_t)&RemoveEntityHashValue },
|
||||
|
||||
{ 0x01D61E20, "_Z13printEntitiesv", (size_t)&printEntities },
|
||||
{ 0x01D61ED0, "_Z19CREATE_NAMED_ENTITYj", (size_t)&CREATE_NAMED_ENTITY },
|
||||
{ 0x01D61F10, "_Z13REMOVE_ENTITYP7edict_s", (size_t)&REMOVE_ENTITY },
|
||||
|
||||
{ 0x01D62540, "_Z12CONSOLE_ECHOPcz", (size_t)&CONSOLE_ECHO_ },
|
||||
{ 0x01D61F30, "_Z15loopPerformancev", (size_t)&loopPerformance },
|
||||
{ 0x01D62570, "GetEntityAPI", (size_t)&GetEntityAPI },
|
||||
//{ 0x01D62670, "_Z13GetEntityAPI2P13DLL_FUNCTIONSPi", (size_t)&GetEntityAPI2 }, // NOXREF
|
||||
{ 0x01D626B0, "GetNewDLLFunctions", (size_t)&GetNewDLLFunctions },
|
||||
|
||||
//{ 0x01D62B20, "_Z16FindGlobalEntityjj", (size_t)&FindGlobalEntity }, // NOXREF
|
||||
{ 0x01D63700, "_ZL21SetObjectCollisionBoxP9entvars_s", (size_t)&SetObjectCollisionBox },
|
||||
{ 0x01D63BE0, "_Z20OnFreeEntPrivateDataP7edict_s", (size_t)&OnFreeEntPrivateData },
|
||||
@ -667,7 +662,6 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D9E320, "_ZN11CBasePlayer19SetProgressBarTime2Eif", mfunc_ptr_cast(&CBasePlayer::SetProgressBarTime2) },
|
||||
//{ 0x01D93690, "_Z14GetForceCamerav", (size_t)&GetForceCamera }, // NOXREF
|
||||
{ 0x01D93A00, "_ZL19UpdateClientEffectsP11CBasePlayeri", (size_t)&UpdateClientEffects },
|
||||
|
||||
//{ 0x0, "", (size_t)&OLD_CheckBuyZone }, // NOXREF
|
||||
//{ 0x0, "", (size_t)&OLD_CheckBombTarget }, // NOXREF
|
||||
//{ 0x0, "", (size_t)&OLD_CheckRescueZone }, // NOXREF
|
||||
@ -2876,9 +2870,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DCEDE0, "_ZN17CBasePlayerWeapon11AddToPlayerEP11CBasePlayer", mfunc_ptr_cast(&CBasePlayerWeapon::AddToPlayer_) },
|
||||
{ 0x01DCEDC0, "_ZN17CBasePlayerWeapon12AddDuplicateEP15CBasePlayerItem", mfunc_ptr_cast(&CBasePlayerWeapon::AddDuplicate_) },
|
||||
{ 0x01DCF1A0, "_ZN17CBasePlayerWeapon9CanDeployEv", mfunc_ptr_cast(&CBasePlayerWeapon::CanDeploy_) },
|
||||
//{ 0x01D02050, "_ZN17CBasePlayerWeapon8IsWeaponEv", mfunc_ptr_cast(&CBasePlayerWeapon::IsWeapon_) },
|
||||
|
||||
//{ 0x0, "_ZN17CBasePlayerWeapon8IsWeaponEv", mfunc_ptr_cast(&CBasePlayerWeapon::IsWeapon_) },
|
||||
//{ 0x01D02050, "_ZN17CBasePlayerWeapon8IsWeaponEv", mfunc_ptr_cast(&CBasePlayerWeapon::IsWeapon_) }, // DEFAULT
|
||||
{ 0x01DCF570, "_ZN17CBasePlayerWeapon7HolsterEi", mfunc_ptr_cast(&CBasePlayerWeapon::Holster_) },
|
||||
//{ 0x01D02030, "_ZN17CBasePlayerWeapon14UpdateItemInfoEv", mfunc_ptr_cast(&CBasePlayerWeapon::UpdateItemInfo_) }, // NOXREF PURE
|
||||
{ 0x01DCE6A0, "_ZN17CBasePlayerWeapon13ItemPostFrameEv", mfunc_ptr_cast(&CBasePlayerWeapon::ItemPostFrame_) },
|
||||
@ -3012,8 +3004,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D0FA40, "_ZN4CUSP6DeployEv", mfunc_ptr_cast(&CUSP::Deploy_) },
|
||||
//{ 0x01D101A0, "_ZN4CUSP11GetMaxSpeedEv", mfunc_ptr_cast(&CUSP::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D10190, "_ZN4CUSP9iItemSlotEv", mfunc_ptr_cast(&CUSP::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0FBE0, "_ZN4CUSP13PrimaryAttackEv", mfunc_ptr_cast(&CUSP::PrimaryAttack_) },
|
||||
{ 0x01D0FB20, "_ZN4CUSP15SecondaryAttackEv", mfunc_ptr_cast(&CUSP::SecondaryAttack_) },
|
||||
{ 0x01D0FBE0, "_ZN4CUSP13PrimaryAttackEv", mfunc_ptr_cast(&CUSP::PrimaryAttack_) },
|
||||
{ 0x01D10060, "_ZN4CUSP6ReloadEv", mfunc_ptr_cast(&CUSP::Reload_) },
|
||||
{ 0x01D100C0, "_ZN4CUSP10WeaponIdleEv", mfunc_ptr_cast(&CUSP::WeaponIdle_) },
|
||||
//{ 0x01D101B0, "_ZN4CUSP12UseDecrementEv", mfunc_ptr_cast(&CUSP::UseDecrement_) }, // DEFAULT
|
||||
@ -3025,67 +3017,67 @@ FunctionHook g_FunctionHooks[] =
|
||||
//{ 0x0, "_ZN4CUSP10BeamUpdateEv", mfunc_ptr_cast(&CUSP::BeamUpdate) }, // NOXREF
|
||||
//CMP5N
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN5CMP5N5SpawnEv", mfunc_ptr_cast(&CMP5N::Spawn) },
|
||||
//{ 0x0, "_ZN5CMP5N8PrecacheEv", mfunc_ptr_cast(&CMP5N::Precache) },
|
||||
//{ 0x0, "_ZN5CMP5N11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CMP5N::GetItemInfo) },
|
||||
//{ 0x0, "_ZN5CMP5N6DeployEv", mfunc_ptr_cast(&CMP5N::Deploy) },
|
||||
//{ 0x0, "_ZN5CMP5N11GetMaxSpeedEv", mfunc_ptr_cast(&CMP5N::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN5CMP5N9iItemSlotEv", mfunc_ptr_cast(&CMP5N::iItemSlot) },
|
||||
//{ 0x0, "_ZN5CMP5N13PrimaryAttackEv", mfunc_ptr_cast(&CMP5N::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN5CMP5N6ReloadEv", mfunc_ptr_cast(&CMP5N::Reload) },
|
||||
//{ 0x0, "_ZN5CMP5N10WeaponIdleEv", mfunc_ptr_cast(&CMP5N::WeaponIdle) },
|
||||
//{ 0x0, "_ZN5CMP5N12UseDecrementEv", mfunc_ptr_cast(&CMP5N::UseDecrement) },
|
||||
{ 0x01D0B750, "_ZN5CMP5N5SpawnEv", mfunc_ptr_cast(&CMP5N::Spawn_) },
|
||||
{ 0x01D0B7A0, "_ZN5CMP5N8PrecacheEv", mfunc_ptr_cast(&CMP5N::Precache_) },
|
||||
{ 0x01D0B820, "_ZN5CMP5N11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CMP5N::GetItemInfo_) },
|
||||
{ 0x01D0B890, "_ZN5CMP5N6DeployEv", mfunc_ptr_cast(&CMP5N::Deploy_) },
|
||||
//{ 0x01D0BD50, "_ZN5CMP5N11GetMaxSpeedEv", mfunc_ptr_cast(&CMP5N::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0BD40, "_ZN5CMP5N9iItemSlotEv", mfunc_ptr_cast(&CMP5N::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0B8E0, "_ZN5CMP5N13PrimaryAttackEv", mfunc_ptr_cast(&CMP5N::PrimaryAttack_) },
|
||||
{ 0x01D0BC80, "_ZN5CMP5N6ReloadEv", mfunc_ptr_cast(&CMP5N::Reload_) },
|
||||
{ 0x01D0BCD0, "_ZN5CMP5N10WeaponIdleEv", mfunc_ptr_cast(&CMP5N::WeaponIdle_) },
|
||||
//{ 0x01D0BD60, "_ZN5CMP5N12UseDecrementEv", mfunc_ptr_cast(&CMP5N::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_mp5navy", (size_t)&weapon_mp5navy },
|
||||
//{ 0x0, "_ZN5CMP5N8MP5NFireEffi", mfunc_ptr_cast(&CMP5N::USPFire) },
|
||||
{ 0x01D0B700, "weapon_mp5navy", (size_t)&weapon_mp5navy },
|
||||
{ 0x01D0B920, "_ZN5CMP5N8MP5NFireEffi", mfunc_ptr_cast(&CMP5N::MP5NFire) },
|
||||
//CSG552
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CSG5525SpawnEv", mfunc_ptr_cast(&CSG552::Spawn_) },
|
||||
//{ 0x0, "_ZN6CSG5528PrecacheEv", mfunc_ptr_cast(&CSG552::Precache_) },
|
||||
//{ 0x0, "_ZN6CSG55211GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSG552::GetItemInfo_) },
|
||||
//{ 0x0, "_ZN6CSG5526DeployEv", mfunc_ptr_cast(&CSG552::Deploy_) },
|
||||
//{ 0x0, "_ZN6CSG55211GetMaxSpeedEv", mfunc_ptr_cast(&CSG552::GetMaxSpeed_) },
|
||||
//{ 0x0, "_ZN6CSG5529iItemSlotEv", mfunc_ptr_cast(&CSG552::iItemSlot_) },
|
||||
//{ 0x0, "_ZN6CSG55213PrimaryAttackEv", mfunc_ptr_cast(&CSG552::PrimaryAttack_) },
|
||||
//{ 0x0, "_ZN6CSG55215SecondaryAttackEv", mfunc_ptr_cast(&CSG552::SecondaryAttack_) },
|
||||
//{ 0x0, "_ZN6CSG5526ReloadEv", mfunc_ptr_cast(&CSG552::Reload_) },
|
||||
//{ 0x0, "_ZN6CSG55210WeaponIdleEv", mfunc_ptr_cast(&CSG552::WeaponIdle_) },
|
||||
//{ 0x0, "_ZN6CSG55212UseDecrementEv", mfunc_ptr_cast(&CSG552::UseDecrement_) },
|
||||
{ 0x01D0DAA0, "_ZN6CSG5525SpawnEv", mfunc_ptr_cast(&CSG552::Spawn_) },
|
||||
{ 0x01D0DAF0, "_ZN6CSG5528PrecacheEv", mfunc_ptr_cast(&CSG552::Precache_) },
|
||||
{ 0x01D0DB70, "_ZN6CSG55211GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSG552::GetItemInfo_) },
|
||||
{ 0x01D0DBE0, "_ZN6CSG5526DeployEv", mfunc_ptr_cast(&CSG552::Deploy_) },
|
||||
{ 0x01D0E1C0, "_ZN6CSG55211GetMaxSpeedEv", mfunc_ptr_cast(&CSG552::GetMaxSpeed_) },
|
||||
//{ 0x01D0E1E0, "_ZN6CSG5529iItemSlotEv", mfunc_ptr_cast(&CSG552::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0DC30, "_ZN6CSG55215SecondaryAttackEv", mfunc_ptr_cast(&CSG552::SecondaryAttack_) },
|
||||
{ 0x01D0DCA0, "_ZN6CSG55213PrimaryAttackEv", mfunc_ptr_cast(&CSG552::PrimaryAttack_) },
|
||||
{ 0x01D0E0D0, "_ZN6CSG5526ReloadEv", mfunc_ptr_cast(&CSG552::Reload_) },
|
||||
{ 0x01D0E150, "_ZN6CSG55210WeaponIdleEv", mfunc_ptr_cast(&CSG552::WeaponIdle_) },
|
||||
//{ 0x01D0E1F0, "_ZN6CSG55212UseDecrementEv", mfunc_ptr_cast(&CSG552::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_sg552", (size_t)&weapon_sg552 },
|
||||
//{ 0x0, "_ZN6CSG5529SG552FireEffi", mfunc_ptr_cast(&CSG552::SG552Fire) },
|
||||
{ 0x01D0DA50, "weapon_sg552", (size_t)&weapon_sg552 },
|
||||
{ 0x01D0DD50, "_ZN6CSG5529SG552FireEffi", mfunc_ptr_cast(&CSG552::SG552Fire) },
|
||||
//CAK47
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN5CAK475SpawnEv", mfunc_ptr_cast(&CAK47::Spawn_) },
|
||||
//{ 0x0, "_ZN5CAK478PrecacheEv", mfunc_ptr_cast(&CAK47::Precache_) },
|
||||
//{ 0x0, "_ZN5CAK4711GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CAK47::GetItemInfo_) },
|
||||
//{ 0x0, "_ZN5CAK476DeployEv", mfunc_ptr_cast(&CAK47::Deploy_) },
|
||||
//{ 0x01D02080, "_ZN5CAK4711GetMaxSpeedEv", mfunc_ptr_cast(&CAK47::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x0, "_ZN5CAK479iItemSlotEv", mfunc_ptr_cast(&CAK47::iItemSlot_) }, // DEFAULT
|
||||
//{ 0x0, "_ZN5CAK4713PrimaryAttackEv", mfunc_ptr_cast(&CAK47::PrimaryAttack_) },
|
||||
//{ 0x0, "_ZN5CAK4715SecondaryAttackEv", mfunc_ptr_cast(&CAK47::SecondaryAttack_) },
|
||||
//{ 0x0, "_ZN5CAK476ReloadEv", mfunc_ptr_cast(&CAK47::Reload_) },
|
||||
//{ 0x0, "_ZN5CAK4710WeaponIdleEv", mfunc_ptr_cast(&CAK47::WeaponIdle_) },
|
||||
//{ 0x0, "_ZN5CAK4712UseDecrementEv", mfunc_ptr_cast(&CAK47::UseDecrement_) }, // DEFAULT
|
||||
{ 0x01D014F0, "_ZN5CAK475SpawnEv", mfunc_ptr_cast(&CAK47::Spawn_) },
|
||||
{ 0x01D01540, "_ZN5CAK478PrecacheEv", mfunc_ptr_cast(&CAK47::Precache_) },
|
||||
{ 0x01D015C0, "_ZN5CAK4711GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CAK47::GetItemInfo_) },
|
||||
{ 0x01D01630, "_ZN5CAK476DeployEv", mfunc_ptr_cast(&CAK47::Deploy_) },
|
||||
//{ 0x01D02080, "_ZN5CAK4711GetMaxSpeedEv", mfunc_ptr_cast(&CAK47::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D02070, "_ZN5CAK479iItemSlotEv", mfunc_ptr_cast(&CAK47::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D01680, "_ZN5CAK4715SecondaryAttackEv", mfunc_ptr_cast(&CAK47::SecondaryAttack_) },
|
||||
{ 0x01D01690, "_ZN5CAK4713PrimaryAttackEv", mfunc_ptr_cast(&CAK47::PrimaryAttack_) },
|
||||
{ 0x01D01AB0, "_ZN5CAK476ReloadEv", mfunc_ptr_cast(&CAK47::Reload_) },
|
||||
{ 0x01D01B00, "_ZN5CAK4710WeaponIdleEv", mfunc_ptr_cast(&CAK47::WeaponIdle_) },
|
||||
//{ 0x01D02090, "_ZN5CAK4712UseDecrementEv", mfunc_ptr_cast(&CAK47::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_ak47", (size_t)&weapon_ak47 },
|
||||
//{ 0x0, "_ZN5CAK478AK47FireEffi", mfunc_ptr_cast(&CAK47::USPFire) },
|
||||
{ 0x01D014A0, "weapon_ak47", (size_t)&weapon_ak47 },
|
||||
{ 0x01D01730, "_ZN5CAK478AK47FireEffi", mfunc_ptr_cast(&CAK47::AK47Fire) },
|
||||
//CAUG
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN4CAUG5SpawnEv", mfunc_ptr_cast(&CAUG::Spawn) },
|
||||
//{ 0x0, "_ZN4CAUG8PrecacheEv", mfunc_ptr_cast(&CAUG::Precache) },
|
||||
//{ 0x0, "_ZN4CAUG11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CAUG::GetItemInfo) },
|
||||
//{ 0x0, "_ZN4CAUG6DeployEv", mfunc_ptr_cast(&CAUG::Deploy) },
|
||||
//{ 0x0, "_ZN4CAUG11GetMaxSpeedEv", mfunc_ptr_cast(&CAUG::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN4CAUG9iItemSlotEv", mfunc_ptr_cast(&CAUG::iItemSlot) },
|
||||
//{ 0x0, "_ZN4CAUG13PrimaryAttackEv", mfunc_ptr_cast(&CAUG::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN4CAUG15SecondaryAttackEv", mfunc_ptr_cast(&CAUG::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN4CAUG6ReloadEv", mfunc_ptr_cast(&CAUG::Reload) },
|
||||
//{ 0x0, "_ZN4CAUG10WeaponIdleEv", mfunc_ptr_cast(&CAUG::WeaponIdle) },
|
||||
//{ 0x0, "_ZN4CAUG12UseDecrementEv", mfunc_ptr_cast(&CAUG::UseDecrement) },
|
||||
{ 0x01D020F0, "_ZN4CAUG5SpawnEv", mfunc_ptr_cast(&CAUG::Spawn_) },
|
||||
{ 0x01D02140, "_ZN4CAUG8PrecacheEv", mfunc_ptr_cast(&CAUG::Precache_) },
|
||||
{ 0x01D021D0, "_ZN4CAUG11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CAUG::GetItemInfo_) },
|
||||
{ 0x01D02240, "_ZN4CAUG6DeployEv", mfunc_ptr_cast(&CAUG::Deploy_) },
|
||||
//{ 0x01D02820, "_ZN4CAUG11GetMaxSpeedEv", mfunc_ptr_cast(&CAUG::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D02810, "_ZN4CAUG9iItemSlotEv", mfunc_ptr_cast(&CAUG::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D02290, "_ZN4CAUG15SecondaryAttackEv", mfunc_ptr_cast(&CAUG::SecondaryAttack_) },
|
||||
{ 0x01D02300, "_ZN4CAUG13PrimaryAttackEv", mfunc_ptr_cast(&CAUG::PrimaryAttack_) },
|
||||
{ 0x01D02730, "_ZN4CAUG6ReloadEv", mfunc_ptr_cast(&CAUG::Reload_) },
|
||||
{ 0x01D027A0, "_ZN4CAUG10WeaponIdleEv", mfunc_ptr_cast(&CAUG::WeaponIdle_) },
|
||||
//{ 0x01D02830, "_ZN4CAUG12UseDecrementEv", mfunc_ptr_cast(&CAUG::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_aug", (size_t)&weapon_aug },
|
||||
//{ 0x0, "_ZN4CAUG7AUGFireEffi", mfunc_ptr_cast(&CAUG::AUGFire) },
|
||||
{ 0x01D020A0, "weapon_aug", (size_t)&weapon_aug },
|
||||
{ 0x01D023B0, "_ZN4CAUG7AUGFireEffi", mfunc_ptr_cast(&CAUG::AUGFire) },
|
||||
//CAWP
|
||||
//virtual func
|
||||
{ 0x01D02890, "_ZN4CAWP5SpawnEv", mfunc_ptr_cast(&CAWP::Spawn_) },
|
||||
@ -3094,8 +3086,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D029F0, "_ZN4CAWP6DeployEv", mfunc_ptr_cast(&CAWP::Deploy_) },
|
||||
{ 0x01D02FA0, "_ZN4CAWP11GetMaxSpeedEv", mfunc_ptr_cast(&CAWP::GetMaxSpeed_) },
|
||||
//{ 0x01D02FC0, "_ZN4CAWP9iItemSlotEv", mfunc_ptr_cast(&CAWP::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D02B40, "_ZN4CAWP13PrimaryAttackEv", mfunc_ptr_cast(&CAWP::PrimaryAttack_) },
|
||||
{ 0x01D02A60, "_ZN4CAWP15SecondaryAttackEv", mfunc_ptr_cast(&CAWP::SecondaryAttack_) },
|
||||
{ 0x01D02B40, "_ZN4CAWP13PrimaryAttackEv", mfunc_ptr_cast(&CAWP::PrimaryAttack_) },
|
||||
{ 0x01D02EA0, "_ZN4CAWP6ReloadEv", mfunc_ptr_cast(&CAWP::Reload_) },
|
||||
{ 0x01D02F20, "_ZN4CAWP10WeaponIdleEv", mfunc_ptr_cast(&CAWP::WeaponIdle_) },
|
||||
//{ 0x01D02FD0, "_ZN4CAWP12UseDecrementEv", mfunc_ptr_cast(&CAWP::UseDecrement_) }, // DEFAULT
|
||||
@ -3120,58 +3112,58 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D02FE0, "weapon_c4", (size_t)&weapon_c4 },
|
||||
//CDEAGLE
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN7CDEAGLE5SpawnEv", mfunc_ptr_cast(&CDEAGLE::Spawn) },
|
||||
//{ 0x0, "_ZN7CDEAGLE8PrecacheEv", mfunc_ptr_cast(&CDEAGLE::Precache) },
|
||||
//{ 0x0, "_ZN7CDEAGLE11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CDEAGLE::GetItemInfo) },
|
||||
//{ 0x0, "_ZN7CDEAGLE6DeployEv", mfunc_ptr_cast(&CDEAGLE::Deploy) },
|
||||
//{ 0x0, "_ZN7CDEAGLE11GetMaxSpeedEv", mfunc_ptr_cast(&CDEAGLE::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN7CDEAGLE9iItemSlotEv", mfunc_ptr_cast(&CDEAGLE::iItemSlot) },
|
||||
//{ 0x0, "_ZN7CDEAGLE13PrimaryAttackEv", mfunc_ptr_cast(&CDEAGLE::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN7CDEAGLE15SecondaryAttackEv", mfunc_ptr_cast(&CDEAGLE::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN7CDEAGLE6ReloadEv", mfunc_ptr_cast(&CDEAGLE::Reload) },
|
||||
//{ 0x0, "_ZN7CDEAGLE10WeaponIdleEv", mfunc_ptr_cast(&CDEAGLE::WeaponIdle) },
|
||||
//{ 0x0, "_ZN7CDEAGLE12UseDecrementEv", mfunc_ptr_cast(&CDEAGLE::UseDecrement) },
|
||||
//{ 0x0, "_ZN7CDEAGLE8IsPistolEv", mfunc_ptr_cast(&CDEAGLE::IsPistol) },
|
||||
{ 0x01D03AF0, "_ZN7CDEAGLE5SpawnEv", mfunc_ptr_cast(&CDEAGLE::Spawn_) },
|
||||
{ 0x01D03B50, "_ZN7CDEAGLE8PrecacheEv", mfunc_ptr_cast(&CDEAGLE::Precache_) },
|
||||
{ 0x01D03BE0, "_ZN7CDEAGLE11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CDEAGLE::GetItemInfo_) },
|
||||
{ 0x01D03C50, "_ZN7CDEAGLE6DeployEv", mfunc_ptr_cast(&CDEAGLE::Deploy_) },
|
||||
//{ 0x01D04180, "_ZN7CDEAGLE11GetMaxSpeedEv", mfunc_ptr_cast(&CDEAGLE::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D04170, "_ZN7CDEAGLE9iItemSlotEv", mfunc_ptr_cast(&CDEAGLE::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D03DB0, "_ZN7CDEAGLE15SecondaryAttackEv", mfunc_ptr_cast(&CDEAGLE::SecondaryAttack_) },
|
||||
{ 0x01D03CF0, "_ZN7CDEAGLE13PrimaryAttackEv", mfunc_ptr_cast(&CDEAGLE::PrimaryAttack_) },
|
||||
{ 0x01D040B0, "_ZN7CDEAGLE6ReloadEv", mfunc_ptr_cast(&CDEAGLE::Reload_) },
|
||||
{ 0x01D040F0, "_ZN7CDEAGLE10WeaponIdleEv", mfunc_ptr_cast(&CDEAGLE::WeaponIdle_) },
|
||||
//{ 0x01D04190, "_ZN7CDEAGLE12UseDecrementEv", mfunc_ptr_cast(&CDEAGLE::UseDecrement_) }, // DEFAULT
|
||||
//{ 0x01D041A0, "_ZN7CDEAGLE8IsPistolEv", mfunc_ptr_cast(&CDEAGLE::IsPistol_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_deagle", (size_t)&weapon_deagle },
|
||||
//{ 0x0, "_ZN7CDEAGLE10DEAGLEFireEffi", mfunc_ptr_cast(&CDEAGLE::DEAGLEFire) },
|
||||
{ 0x01D03AA0, "weapon_deagle", (size_t)&weapon_deagle },
|
||||
{ 0x01D03DC0, "_ZN7CDEAGLE10DEAGLEFireEffi", mfunc_ptr_cast(&CDEAGLE::DEAGLEFire) },
|
||||
//CFlashbang
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN10CFlashbang5SpawnEv", mfunc_ptr_cast(&CFlashbang::Spawn) },
|
||||
//{ 0x0, "_ZN10CFlashbang8PrecacheEv", mfunc_ptr_cast(&CFlashbang::Precache) },
|
||||
//{ 0x0, "_ZN10CFlashbang11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CFlashbang::GetItemInfo) },
|
||||
//{ 0x0, "_ZN10CFlashbang9CanDeployEv", mfunc_ptr_cast(&CFlashbang::CanDeploy) },
|
||||
//{ 0x0, "_ZN10CFlashbang7CanDropEv", mfunc_ptr_cast(&CFlashbang::CanDrop) },
|
||||
//{ 0x0, "_ZN10CFlashbang6DeployEv", mfunc_ptr_cast(&CFlashbang::Deploy) },
|
||||
//{ 0x0, "_ZN10CFlashbang7HolsterEi", mfunc_ptr_cast(&CFlashbang::Holster) },
|
||||
//{ 0x0, "_ZN10CFlashbang11GetMaxSpeedEv", mfunc_ptr_cast(&CFlashbang::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN10CFlashbang9iItemSlotEv", mfunc_ptr_cast(&CFlashbang::iItemSlot) },
|
||||
//{ 0x0, "_ZN10CFlashbang13PrimaryAttackEv", mfunc_ptr_cast(&CFlashbang::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN10CFlashbang15SecondaryAttackEv", mfunc_ptr_cast(&CFlashbang::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN10CFlashbang10WeaponIdleEv", mfunc_ptr_cast(&CFlashbang::WeaponIdle) },
|
||||
//{ 0x0, "_ZN10CFlashbang12UseDecrementEv", mfunc_ptr_cast(&CFlashbang::UseDecrement) },
|
||||
//{ 0x0, "_ZN10CFlashbang8IsPistolEv", mfunc_ptr_cast(&CFlashbang::IsPistol) },
|
||||
{ 0x01D059D0, "_ZN10CFlashbang5SpawnEv", mfunc_ptr_cast(&CFlashbang::Spawn_) },
|
||||
{ 0x01D05A40, "_ZN10CFlashbang8PrecacheEv", mfunc_ptr_cast(&CFlashbang::Precache_) },
|
||||
{ 0x01D05A80, "_ZN10CFlashbang11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CFlashbang::GetItemInfo_) },
|
||||
{ 0x01D06260, "_ZN10CFlashbang9CanDeployEv", mfunc_ptr_cast(&CFlashbang::CanDeploy_) },
|
||||
//{ 0x01D062A0, "_ZN10CFlashbang7CanDropEv", mfunc_ptr_cast(&CFlashbang::CanDrop_) }, // DEFUALT
|
||||
{ 0x01D05AF0, "_ZN10CFlashbang6DeployEv", mfunc_ptr_cast(&CFlashbang::Deploy_) },
|
||||
{ 0x01D05B90, "_ZN10CFlashbang7HolsterEi", mfunc_ptr_cast(&CFlashbang::Holster_) },
|
||||
//{ 0x01D06290, "_ZN10CFlashbang11GetMaxSpeedEv", mfunc_ptr_cast(&CFlashbang::GetMaxSpeed_) }, // DEFUALT
|
||||
//{ 0x01D06280, "_ZN10CFlashbang9iItemSlotEv", mfunc_ptr_cast(&CFlashbang::iItemSlot_) }, // DEFUALT
|
||||
{ 0x01D05DA0, "_ZN10CFlashbang15SecondaryAttackEv", mfunc_ptr_cast(&CFlashbang::SecondaryAttack_) },
|
||||
{ 0x01D05BF0, "_ZN10CFlashbang13PrimaryAttackEv", mfunc_ptr_cast(&CFlashbang::PrimaryAttack_) },
|
||||
{ 0x01D05E40, "_ZN10CFlashbang10WeaponIdleEv", mfunc_ptr_cast(&CFlashbang::WeaponIdle_) },
|
||||
//{ 0x01D062B0, "_ZN10CFlashbang12UseDecrementEv", mfunc_ptr_cast(&CFlashbang::UseDecrement_) }, // DEFUALT
|
||||
//{ 0x01D062C0, "_ZN10CFlashbang8IsPistolEv", mfunc_ptr_cast(&CFlashbang::IsPistol_) }, // DEFUALT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_flashbang", (size_t)&weapon_flashbang },
|
||||
//{ 0x0, "_ZN10CFlashbang19ShieldSecondaryFireEii", mfunc_ptr_cast(&CFlashbang::ShieldSecondaryFire) },
|
||||
//{ 0x0, "_ZN10CFlashbang19SetPlayerShieldAnimEv", mfunc_ptr_cast(&CFlashbang::SetPlayerShieldAnim) },
|
||||
//{ 0x0, "_ZN10CFlashbang21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CFlashbang::ResetPlayerShieldAnim) },
|
||||
{ 0x01D05980, "weapon_flashbang", (size_t)&weapon_flashbang },
|
||||
{ 0x01D05C60, "_ZN10CFlashbang19ShieldSecondaryFireEii", mfunc_ptr_cast(&CFlashbang::ShieldSecondaryFire) },
|
||||
//{ 0x01D05DB0, "_ZN10CFlashbang19SetPlayerShieldAnimEv", mfunc_ptr_cast(&CFlashbang::SetPlayerShieldAnim) }, // NOXREF
|
||||
//{ 0x01D05E00, "_ZN10CFlashbang21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CFlashbang::ResetPlayerShieldAnim) }, // NOXREF
|
||||
//CG3SG1
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CG3SG15SpawnEv", mfunc_ptr_cast(&CG3SG1::Spawn) },
|
||||
//{ 0x0, "_ZN6CG3SG18PrecacheEv", mfunc_ptr_cast(&CG3SG1::Precache) },
|
||||
//{ 0x0, "_ZN6CG3SG111GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CG3SG1::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CG3SG16DeployEv", mfunc_ptr_cast(&CG3SG1::Deploy) },
|
||||
//{ 0x0, "_ZN6CG3SG111GetMaxSpeedEv", mfunc_ptr_cast(&CG3SG1::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CG3SG19iItemSlotEv", mfunc_ptr_cast(&CG3SG1::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CG3SG113PrimaryAttackEv", mfunc_ptr_cast(&CG3SG1::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CG3SG115SecondaryAttackEv", mfunc_ptr_cast(&CG3SG1::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN6CG3SG16ReloadEv", mfunc_ptr_cast(&CG3SG1::Reload) },
|
||||
//{ 0x0, "_ZN6CG3SG110WeaponIdleEv", mfunc_ptr_cast(&CG3SG1::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CG3SG112UseDecrementEv", mfunc_ptr_cast(&CG3SG1::UseDecrement) },
|
||||
{ 0x01D06320, "_ZN6CG3SG15SpawnEv", mfunc_ptr_cast(&CG3SG1::Spawn_) },
|
||||
{ 0x01D06370, "_ZN6CG3SG18PrecacheEv", mfunc_ptr_cast(&CG3SG1::Precache_) },
|
||||
{ 0x01D063F0, "_ZN6CG3SG111GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CG3SG1::GetItemInfo_) },
|
||||
{ 0x01D06460, "_ZN6CG3SG16DeployEv", mfunc_ptr_cast(&CG3SG1::Deploy_) },
|
||||
{ 0x01D06A30, "_ZN6CG3SG111GetMaxSpeedEv", mfunc_ptr_cast(&CG3SG1::GetMaxSpeed_) },
|
||||
//{ 0x01D06A50, "_ZN6CG3SG19iItemSlotEv", mfunc_ptr_cast(&CG3SG1::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D064A0, "_ZN6CG3SG115SecondaryAttackEv", mfunc_ptr_cast(&CG3SG1::SecondaryAttack_) },
|
||||
{ 0x01D06580, "_ZN6CG3SG113PrimaryAttackEv", mfunc_ptr_cast(&CG3SG1::PrimaryAttack_) },
|
||||
{ 0x01D06930, "_ZN6CG3SG16ReloadEv", mfunc_ptr_cast(&CG3SG1::Reload_) },
|
||||
{ 0x01D069B0, "_ZN6CG3SG110WeaponIdleEv", mfunc_ptr_cast(&CG3SG1::WeaponIdle_) },
|
||||
//{ 0x01D06A60, "_ZN6CG3SG112UseDecrementEv", mfunc_ptr_cast(&CG3SG1::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_g3sg1", (size_t)&weapon_g3sg1 },
|
||||
//{ 0x0, "_ZN6CG3SG19G3SG1FireEffi", mfunc_ptr_cast(&CG3SG1::G3SG1Fire) },
|
||||
{ 0x01D062D0, "weapon_g3sg1", (size_t)&weapon_g3sg1 },
|
||||
{ 0x01D06600, "_ZN6CG3SG19G3SG1FireEffi", mfunc_ptr_cast(&CG3SG1::G3SG1Fire) },
|
||||
//CGLOCK18
|
||||
//virtual func
|
||||
{ 0x01D071E0, "_ZN8CGLOCK185SpawnEv", mfunc_ptr_cast(&CGLOCK18::Spawn_) },
|
||||
@ -3180,8 +3172,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D07380, "_ZN8CGLOCK186DeployEv", mfunc_ptr_cast(&CGLOCK18::Deploy_) },
|
||||
//{ 0x01D07B10, "_ZN8CGLOCK1811GetMaxSpeedEv", mfunc_ptr_cast(&CGLOCK18::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D07B00, "_ZN8CGLOCK189iItemSlotEv", mfunc_ptr_cast(&CGLOCK18::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D07510, "_ZN8CGLOCK1813PrimaryAttackEv", mfunc_ptr_cast(&CGLOCK18::PrimaryAttack_) },
|
||||
{ 0x01D07480, "_ZN8CGLOCK1815SecondaryAttackEv", mfunc_ptr_cast(&CGLOCK18::SecondaryAttack_) },
|
||||
{ 0x01D07510, "_ZN8CGLOCK1813PrimaryAttackEv", mfunc_ptr_cast(&CGLOCK18::PrimaryAttack_) },
|
||||
{ 0x01D07980, "_ZN8CGLOCK186ReloadEv", mfunc_ptr_cast(&CGLOCK18::Reload_) },
|
||||
{ 0x01D079F0, "_ZN8CGLOCK1810WeaponIdleEv", mfunc_ptr_cast(&CGLOCK18::WeaponIdle_) },
|
||||
//{ 0x01D07B20, "_ZN8CGLOCK1812UseDecrementEv", mfunc_ptr_cast(&CGLOCK18::UseDecrement_) }, // DEFAULT
|
||||
@ -3191,24 +3183,24 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D07670, "_ZN8CGLOCK1811GLOCK18FireEffi", mfunc_ptr_cast(&CGLOCK18::GLOCK18Fire) },
|
||||
//CHEGrenade
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN10CHEGrenade5SpawnEv", mfunc_ptr_cast(&CHEGrenade::Spawn) },
|
||||
//{ 0x0, "_ZN10CHEGrenade8PrecacheEv", mfunc_ptr_cast(&CHEGrenade::Precache) },
|
||||
//{ 0x0, "_ZN10CHEGrenade11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CHEGrenade::GetItemInfo) },
|
||||
//{ 0x0, "_ZN10CHEGrenade9CanDeployEv", mfunc_ptr_cast(&CHEGrenade::CanDeploy) },
|
||||
//{ 0x0, "_ZN10CHEGrenade7CanDropEv", mfunc_ptr_cast(&CHEGrenade::CanDrop) },
|
||||
//{ 0x0, "_ZN10CHEGrenade6DeployEv", mfunc_ptr_cast(&CHEGrenade::Deploy) },
|
||||
//{ 0x0, "_ZN10CHEGrenade7HolsterEi", mfunc_ptr_cast(&CHEGrenade::Holster) },
|
||||
//{ 0x0, "_ZN10CHEGrenade11GetMaxSpeedEv", mfunc_ptr_cast(&CHEGrenade::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN10CHEGrenade9iItemSlotEv", mfunc_ptr_cast(&CHEGrenade::iItemSlot) },
|
||||
//{ 0x0, "_ZN10CHEGrenade13PrimaryAttackEv", mfunc_ptr_cast(&CHEGrenade::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN10CHEGrenade15SecondaryAttackEv", mfunc_ptr_cast(&CHEGrenade::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN10CHEGrenade10WeaponIdleEv", mfunc_ptr_cast(&CHEGrenade::WeaponIdle) },
|
||||
//{ 0x0, "_ZN10CHEGrenade12UseDecrementEv", mfunc_ptr_cast(&CHEGrenade::UseDecrement) },
|
||||
{ 0x01D07B90, "_ZN10CHEGrenade5SpawnEv", mfunc_ptr_cast(&CHEGrenade::Spawn_) },
|
||||
{ 0x01D07C00, "_ZN10CHEGrenade8PrecacheEv", mfunc_ptr_cast(&CHEGrenade::Precache_) },
|
||||
{ 0x01D07C60, "_ZN10CHEGrenade11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CHEGrenade::GetItemInfo_) },
|
||||
{ 0x01D08450, "_ZN10CHEGrenade9CanDeployEv", mfunc_ptr_cast(&CHEGrenade::CanDeploy_) },
|
||||
//{ 0x01D08490, "_ZN10CHEGrenade7CanDropEv", mfunc_ptr_cast(&CHEGrenade::CanDrop_) }, // DEFAULT
|
||||
{ 0x01D07CD0, "_ZN10CHEGrenade6DeployEv", mfunc_ptr_cast(&CHEGrenade::Deploy_) },
|
||||
{ 0x01D07D70, "_ZN10CHEGrenade7HolsterEi", mfunc_ptr_cast(&CHEGrenade::Holster_) },
|
||||
//{ 0x01D08480, "_ZN10CHEGrenade11GetMaxSpeedEv", mfunc_ptr_cast(&CHEGrenade::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D08470, "_ZN10CHEGrenade9iItemSlotEv", mfunc_ptr_cast(&CHEGrenade::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D07F80, "_ZN10CHEGrenade15SecondaryAttackEv", mfunc_ptr_cast(&CHEGrenade::SecondaryAttack_) },
|
||||
{ 0x01D07DD0, "_ZN10CHEGrenade13PrimaryAttackEv", mfunc_ptr_cast(&CHEGrenade::PrimaryAttack_) },
|
||||
{ 0x01D08020, "_ZN10CHEGrenade10WeaponIdleEv", mfunc_ptr_cast(&CHEGrenade::WeaponIdle_) },
|
||||
//{ 0x01D084A0, "_ZN10CHEGrenade12UseDecrementEv", mfunc_ptr_cast(&CHEGrenade::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_hegrenade", (size_t)&weapon_hegrenade },
|
||||
//{ 0x0, "_ZN10CHEGrenade19ShieldSecondaryFireEii", mfunc_ptr_cast(&CHEGrenade::ShieldSecondaryFire) },
|
||||
//{ 0x0, "_ZN10CHEGrenade19SetPlayerShieldAnimEv", mfunc_ptr_cast(&CHEGrenade::SetPlayerShieldAnim) },
|
||||
//{ 0x0, "_ZN10CHEGrenade21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CHEGrenade::ResetPlayerShieldAnim) },
|
||||
{ 0x01D07B40, "weapon_hegrenade", (size_t)&weapon_hegrenade },
|
||||
{ 0x01D07E40, "_ZN10CHEGrenade19ShieldSecondaryFireEii", mfunc_ptr_cast(&CHEGrenade::ShieldSecondaryFire) },
|
||||
//{ 0x01D07F90, "_ZN10CHEGrenade19SetPlayerShieldAnimEv", mfunc_ptr_cast(&CHEGrenade::SetPlayerShieldAnim) }, // NOXREF
|
||||
//{ 0x01D07FE0, "_ZN10CHEGrenade21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CHEGrenade::ResetPlayerShieldAnim) }, // NOXREF
|
||||
//CKnife
|
||||
//virtual func
|
||||
{ 0x01D08500, "_ZN6CKnife5SpawnEv", mfunc_ptr_cast(&CKnife::Spawn_) },
|
||||
@ -3219,8 +3211,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D08710, "_ZN6CKnife7HolsterEi", mfunc_ptr_cast(&CKnife::Holster_) },
|
||||
//{ 0x01D09900, "_ZN6CKnife11GetMaxSpeedEv", mfunc_ptr_cast(&CKnife::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D098F0, "_ZN6CKnife9iItemSlotEv", mfunc_ptr_cast(&CKnife::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D08980, "_ZN6CKnife13PrimaryAttackEv", mfunc_ptr_cast(&CKnife::PrimaryAttack_) },
|
||||
{ 0x01D08B50, "_ZN6CKnife15SecondaryAttackEv", mfunc_ptr_cast(&CKnife::SecondaryAttack_) },
|
||||
{ 0x01D08980, "_ZN6CKnife13PrimaryAttackEv", mfunc_ptr_cast(&CKnife::PrimaryAttack_) },
|
||||
//{ 0x01D09920, "_ZN6CKnife12UseDecrementEv", mfunc_ptr_cast(&CKnife::UseDecrement_) }, // DEFAULT
|
||||
{ 0x01D08BB0, "_ZN6CKnife10WeaponIdleEv", mfunc_ptr_cast(&CKnife::WeaponIdle_) },
|
||||
//non-virtual func
|
||||
@ -3236,83 +3228,83 @@ FunctionHook g_FunctionHooks[] =
|
||||
//{ 0x01D089E0, "_ZN6CKnife21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CKnife::ResetPlayerShieldAnim) }, // NOXREF
|
||||
//CM249
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN5CM2495SpawnEv", mfunc_ptr_cast(&CM249::Spawn) },
|
||||
//{ 0x0, "_ZN5CM2498PrecacheEv", mfunc_ptr_cast(&CM249::Precache) },
|
||||
//{ 0x0, "_ZN5CM24911GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CM249::GetItemInfo) },
|
||||
//{ 0x0, "_ZN5CM2496DeployEv", mfunc_ptr_cast(&CM249::Deploy) },
|
||||
//{ 0x0, "_ZN5CM24911GetMaxSpeedEv", mfunc_ptr_cast(&CM249::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN5CM2499iItemSlotEv", mfunc_ptr_cast(&CM249::iItemSlot) },
|
||||
//{ 0x0, "_ZN5CM24913PrimaryAttackEv", mfunc_ptr_cast(&CM249::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN5CM2496ReloadEv", mfunc_ptr_cast(&CM249::Reload) },
|
||||
//{ 0x0, "_ZN5CM24910WeaponIdleEv", mfunc_ptr_cast(&CM249::WeaponIdle) },
|
||||
//{ 0x0, "_ZN5CM24912UseDecrementEv", mfunc_ptr_cast(&CM249::UseDecrement) },
|
||||
{ 0x01D09980, "_ZN5CM2495SpawnEv", mfunc_ptr_cast(&CM249::Spawn_) },
|
||||
{ 0x01D099D0, "_ZN5CM2498PrecacheEv", mfunc_ptr_cast(&CM249::Precache_) },
|
||||
{ 0x01D09A60, "_ZN5CM24911GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CM249::GetItemInfo_) },
|
||||
{ 0x01D09AD0, "_ZN5CM2496DeployEv", mfunc_ptr_cast(&CM249::Deploy_) },
|
||||
//{ 0x01D0A010, "_ZN5CM24911GetMaxSpeedEv", mfunc_ptr_cast(&CM249::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0A000, "_ZN5CM2499iItemSlotEv", mfunc_ptr_cast(&CM249::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D09B20, "_ZN5CM24913PrimaryAttackEv", mfunc_ptr_cast(&CM249::PrimaryAttack_) },
|
||||
{ 0x01D09F40, "_ZN5CM2496ReloadEv", mfunc_ptr_cast(&CM249::Reload_) },
|
||||
{ 0x01D09F90, "_ZN5CM24910WeaponIdleEv", mfunc_ptr_cast(&CM249::WeaponIdle_) },
|
||||
//{ 0x01D0A020, "_ZN5CM24912UseDecrementEv", mfunc_ptr_cast(&CM249::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_m249", (size_t)&weapon_m249 },
|
||||
//{ 0x0, "_ZN5CM2498M249FireEffi", mfunc_ptr_cast(&CM249::M249Fire) },
|
||||
{ 0x01D09930, "weapon_m249", (size_t)&weapon_m249 },
|
||||
{ 0x01D09BC0, "_ZN5CM2498M249FireEffi", mfunc_ptr_cast(&CM249::M249Fire) },
|
||||
//CM3
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN3CM35SpawnEv", mfunc_ptr_cast(&CM3::Spawn) },
|
||||
//{ 0x0, "_ZN3CM38PrecacheEv", mfunc_ptr_cast(&CM3::Precache) },
|
||||
//{ 0x0, "_ZN3CM311GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CM3::GetItemInfo) },
|
||||
//{ 0x0, "_ZN3CM36DeployEv", mfunc_ptr_cast(&CM3::Deploy) },
|
||||
//{ 0x0, "_ZN3CM311GetMaxSpeedEv", mfunc_ptr_cast(&CM3::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN3CM39iItemSlotEv", mfunc_ptr_cast(&CM3::iItemSlot) },
|
||||
//{ 0x01D0A1E0, "_ZN3CM313PrimaryAttackEv", mfunc_ptr_cast(&CM3::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN3CM36ReloadEv", mfunc_ptr_cast(&CM3::Reload) },
|
||||
//{ 0x0, "_ZN3CM310WeaponIdleEv", mfunc_ptr_cast(&CM3::WeaponIdle) },
|
||||
//{ 0x0, "_ZN3CM312UseDecrementEv", mfunc_ptr_cast(&CM3::UseDecrement) },
|
||||
{ 0x01D0A080, "_ZN3CM35SpawnEv", mfunc_ptr_cast(&CM3::Spawn_) },
|
||||
{ 0x01D0A0C0, "_ZN3CM38PrecacheEv", mfunc_ptr_cast(&CM3::Precache_) },
|
||||
{ 0x01D0A140, "_ZN3CM311GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CM3::GetItemInfo_) },
|
||||
{ 0x01D0A1B0, "_ZN3CM36DeployEv", mfunc_ptr_cast(&CM3::Deploy_) },
|
||||
//{ 0x01D0A740, "_ZN3CM311GetMaxSpeedEv", mfunc_ptr_cast(&CM3::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0A730, "_ZN3CM39iItemSlotEv", mfunc_ptr_cast(&CM3::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0A1E0, "_ZN3CM313PrimaryAttackEv", mfunc_ptr_cast(&CM3::PrimaryAttack_) },
|
||||
{ 0x01D0A4A0, "_ZN3CM36ReloadEv", mfunc_ptr_cast(&CM3::Reload_) },
|
||||
{ 0x01D0A5D0, "_ZN3CM310WeaponIdleEv", mfunc_ptr_cast(&CM3::WeaponIdle_) },
|
||||
//{ 0x01D0A750, "_ZN3CM312UseDecrementEv", mfunc_ptr_cast(&CM3::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_m3", (size_t)&weapon_m3 },
|
||||
{ 0x01D0A030, "weapon_m3", (size_t)&weapon_m3 },
|
||||
//CM4A1
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN5CM4A15SpawnEv", mfunc_ptr_cast(&CM4A1::Spawn) },
|
||||
//{ 0x0, "_ZN5CM4A18PrecacheEv", mfunc_ptr_cast(&CM4A1::Precache) },
|
||||
//{ 0x0, "_ZN5CM4A111GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CM4A1::GetItemInfo) },
|
||||
//{ 0x0, "_ZN5CM4A16DeployEv", mfunc_ptr_cast(&CM4A1::Deploy) },
|
||||
//{ 0x0, "_ZN5CM4A111GetMaxSpeedEv", mfunc_ptr_cast(&CM4A1::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN5CM4A19iItemSlotEv", mfunc_ptr_cast(&CM4A1::iItemSlot) },
|
||||
//{ 0x0, "_ZN5CM4A113PrimaryAttackEv", mfunc_ptr_cast(&CM4A1::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN5CM4A115SecondaryAttackEv", mfunc_ptr_cast(&CM4A1::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN5CM4A16ReloadEv", mfunc_ptr_cast(&CM4A1::Reload) },
|
||||
//{ 0x0, "_ZN5CM4A110WeaponIdleEv", mfunc_ptr_cast(&CM4A1::WeaponIdle) },
|
||||
//{ 0x0, "_ZN5CM4A112UseDecrementEv", mfunc_ptr_cast(&CM4A1::UseDecrement) },
|
||||
{ 0x01D0A7B0, "_ZN5CM4A15SpawnEv", mfunc_ptr_cast(&CM4A1::Spawn_) },
|
||||
{ 0x01D0A810, "_ZN5CM4A18PrecacheEv", mfunc_ptr_cast(&CM4A1::Precache_) },
|
||||
{ 0x01D0A8C0, "_ZN5CM4A111GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CM4A1::GetItemInfo_) },
|
||||
{ 0x01D0A930, "_ZN5CM4A16DeployEv", mfunc_ptr_cast(&CM4A1::Deploy_) },
|
||||
{ 0x01D0B050, "_ZN5CM4A111GetMaxSpeedEv", mfunc_ptr_cast(&CM4A1::GetMaxSpeed_) },
|
||||
//{ 0x01D0B060, "_ZN5CM4A19iItemSlotEv", mfunc_ptr_cast(&CM4A1::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0A9C0, "_ZN5CM4A115SecondaryAttackEv", mfunc_ptr_cast(&CM4A1::SecondaryAttack_) },
|
||||
{ 0x01D0AA70, "_ZN5CM4A113PrimaryAttackEv", mfunc_ptr_cast(&CM4A1::PrimaryAttack_) },
|
||||
{ 0x01D0AF60, "_ZN5CM4A16ReloadEv", mfunc_ptr_cast(&CM4A1::Reload_) },
|
||||
{ 0x01D0AFC0, "_ZN5CM4A110WeaponIdleEv", mfunc_ptr_cast(&CM4A1::WeaponIdle_) },
|
||||
//{ 0x01D0B070, "_ZN5CM4A112UseDecrementEv", mfunc_ptr_cast(&CM4A1::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_m4a1", (size_t)&weapon_m4a1 },
|
||||
//{ 0x0, "_ZN5CM4A18M4A1FireEffi", mfunc_ptr_cast(&CM4A1::M4A1Fire) },
|
||||
{ 0x01D0A760, "weapon_m4a1", (size_t)&weapon_m4a1 },
|
||||
{ 0x01D0AB80, "_ZN5CM4A18M4A1FireEffi", mfunc_ptr_cast(&CM4A1::M4A1Fire) },
|
||||
//CMAC10
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CMAC105SpawnEv", mfunc_ptr_cast(&CMAC10::Spawn) },
|
||||
//{ 0x0, "_ZN6CMAC108PrecacheEv", mfunc_ptr_cast(&CMAC10::Precache) },
|
||||
//{ 0x0, "_ZN6CMAC1011GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CMAC10::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CMAC106DeployEv", mfunc_ptr_cast(&CMAC10::Deploy) },
|
||||
//{ 0x0, "_ZN6CMAC1011GetMaxSpeedEv", mfunc_ptr_cast(&CMAC10::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CMAC109iItemSlotEv", mfunc_ptr_cast(&CMAC10::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CMAC1013PrimaryAttackEv", mfunc_ptr_cast(&CMAC10::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CMAC106ReloadEv", mfunc_ptr_cast(&CMAC10::Reload) },
|
||||
//{ 0x0, "_ZN6CMAC1010WeaponIdleEv", mfunc_ptr_cast(&CMAC10::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CMAC1012UseDecrementEv", mfunc_ptr_cast(&CMAC10::UseDecrement) },
|
||||
{ 0x01D0B0D0, "_ZN6CMAC105SpawnEv", mfunc_ptr_cast(&CMAC10::Spawn_) },
|
||||
{ 0x01D0B120, "_ZN6CMAC108PrecacheEv", mfunc_ptr_cast(&CMAC10::Precache_) },
|
||||
{ 0x01D0B190, "_ZN6CMAC1011GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CMAC10::GetItemInfo_) },
|
||||
{ 0x01D0B200, "_ZN6CMAC106DeployEv", mfunc_ptr_cast(&CMAC10::Deploy_) },
|
||||
//{ 0x01D0B6E0, "_ZN6CMAC1011GetMaxSpeedEv", mfunc_ptr_cast(&CMAC10::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0B6D0, "_ZN6CMAC109iItemSlotEv", mfunc_ptr_cast(&CMAC10::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0B250, "_ZN6CMAC1013PrimaryAttackEv", mfunc_ptr_cast(&CMAC10::PrimaryAttack_) },
|
||||
{ 0x01D0B610, "_ZN6CMAC106ReloadEv", mfunc_ptr_cast(&CMAC10::Reload_) },
|
||||
{ 0x01D0B660, "_ZN6CMAC1010WeaponIdleEv", mfunc_ptr_cast(&CMAC10::WeaponIdle_) },
|
||||
//{ 0x01D0B6F0, "_ZN6CMAC1012UseDecrementEv", mfunc_ptr_cast(&CMAC10::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_mac10", (size_t)&weapon_mac10 },
|
||||
//{ 0x0, "_ZN6CMAC109MAC10FireEffi", mfunc_ptr_cast(&CMAC10::CMAC10Fire) },
|
||||
{ 0x01D0B080, "weapon_mac10", (size_t)&weapon_mac10 },
|
||||
{ 0x01D0B290, "_ZN6CMAC109MAC10FireEffi", mfunc_ptr_cast(&CMAC10::MAC10Fire) },
|
||||
//CP228
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN5CP2285SpawnEv", mfunc_ptr_cast(&CP228::Spawn) },
|
||||
//{ 0x0, "_ZN5CP2288PrecacheEv", mfunc_ptr_cast(&CP228::Precache) },
|
||||
//{ 0x0, "_ZN5CP22811GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CP228::GetItemInfo) },
|
||||
//{ 0x0, "_ZN5CP2286DeployEv", mfunc_ptr_cast(&CP228::Deploy) },
|
||||
//{ 0x0, "_ZN5CP22811GetMaxSpeedEv", mfunc_ptr_cast(&CP228::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN5CP2289iItemSlotEv", mfunc_ptr_cast(&CP228::iItemSlot) },
|
||||
//{ 0x0, "_ZN5CP22813PrimaryAttackEv", mfunc_ptr_cast(&CP228::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN5CP22815SecondaryAttackEv", mfunc_ptr_cast(&CP228::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN5CP2286ReloadEv", mfunc_ptr_cast(&CP228::Reload) },
|
||||
//{ 0x0, "_ZN5CP22810WeaponIdleEv", mfunc_ptr_cast(&CP228::WeaponIdle) },
|
||||
//{ 0x0, "_ZN5CP22812UseDecrementEv", mfunc_ptr_cast(&CP228::UseDecrement) },
|
||||
//{ 0x0, "_ZN5CP2288IsPistolEv", mfunc_ptr_cast(&CP228::IsPistol) },
|
||||
{ 0x01D0BDC0, "_ZN5CP2285SpawnEv", mfunc_ptr_cast(&CP228::Spawn_) },
|
||||
{ 0x01D0BE20, "_ZN5CP2288PrecacheEv", mfunc_ptr_cast(&CP228::Precache_) },
|
||||
{ 0x01D0BEB0, "_ZN5CP22811GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CP228::GetItemInfo_) },
|
||||
{ 0x01D0BF20, "_ZN5CP2286DeployEv", mfunc_ptr_cast(&CP228::Deploy_) },
|
||||
//{ 0x01D0C4A0, "_ZN5CP22811GetMaxSpeedEv", mfunc_ptr_cast(&CP228::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0C490, "_ZN5CP2289iItemSlotEv", mfunc_ptr_cast(&CP228::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0C080, "_ZN5CP22815SecondaryAttackEv", mfunc_ptr_cast(&CP228::SecondaryAttack_) },
|
||||
{ 0x01D0BFC0, "_ZN5CP22813PrimaryAttackEv", mfunc_ptr_cast(&CP228::PrimaryAttack_) },
|
||||
{ 0x01D0C380, "_ZN5CP2286ReloadEv", mfunc_ptr_cast(&CP228::Reload_) },
|
||||
{ 0x01D0C3D0, "_ZN5CP22810WeaponIdleEv", mfunc_ptr_cast(&CP228::WeaponIdle_) },
|
||||
//{ 0x01D0C4B0, "_ZN5CP22812UseDecrementEv", mfunc_ptr_cast(&CP228::UseDecrement_) }, // DEFAULT
|
||||
//{ 0x01D0C4C0, "_ZN5CP2288IsPistolEv", mfunc_ptr_cast(&CP228::IsPistol_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_p228", (size_t)&weapon_p228 },
|
||||
//{ 0x0, "_ZN5CP2288P228FireEffi", mfunc_ptr_cast(&CP228::P228Fire) },
|
||||
////{ 0x0, "_ZN5CP2288MakeBeamEv", mfunc_ptr_cast(&CP228::MakeBeam) }, // NOXREF
|
||||
////{ 0x0, "_ZN5CP22810BeamUpdateEv", mfunc_ptr_cast(&CP228::BeamUpdate) }, // NOXREF
|
||||
{ 0x01D0BD70, "weapon_p228", (size_t)&weapon_p228 },
|
||||
{ 0x01D0C090, "_ZN5CP2288P228FireEffi", mfunc_ptr_cast(&CP228::P228Fire) },
|
||||
//{ 0x0, "_ZN5CP2288MakeBeamEv", mfunc_ptr_cast(&CP228::MakeBeam) }, // NOXREF
|
||||
//{ 0x0, "_ZN5CP22810BeamUpdateEv", mfunc_ptr_cast(&CP228::BeamUpdate) }, // NOXREF
|
||||
//CP90
|
||||
//virtual func
|
||||
{ 0x01D0C520, "_ZN4CP905SpawnEv", mfunc_ptr_cast(&CP90::Spawn_) },
|
||||
@ -3330,167 +3322,167 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D0C750, "_ZN4CP907P90FireEffi", mfunc_ptr_cast(&CP90::P90Fire) },
|
||||
//CSCOUT
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CSCOUT5SpawnEv", mfunc_ptr_cast(&CSCOUT::Spawn) },
|
||||
//{ 0x0, "_ZN6CSCOUT8PrecacheEv", mfunc_ptr_cast(&CSCOUT::Precache) },
|
||||
//{ 0x0, "_ZN6CSCOUT11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSCOUT::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CSCOUT6DeployEv", mfunc_ptr_cast(&CSCOUT::Deploy) },
|
||||
//{ 0x0, "_ZN6CSCOUT11GetMaxSpeedEv", mfunc_ptr_cast(&CSCOUT::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CSCOUT9iItemSlotEv", mfunc_ptr_cast(&CSCOUT::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CSCOUT13PrimaryAttackEv", mfunc_ptr_cast(&CSCOUT::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CSCOUT15SecondaryAttackEv", mfunc_ptr_cast(&CSCOUT::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN6CSCOUT6ReloadEv", mfunc_ptr_cast(&CSCOUT::Reload) },
|
||||
//{ 0x0, "_ZN6CSCOUT10WeaponIdleEv", mfunc_ptr_cast(&CSCOUT::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CSCOUT12UseDecrementEv", mfunc_ptr_cast(&CSCOUT::UseDecrement) },
|
||||
{ 0x01D0CC00, "_ZN6CSCOUT5SpawnEv", mfunc_ptr_cast(&CSCOUT::Spawn_) },
|
||||
{ 0x01D0CC40, "_ZN6CSCOUT8PrecacheEv", mfunc_ptr_cast(&CSCOUT::Precache_) },
|
||||
{ 0x01D0CCC0, "_ZN6CSCOUT11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSCOUT::GetItemInfo_) },
|
||||
{ 0x01D0CD30, "_ZN6CSCOUT6DeployEv", mfunc_ptr_cast(&CSCOUT::Deploy_) },
|
||||
{ 0x01D0D280, "_ZN6CSCOUT11GetMaxSpeedEv", mfunc_ptr_cast(&CSCOUT::GetMaxSpeed_) },
|
||||
//{ 0x01D0D2A0, "_ZN6CSCOUT9iItemSlotEv", mfunc_ptr_cast(&CSCOUT::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0CDA0, "_ZN6CSCOUT15SecondaryAttackEv", mfunc_ptr_cast(&CSCOUT::SecondaryAttack_) },
|
||||
{ 0x01D0CE80, "_ZN6CSCOUT13PrimaryAttackEv", mfunc_ptr_cast(&CSCOUT::PrimaryAttack_) },
|
||||
{ 0x01D0D1A0, "_ZN6CSCOUT6ReloadEv", mfunc_ptr_cast(&CSCOUT::Reload_) },
|
||||
{ 0x01D0D200, "_ZN6CSCOUT10WeaponIdleEv", mfunc_ptr_cast(&CSCOUT::WeaponIdle_) },
|
||||
//{ 0x01D0D2B0, "_ZN6CSCOUT12UseDecrementEv", mfunc_ptr_cast(&CSCOUT::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_scout", (size_t)&weapon_scout },
|
||||
//{ 0x0, "_ZN6CSCOUT9SCOUTFireEffi", mfunc_ptr_cast(&CSCOUT::SCOUTFire) },
|
||||
{ 0x01D0CBB0, "weapon_scout", (size_t)&weapon_scout },
|
||||
{ 0x01D0CEF0, "_ZN6CSCOUT9SCOUTFireEffi", mfunc_ptr_cast(&CSCOUT::SCOUTFire) },
|
||||
//CSmokeGrenade
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN13CSmokeGrenade5SpawnEv", mfunc_ptr_cast(&CSmokeGrenade::Spawn) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade8PrecacheEv", mfunc_ptr_cast(&CSmokeGrenade::Precache) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSmokeGrenade::GetItemInfo) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade9CanDeployEv", mfunc_ptr_cast(&CSmokeGrenade::CanDeploy) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade7CanDropEv", mfunc_ptr_cast(&CSmokeGrenade::CanDrop) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade6DeployEv", mfunc_ptr_cast(&CSmokeGrenade::Deploy) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade7HolsterEi", mfunc_ptr_cast(&CSmokeGrenade::Holster) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade11GetMaxSpeedEv", mfunc_ptr_cast(&CSmokeGrenade::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade9iItemSlotEv", mfunc_ptr_cast(&CSmokeGrenade::iItemSlot) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade13PrimaryAttackEv", mfunc_ptr_cast(&CSmokeGrenade::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade15SecondaryAttackEv", mfunc_ptr_cast(&CSmokeGrenade::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade10WeaponIdleEv", mfunc_ptr_cast(&CSmokeGrenade::WeaponIdle) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade12UseDecrementEv", mfunc_ptr_cast(&CSmokeGrenade::UseDecrement) },
|
||||
{ 0x01D0E250, "_ZN13CSmokeGrenade5SpawnEv", mfunc_ptr_cast(&CSmokeGrenade::Spawn_) },
|
||||
{ 0x01D0E2C0, "_ZN13CSmokeGrenade8PrecacheEv", mfunc_ptr_cast(&CSmokeGrenade::Precache_) },
|
||||
{ 0x01D0E310, "_ZN13CSmokeGrenade11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSmokeGrenade::GetItemInfo_) },
|
||||
//{ 0x01D0EB80, "_ZN13CSmokeGrenade7CanDropEv", mfunc_ptr_cast(&CSmokeGrenade::CanDrop_) }, // DEFAULT
|
||||
{ 0x01D0E380, "_ZN13CSmokeGrenade6DeployEv", mfunc_ptr_cast(&CSmokeGrenade::Deploy_) },
|
||||
{ 0x01D0E420, "_ZN13CSmokeGrenade7HolsterEi", mfunc_ptr_cast(&CSmokeGrenade::Holster_) },
|
||||
//{ 0x01D0EB70, "_ZN13CSmokeGrenade11GetMaxSpeedEv", mfunc_ptr_cast(&CSmokeGrenade::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0EB60, "_ZN13CSmokeGrenade9iItemSlotEv", mfunc_ptr_cast(&CSmokeGrenade::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0E630, "_ZN13CSmokeGrenade15SecondaryAttackEv", mfunc_ptr_cast(&CSmokeGrenade::SecondaryAttack_) },
|
||||
{ 0x01D0E480, "_ZN13CSmokeGrenade13PrimaryAttackEv", mfunc_ptr_cast(&CSmokeGrenade::PrimaryAttack_) },
|
||||
{ 0x01D0E6D0, "_ZN13CSmokeGrenade10WeaponIdleEv", mfunc_ptr_cast(&CSmokeGrenade::WeaponIdle_) },
|
||||
//{ 0x01D0EB90, "_ZN13CSmokeGrenade12UseDecrementEv", mfunc_ptr_cast(&CSmokeGrenade::UseDecrement_) }, // DEFAULT
|
||||
{ 0x01D0EB40, "_ZN13CSmokeGrenade9CanDeployEv", mfunc_ptr_cast(&CSmokeGrenade::CanDeploy_) },
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_smokegrenade", (size_t)&weapon_smokegrenade },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade19ShieldSecondaryFireEii", mfunc_ptr_cast(&CSmokeGrenade::ShieldSecondaryFire) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade19SetPlayerShieldAnimEv", mfunc_ptr_cast(&CSmokeGrenade::SetPlayerShieldAnim) },
|
||||
//{ 0x0, "_ZN13CSmokeGrenade21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CSmokeGrenade::ResetPlayerShieldAnim) },
|
||||
{ 0x01D0E200, "weapon_smokegrenade", (size_t)&weapon_smokegrenade },
|
||||
{ 0x01D0E4F0, "_ZN13CSmokeGrenade19ShieldSecondaryFireEii", mfunc_ptr_cast(&CSmokeGrenade::ShieldSecondaryFire) },
|
||||
//{ 0x01D0E640, "_ZN13CSmokeGrenade19SetPlayerShieldAnimEv", mfunc_ptr_cast(&CSmokeGrenade::SetPlayerShieldAnim) }, // NOXREF
|
||||
//{ 0x01D0E690, "_ZN13CSmokeGrenade21ResetPlayerShieldAnimEv", mfunc_ptr_cast(&CSmokeGrenade::ResetPlayerShieldAnim) }, // NOXREF
|
||||
//CTMP
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN4CTMP5SpawnEv", mfunc_ptr_cast(&CTMP::Spawn) },
|
||||
//{ 0x0, "_ZN4CTMP8PrecacheEv", mfunc_ptr_cast(&CTMP::Precache) },
|
||||
//{ 0x0, "_ZN4CTMP11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CTMP::GetItemInfo) },
|
||||
//{ 0x0, "_ZN4CTMP6DeployEv", mfunc_ptr_cast(&CTMP::Deploy) },
|
||||
//{ 0x0, "_ZN4CTMP11GetMaxSpeedEv", mfunc_ptr_cast(&CTMP::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN4CTMP9iItemSlotEv", mfunc_ptr_cast(&CTMP::iItemSlot) },
|
||||
//{ 0x0, "_ZN4CTMP13PrimaryAttackEv", mfunc_ptr_cast(&CTMP::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN4CTMP6ReloadEv", mfunc_ptr_cast(&CTMP::Reload) },
|
||||
//{ 0x0, "_ZN4CTMP10WeaponIdleEv", mfunc_ptr_cast(&CTMP::WeaponIdle) },
|
||||
//{ 0x0, "_ZN4CTMP12UseDecrementEv", mfunc_ptr_cast(&CTMP::UseDecrement) },
|
||||
{ 0x01D0EBF0, "_ZN4CTMP5SpawnEv", mfunc_ptr_cast(&CTMP::Spawn_) },
|
||||
{ 0x01D0EC50, "_ZN4CTMP8PrecacheEv", mfunc_ptr_cast(&CTMP::Precache_) },
|
||||
{ 0x01D0ECB0, "_ZN4CTMP11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CTMP::GetItemInfo_) },
|
||||
{ 0x01D0ED20, "_ZN4CTMP6DeployEv", mfunc_ptr_cast(&CTMP::Deploy_) },
|
||||
//{ 0x01D0F1D0, "_ZN4CTMP11GetMaxSpeedEv", mfunc_ptr_cast(&CTMP::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0F1C0, "_ZN4CTMP9iItemSlotEv", mfunc_ptr_cast(&CTMP::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0ED70, "_ZN4CTMP13PrimaryAttackEv", mfunc_ptr_cast(&CTMP::PrimaryAttack_) },
|
||||
{ 0x01D0F100, "_ZN4CTMP6ReloadEv", mfunc_ptr_cast(&CTMP::Reload_) },
|
||||
{ 0x01D0F150, "_ZN4CTMP10WeaponIdleEv", mfunc_ptr_cast(&CTMP::WeaponIdle_) },
|
||||
//{ 0x01D0F1E0, "_ZN4CTMP12UseDecrementEv", mfunc_ptr_cast(&CTMP::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_tmp", (size_t)&weapon_tmp },
|
||||
//{ 0x0, "_ZN4CTMP7TMPFireEffi", mfunc_ptr_cast(&CTMP::TMPFire) },
|
||||
{ 0x01D0EBA0, "weapon_tmp", (size_t)&weapon_tmp },
|
||||
{ 0x01D0EDB0, "_ZN4CTMP7TMPFireEffi", mfunc_ptr_cast(&CTMP::TMPFire) },
|
||||
//CXM1014
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN7CXM10145SpawnEv", mfunc_ptr_cast(&CXM1014::Spawn) },
|
||||
//{ 0x0, "_ZN7CXM10148PrecacheEv", mfunc_ptr_cast(&CXM1014::Precache) },
|
||||
//{ 0x0, "_ZN7CXM101411GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CXM1014::GetItemInfo) },
|
||||
//{ 0x0, "_ZN7CXM10146DeployEv", mfunc_ptr_cast(&CXM1014::Deploy) },
|
||||
//{ 0x0, "_ZN7CXM101411GetMaxSpeedEv", mfunc_ptr_cast(&CXM1014::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN7CXM10149iItemSlotEv", mfunc_ptr_cast(&CXM1014::iItemSlot) },
|
||||
//{ 0x01D10370, "_ZN7CXM101413PrimaryAttackEv", mfunc_ptr_cast(&CXM1014::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN7CXM10146ReloadEv", mfunc_ptr_cast(&CXM1014::Reload) },
|
||||
//{ 0x0, "_ZN7CXM101410WeaponIdleEv", mfunc_ptr_cast(&CXM1014::WeaponIdle) },
|
||||
//{ 0x0, "_ZN7CXM101412UseDecrementEv", mfunc_ptr_cast(&CXM1014::UseDecrement) },
|
||||
{ 0x01D10220, "_ZN7CXM10145SpawnEv", mfunc_ptr_cast(&CXM1014::Spawn_) },
|
||||
{ 0x01D10260, "_ZN7CXM10148PrecacheEv", mfunc_ptr_cast(&CXM1014::Precache_) },
|
||||
{ 0x01D102D0, "_ZN7CXM101411GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CXM1014::GetItemInfo_) },
|
||||
{ 0x01D10340, "_ZN7CXM10146DeployEv", mfunc_ptr_cast(&CXM1014::Deploy_) },
|
||||
//{ 0x01D10940, "_ZN7CXM101411GetMaxSpeedEv", mfunc_ptr_cast(&CXM1014::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D10930, "_ZN7CXM10149iItemSlotEv", mfunc_ptr_cast(&CXM1014::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D10370, "_ZN7CXM101413PrimaryAttackEv", mfunc_ptr_cast(&CXM1014::PrimaryAttack_) },
|
||||
{ 0x01D10640, "_ZN7CXM10146ReloadEv", mfunc_ptr_cast(&CXM1014::Reload_) },
|
||||
{ 0x01D107F0, "_ZN7CXM101410WeaponIdleEv", mfunc_ptr_cast(&CXM1014::WeaponIdle_) },
|
||||
//{ 0x01D10950, "_ZN7CXM101412UseDecrementEv", mfunc_ptr_cast(&CXM1014::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_xm1014", (size_t)&weapon_xm1014 },
|
||||
{ 0x01D101D0, "weapon_xm1014", (size_t)&weapon_xm1014 },
|
||||
//CELITE
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CELITE5SpawnEv", mfunc_ptr_cast(&CELITE::Spawn) },
|
||||
//{ 0x0, "_ZN6CELITE8PrecacheEv", mfunc_ptr_cast(&CELITE::Precache) },
|
||||
//{ 0x0, "_ZN6CELITE11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CELITE::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CELITE6DeployEv", mfunc_ptr_cast(&CELITE::Deploy) },
|
||||
//{ 0x0, "_ZN6CELITE11GetMaxSpeedEv", mfunc_ptr_cast(&CELITE::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CELITE9iItemSlotEv", mfunc_ptr_cast(&CELITE::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CELITE13PrimaryAttackEv", mfunc_ptr_cast(&CELITE::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CELITE6ReloadEv", mfunc_ptr_cast(&CELITE::Reload) },
|
||||
//{ 0x0, "_ZN6CELITE10WeaponIdleEv", mfunc_ptr_cast(&CELITE::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CELITE12UseDecrementEv", mfunc_ptr_cast(&CELITE::UseDecrement) },
|
||||
//{ 0x0, "_ZN6CELITE8IsPistolEv", mfunc_ptr_cast(&CELITE::IsPistol) },
|
||||
{ 0x01D04200, "_ZN6CELITE5SpawnEv", mfunc_ptr_cast(&CELITE::Spawn_) },
|
||||
{ 0x01D04250, "_ZN6CELITE8PrecacheEv", mfunc_ptr_cast(&CELITE::Precache_) },
|
||||
{ 0x01D04300, "_ZN6CELITE11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CELITE::GetItemInfo_) },
|
||||
{ 0x01D04370, "_ZN6CELITE6DeployEv", mfunc_ptr_cast(&CELITE::Deploy_) },
|
||||
//{ 0x01D049D0, "_ZN6CELITE11GetMaxSpeedEv", mfunc_ptr_cast(&CELITE::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D049C0, "_ZN6CELITE9iItemSlotEv", mfunc_ptr_cast(&CELITE::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D043D0, "_ZN6CELITE13PrimaryAttackEv", mfunc_ptr_cast(&CELITE::PrimaryAttack_) },
|
||||
{ 0x01D04900, "_ZN6CELITE6ReloadEv", mfunc_ptr_cast(&CELITE::Reload_) },
|
||||
{ 0x01D04940, "_ZN6CELITE10WeaponIdleEv", mfunc_ptr_cast(&CELITE::WeaponIdle_) },
|
||||
//{ 0x01D049E0, "_ZN6CELITE12UseDecrementEv", mfunc_ptr_cast(&CELITE::UseDecrement_) }, // DEFAULT
|
||||
//{ 0x01D049F0, "_ZN6CELITE8IsPistolEv", mfunc_ptr_cast(&CELITE::IsPistol_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_xm1014", (size_t)&weapon_xm1014 },
|
||||
//{ 0x0, "_ZN6CELITE9ELITEFireEffi", mfunc_ptr_cast(&CELITE::ELITEFire) },
|
||||
{ 0x01D041B0, "weapon_elite", (size_t)&weapon_elite },
|
||||
{ 0x01D04490, "_ZN6CELITE9ELITEFireEffi", mfunc_ptr_cast(&CELITE::ELITEFire) },
|
||||
//CFiveSeven
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN10CFiveSeven5SpawnEv", mfunc_ptr_cast(&CFiveSeven::Spawn) },
|
||||
//{ 0x0, "_ZN10CFiveSeven8PrecacheEv", mfunc_ptr_cast(&CFiveSeven::Precache) },
|
||||
//{ 0x0, "_ZN10CFiveSeven11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CFiveSeven::GetItemInfo) },
|
||||
//{ 0x0, "_ZN10CFiveSeven6DeployEv", mfunc_ptr_cast(&CFiveSeven::Deploy) },
|
||||
//{ 0x0, "_ZN10CFiveSeven11GetMaxSpeedEv", mfunc_ptr_cast(&CFiveSeven::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN10CFiveSeven9iItemSlotEv", mfunc_ptr_cast(&CFiveSeven::iItemSlot) },
|
||||
//{ 0x0, "_ZN10CFiveSeven13PrimaryAttackEv", mfunc_ptr_cast(&CFiveSeven::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN10CFiveSeven15SecondaryAttackEv", mfunc_ptr_cast(&CFiveSeven::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN10CFiveSeven6ReloadEv", mfunc_ptr_cast(&CFiveSeven::Reload) },
|
||||
//{ 0x0, "_ZN10CFiveSeven10WeaponIdleEv", mfunc_ptr_cast(&CFiveSeven::WeaponIdle) },
|
||||
//{ 0x0, "_ZN10CFiveSeven12UseDecrementEv", mfunc_ptr_cast(&CFiveSeven::UseDecrement) },
|
||||
//{ 0x0, "_ZN10CFiveSeven8IsPistolEv", mfunc_ptr_cast(&CFiveSeven::IsPistol) },
|
||||
{ 0x01D05280, "_ZN10CFiveSeven5SpawnEv", mfunc_ptr_cast(&CFiveSeven::Spawn_) },
|
||||
{ 0x01D052E0, "_ZN10CFiveSeven8PrecacheEv", mfunc_ptr_cast(&CFiveSeven::Precache_) },
|
||||
{ 0x01D05370, "_ZN10CFiveSeven11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CFiveSeven::GetItemInfo_) },
|
||||
{ 0x01D053E0, "_ZN10CFiveSeven6DeployEv", mfunc_ptr_cast(&CFiveSeven::Deploy_) },
|
||||
//{ 0x01D05950, "_ZN10CFiveSeven11GetMaxSpeedEv", mfunc_ptr_cast(&CFiveSeven::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D05940, "_ZN10CFiveSeven9iItemSlotEv", mfunc_ptr_cast(&CFiveSeven::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D05540, "_ZN10CFiveSeven15SecondaryAttackEv", mfunc_ptr_cast(&CFiveSeven::SecondaryAttack_) },
|
||||
{ 0x01D05480, "_ZN10CFiveSeven13PrimaryAttackEv", mfunc_ptr_cast(&CFiveSeven::PrimaryAttack_) },
|
||||
{ 0x01D05840, "_ZN10CFiveSeven6ReloadEv", mfunc_ptr_cast(&CFiveSeven::Reload_) },
|
||||
{ 0x01D05880, "_ZN10CFiveSeven10WeaponIdleEv", mfunc_ptr_cast(&CFiveSeven::WeaponIdle_) },
|
||||
//{ 0x01D05960, "_ZN10CFiveSeven12UseDecrementEv", mfunc_ptr_cast(&CFiveSeven::UseDecrement_) }, // DEFAULT
|
||||
//{ 0x01D05970, "_ZN10CFiveSeven8IsPistolEv", mfunc_ptr_cast(&CFiveSeven::IsPistol_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_fiveseven", (size_t)&weapon_fiveseven },
|
||||
//{ 0x0, "_ZN10CFiveSeven13FiveSevenFireEffi", mfunc_ptr_cast(&CFiveSeven::FiveSevenFire) },
|
||||
////{ 0x0, "_ZN10CFiveSeven8MakeBeamEv", mfunc_ptr_cast(&CFiveSeven::MakeBeam) }, // NOXREF
|
||||
////{ 0x0, "_ZN10CFiveSeven10BeamUpdateEv", mfunc_ptr_cast(&CFiveSeven::BeamUpdate) }, // NOXREF
|
||||
{ 0x01D05230, "weapon_fiveseven", (size_t)&weapon_fiveseven },
|
||||
{ 0x01D05550, "_ZN10CFiveSeven13FiveSevenFireEffi", mfunc_ptr_cast(&CFiveSeven::FiveSevenFire) },
|
||||
//{ 0x0, "_ZN10CFiveSeven8MakeBeamEv", mfunc_ptr_cast(&CFiveSeven::MakeBeam) }, // NOXREF
|
||||
//{ 0x0, "_ZN10CFiveSeven10BeamUpdateEv", mfunc_ptr_cast(&CFiveSeven::BeamUpdate) }, // NOXREF
|
||||
//CUMP45
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CUMP455SpawnEv", mfunc_ptr_cast(&CUMP45::Spawn) },
|
||||
//{ 0x0, "_ZN6CUMP458PrecacheEv", mfunc_ptr_cast(&CUMP45::Precache) },
|
||||
//{ 0x0, "_ZN6CUMP4511GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CUMP45::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CUMP456DeployEv", mfunc_ptr_cast(&CUMP45::Deploy) },
|
||||
//{ 0x0, "_ZN6CUMP4511GetMaxSpeedEv", mfunc_ptr_cast(&CUMP45::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CUMP459iItemSlotEv", mfunc_ptr_cast(&CUMP45::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CUMP4513PrimaryAttackEv", mfunc_ptr_cast(&CUMP45::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CUMP456ReloadEv", mfunc_ptr_cast(&CUMP45::Reload) },
|
||||
//{ 0x0, "_ZN6CUMP4510WeaponIdleEv", mfunc_ptr_cast(&CUMP45::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CUMP4512UseDecrementEv", mfunc_ptr_cast(&CUMP45::UseDecrement) },
|
||||
{ 0x01D0F240, "_ZN6CUMP455SpawnEv", mfunc_ptr_cast(&CUMP45::Spawn_) },
|
||||
{ 0x01D0F290, "_ZN6CUMP458PrecacheEv", mfunc_ptr_cast(&CUMP45::Precache_) },
|
||||
{ 0x01D0F300, "_ZN6CUMP4511GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CUMP45::GetItemInfo_) },
|
||||
{ 0x01D0F370, "_ZN6CUMP456DeployEv", mfunc_ptr_cast(&CUMP45::Deploy_) },
|
||||
//{ 0x01D0F840, "_ZN6CUMP4511GetMaxSpeedEv", mfunc_ptr_cast(&CUMP45::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D0F830, "_ZN6CUMP459iItemSlotEv", mfunc_ptr_cast(&CUMP45::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0F3C0, "_ZN6CUMP4513PrimaryAttackEv", mfunc_ptr_cast(&CUMP45::PrimaryAttack_) },
|
||||
{ 0x01D0F770, "_ZN6CUMP456ReloadEv", mfunc_ptr_cast(&CUMP45::Reload_) },
|
||||
{ 0x01D0F7C0, "_ZN6CUMP4510WeaponIdleEv", mfunc_ptr_cast(&CUMP45::WeaponIdle_) },
|
||||
//{ 0x01D0F850, "_ZN6CUMP4512UseDecrementEv", mfunc_ptr_cast(&CUMP45::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_ump45", (size_t)&weapon_ump45 },
|
||||
//{ 0x0, "_ZN6CUMP459UMP45FireEffi", mfunc_ptr_cast(&CUMP45::UMP45Fire) },
|
||||
{ 0x01D0F1F0, "weapon_ump45", (size_t)&weapon_ump45 },
|
||||
{ 0x01D0F400, "_ZN6CUMP459UMP45FireEffi", mfunc_ptr_cast(&CUMP45::UMP45Fire) },
|
||||
//CSG550
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CSG5505SpawnEv", mfunc_ptr_cast(&CSG550::Spawn) },
|
||||
//{ 0x0, "_ZN6CSG5508PrecacheEv", mfunc_ptr_cast(&CSG550::Precache) },
|
||||
//{ 0x0, "_ZN6CSG55011GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSG550::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CSG5506DeployEv", mfunc_ptr_cast(&CSG550::Deploy) },
|
||||
//{ 0x0, "_ZN6CSG55011GetMaxSpeedEv", mfunc_ptr_cast(&CSG550::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CSG5509iItemSlotEv", mfunc_ptr_cast(&CSG550::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CSG55013PrimaryAttackEv", mfunc_ptr_cast(&CSG550::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CSG55015SecondaryAttackEv", mfunc_ptr_cast(&CSG550::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN6CSG5506ReloadEv", mfunc_ptr_cast(&CSG550::Reload) },
|
||||
//{ 0x0, "_ZN6CSG55010WeaponIdleEv", mfunc_ptr_cast(&CSG550::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CSG55012UseDecrementEv", mfunc_ptr_cast(&CSG550::UseDecrement) },
|
||||
{ 0x01D0D310, "_ZN6CSG5505SpawnEv", mfunc_ptr_cast(&CSG550::Spawn_) },
|
||||
{ 0x01D0D360, "_ZN6CSG5508PrecacheEv", mfunc_ptr_cast(&CSG550::Precache_) },
|
||||
{ 0x01D0D3E0, "_ZN6CSG55011GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CSG550::GetItemInfo_) },
|
||||
{ 0x01D0D450, "_ZN6CSG5506DeployEv", mfunc_ptr_cast(&CSG550::Deploy_) },
|
||||
{ 0x01D0DA10, "_ZN6CSG55011GetMaxSpeedEv", mfunc_ptr_cast(&CSG550::GetMaxSpeed_) },
|
||||
//{ 0x01D0DA30, "_ZN6CSG5509iItemSlotEv", mfunc_ptr_cast(&CSG550::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D0D480, "_ZN6CSG55015SecondaryAttackEv", mfunc_ptr_cast(&CSG550::SecondaryAttack_) },
|
||||
{ 0x01D0D560, "_ZN6CSG55013PrimaryAttackEv", mfunc_ptr_cast(&CSG550::PrimaryAttack_) },
|
||||
{ 0x01D0D920, "_ZN6CSG5506ReloadEv", mfunc_ptr_cast(&CSG550::Reload_) },
|
||||
{ 0x01D0D990, "_ZN6CSG55010WeaponIdleEv", mfunc_ptr_cast(&CSG550::WeaponIdle_) },
|
||||
//{ 0x01D0DA40, "_ZN6CSG55012UseDecrementEv", mfunc_ptr_cast(&CSG550::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_sg550", (size_t)&weapon_sg550 },
|
||||
//{ 0x0, "_ZN6CSG5509SG550FireEffi", mfunc_ptr_cast(&CSG550::SG550Fire) },
|
||||
{ 0x01D0D2C0, "weapon_sg550", (size_t)&weapon_sg550 },
|
||||
{ 0x01D0D610, "_ZN6CSG5509SG550FireEffi", mfunc_ptr_cast(&CSG550::SG550Fire) },
|
||||
//CGalil
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CGalil5SpawnEv", mfunc_ptr_cast(&CGalil::Spawn) },
|
||||
//{ 0x0, "_ZN6CGalil8PrecacheEv", mfunc_ptr_cast(&CGalil::Precache) },
|
||||
//{ 0x0, "_ZN6CGalil11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CGalil::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CGalil6DeployEv", mfunc_ptr_cast(&CGalil::Deploy) },
|
||||
//{ 0x0, "_ZN6CGalil11GetMaxSpeedEv", mfunc_ptr_cast(&CGalil::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CGalil9iItemSlotEv", mfunc_ptr_cast(&CGalil::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CGalil13PrimaryAttackEv", mfunc_ptr_cast(&CGalil::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CGalil15SecondaryAttackEv", mfunc_ptr_cast(&CGalil::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN6CGalil6ReloadEv", mfunc_ptr_cast(&CGalil::Reload) },
|
||||
//{ 0x0, "_ZN6CGalil10WeaponIdleEv", mfunc_ptr_cast(&CGalil::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CGalil12UseDecrementEv", mfunc_ptr_cast(&CGalil::UseDecrement) },
|
||||
{ 0x01D06AC0, "_ZN6CGalil5SpawnEv", mfunc_ptr_cast(&CGalil::Spawn_) },
|
||||
{ 0x01D06B00, "_ZN6CGalil8PrecacheEv", mfunc_ptr_cast(&CGalil::Precache_) },
|
||||
{ 0x01D06B80, "_ZN6CGalil11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CGalil::GetItemInfo_) },
|
||||
{ 0x01D06BF0, "_ZN6CGalil6DeployEv", mfunc_ptr_cast(&CGalil::Deploy_) },
|
||||
//{ 0x01D07170, "_ZN6CGalil11GetMaxSpeedEv", mfunc_ptr_cast(&CGalil::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D07160, "_ZN6CGalil9iItemSlotEv", mfunc_ptr_cast(&CGalil::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D06C40, "_ZN6CGalil15SecondaryAttackEv", mfunc_ptr_cast(&CGalil::SecondaryAttack_) },
|
||||
{ 0x01D06C50, "_ZN6CGalil13PrimaryAttackEv", mfunc_ptr_cast(&CGalil::PrimaryAttack_) },
|
||||
{ 0x01D070A0, "_ZN6CGalil6ReloadEv", mfunc_ptr_cast(&CGalil::Reload_) },
|
||||
{ 0x01D070F0, "_ZN6CGalil10WeaponIdleEv", mfunc_ptr_cast(&CGalil::WeaponIdle_) },
|
||||
//{ 0x01D07180, "_ZN6CGalil12UseDecrementEv", mfunc_ptr_cast(&CGalil::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_galil", (size_t)&weapon_galil },
|
||||
//{ 0x0, "_ZN6CGalil9GalilFireEffi", mfunc_ptr_cast(&CGalil::GalilFire) },
|
||||
{ 0x01D06A70, "weapon_galil", (size_t)&weapon_galil },
|
||||
{ 0x01D06D20, "_ZN6CGalil9GalilFireEffi", mfunc_ptr_cast(&CGalil::GalilFire) },
|
||||
//CFamas
|
||||
//virtual func
|
||||
//{ 0x0, "_ZN6CFamas5SpawnEv", mfunc_ptr_cast(&CFamas::Spawn) },
|
||||
//{ 0x0, "_ZN6CFamas8PrecacheEv", mfunc_ptr_cast(&CFamas::Precache) },
|
||||
//{ 0x0, "_ZN6CFamas11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CFamas::GetItemInfo) },
|
||||
//{ 0x0, "_ZN6CFamas6DeployEv", mfunc_ptr_cast(&CFamas::Deploy) },
|
||||
//{ 0x0, "_ZN6CFamas11GetMaxSpeedEv", mfunc_ptr_cast(&CFamas::GetMaxSpeed) },
|
||||
//{ 0x0, "_ZN6CFamas9iItemSlotEv", mfunc_ptr_cast(&CFamas::iItemSlot) },
|
||||
//{ 0x0, "_ZN6CFamas13PrimaryAttackEv", mfunc_ptr_cast(&CFamas::PrimaryAttack) },
|
||||
//{ 0x0, "_ZN6CFamas15SecondaryAttackEv", mfunc_ptr_cast(&CFamas::SecondaryAttack) },
|
||||
//{ 0x0, "_ZN6CFamas6ReloadEv", mfunc_ptr_cast(&CFamas::Reload) },
|
||||
//{ 0x0, "_ZN6CFamas10WeaponIdleEv", mfunc_ptr_cast(&CFamas::WeaponIdle) },
|
||||
//{ 0x0, "_ZN6CFamas12UseDecrementEv", mfunc_ptr_cast(&CFamas::UseDecrement) },
|
||||
{ 0x01D04A50, "_ZN6CFamas5SpawnEv", mfunc_ptr_cast(&CFamas::Spawn_) },
|
||||
{ 0x01D04AA0, "_ZN6CFamas8PrecacheEv", mfunc_ptr_cast(&CFamas::Precache_) },
|
||||
{ 0x01D04B40, "_ZN6CFamas11GetItemInfoEP8ItemInfo", mfunc_ptr_cast(&CFamas::GetItemInfo_) },
|
||||
{ 0x01D04BB0, "_ZN6CFamas6DeployEv", mfunc_ptr_cast(&CFamas::Deploy_) },
|
||||
//{ 0x01D05210, "_ZN6CFamas11GetMaxSpeedEv", mfunc_ptr_cast(&CFamas::GetMaxSpeed_) }, // DEFAULT
|
||||
//{ 0x01D05200, "_ZN6CFamas9iItemSlotEv", mfunc_ptr_cast(&CFamas::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D04C10, "_ZN6CFamas15SecondaryAttackEv", mfunc_ptr_cast(&CFamas::SecondaryAttack_) },
|
||||
{ 0x01D04C90, "_ZN6CFamas13PrimaryAttackEv", mfunc_ptr_cast(&CFamas::PrimaryAttack_) },
|
||||
{ 0x01D05120, "_ZN6CFamas6ReloadEv", mfunc_ptr_cast(&CFamas::Reload_) },
|
||||
{ 0x01D05190, "_ZN6CFamas10WeaponIdleEv", mfunc_ptr_cast(&CFamas::WeaponIdle_) },
|
||||
//{ 0x01D05220, "_ZN6CFamas12UseDecrementEv", mfunc_ptr_cast(&CFamas::UseDecrement_) }, // DEFAULT
|
||||
//non-virtual func
|
||||
//{ 0x0, "weapon_famas", (size_t)&weapon_famas },
|
||||
//{ 0x0, "_ZN6CFamas9FamasFireEffii", mfunc_ptr_cast(&CFamas::FamasFire) },
|
||||
{ 0x01D04A00, "weapon_famas", (size_t)&weapon_famas },
|
||||
{ 0x01D04D70, "_ZN6CFamas9FamasFireEffii", mfunc_ptr_cast(&CFamas::FamasFire) },
|
||||
//CArmoury
|
||||
//virtual func
|
||||
{ 0x01DD0E50, "_ZN8CArmoury5SpawnEv", mfunc_ptr_cast(&CArmoury::Spawn_) },
|
||||
@ -3499,7 +3491,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DD0D80, "_ZN8CArmoury8KeyValueEP14KeyValueData_s", mfunc_ptr_cast(&CArmoury::KeyValue_) },
|
||||
//non-virtual func
|
||||
{ 0x01DD0E00, "armoury_entity", (size_t)&armoury_entity },
|
||||
//{ 0x0, "_ZN8CArmoury12ArmouryTouchEP11CBaseEntity", mfunc_ptr_cast(&CArmoury::ArmouryTouch) },
|
||||
{ 0x01DD0A10, "_ZN8CArmoury12ArmouryTouchEP11CBaseEntity", mfunc_ptr_cast(&CArmoury::ArmouryTouch) },
|
||||
|
||||
#endif // Weapons_Region
|
||||
|
||||
@ -3509,9 +3501,9 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D831C0, "_ZN8CGrenade5SpawnEv", mfunc_ptr_cast(&CGrenade::Spawn_) },
|
||||
{ 0x01D84820, "_ZN8CGrenade4SaveER5CSave", mfunc_ptr_cast(&CGrenade::Save_) },
|
||||
{ 0x01D84850, "_ZN8CGrenade7RestoreER8CRestore", mfunc_ptr_cast(&CGrenade::Restore_) },
|
||||
{ 0x01D594F0, "_ZN8CGrenade10ObjectCapsEv", mfunc_ptr_cast(&CGrenade::ObjectCaps_) },
|
||||
//{ 0x01D594F0, "_ZN8CGrenade10ObjectCapsEv", mfunc_ptr_cast(&CGrenade::ObjectCaps_) }, // DEFAULT
|
||||
{ 0x01D82320, "_ZN8CGrenade6KilledEP9entvars_si", mfunc_ptr_cast(&CGrenade::Killed_) },
|
||||
{ 0x01D83560, "_ZN8CGrenade10BloodColorEv", mfunc_ptr_cast(&CGrenade::BloodColor_) },
|
||||
//{ 0x01D83560, "_ZN8CGrenade10BloodColorEv", mfunc_ptr_cast(&CGrenade::BloodColor_) }, // DEFAULT
|
||||
{ 0x01D83720, "_ZN8CGrenade3UseEP11CBaseEntityS1_8USE_TYPEf", mfunc_ptr_cast(&CGrenade::Use_) },
|
||||
{ 0x01D82E00, "_ZN8CGrenade11BounceSoundEv", mfunc_ptr_cast(&CGrenade::BounceSound_) },
|
||||
//non-virtual func
|
||||
@ -4489,8 +4481,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D862D0, "_ZN13CWeaponCycler6DeployEv", mfunc_ptr_cast(&CWeaponCycler::Deploy_) },
|
||||
{ 0x01D86320, "_ZN13CWeaponCycler7HolsterEi", mfunc_ptr_cast(&CWeaponCycler::Holster_) },
|
||||
//{ 0x01D861D0, "_ZN13CWeaponCycler9iItemSlotEv", mfunc_ptr_cast(&CWeaponCycler::iItemSlot_) }, // DEFAULT
|
||||
{ 0x01D86340, "_ZN13CWeaponCycler13PrimaryAttackEv", mfunc_ptr_cast(&CWeaponCycler::PrimaryAttack_) },
|
||||
{ 0x01D86370, "_ZN13CWeaponCycler15SecondaryAttackEv", mfunc_ptr_cast(&CWeaponCycler::SecondaryAttack_) },
|
||||
{ 0x01D86340, "_ZN13CWeaponCycler13PrimaryAttackEv", mfunc_ptr_cast(&CWeaponCycler::PrimaryAttack_) },
|
||||
//CWreckage
|
||||
//virtual func
|
||||
{ 0x01D864D0, "_ZN9CWreckage5SpawnEv", mfunc_ptr_cast(&CWreckage::Spawn_) },
|
||||
@ -5330,11 +5322,34 @@ VirtualTableRef g_TableRefs[] =
|
||||
{
|
||||
// Weapon shared
|
||||
{ 0x01DF46BC, "CKnife", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF34E4, "CAWP", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF51AC, "CP90", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF4394, "CGLOCK18", 95 },
|
||||
{ 0x01DF5C6C, "CUSP", 95 },
|
||||
{ 0x01DF368C, "CC4", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF5C6C, "CUSP", 95 },
|
||||
{ 0x01DF57DC, "CSmokeGrenade", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF4B8C, "CM4A1", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF453C, "CHEGrenade", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF3ED4, "CFlashbang", 95 },
|
||||
{ 0x01DF3B94, "CFamas", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF39D4, "CELITE", 95 },
|
||||
{ 0x01DF3D34, "CFiveSeven", 95 },
|
||||
{ 0x01DF502C, "CP228", 95 },
|
||||
{ 0x01DF5DF4, "CXM1014", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF407C, "CG3SG1", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF54CC, "CSG550", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF3824, "CDEAGLE", 95 },
|
||||
{ 0x01DF34E4, "CAWP", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF5334, "CSCOUT", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF5654, "CSG552", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF49FC, "CM3", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF333C, "CAUG", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF420C, "CGalil", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF3174, "CAK47", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF4864, "CM249", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF51AC, "CP90", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF4D0C, "CMAC10", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF5AE4, "CUMP45", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF4E9C, "CMP5N", CWEAPON_VIRTUAL_COUNT },
|
||||
{ 0x01DF595C, "CTMP", CWEAPON_VIRTUAL_COUNT },
|
||||
|
||||
{ 0x01DFD984, "CWShield", CBASE_VIRTUAL_COUNT },
|
||||
|
||||
@ -5522,7 +5537,7 @@ VirtualTableRef g_TableRefs[] =
|
||||
{ NULL, NULL } // BaseClass__for_vtbl
|
||||
};
|
||||
|
||||
// refs
|
||||
// references
|
||||
AddressRef g_FunctionRefs[] =
|
||||
{
|
||||
#ifndef Function_References_Region
|
||||
|
Loading…
Reference in New Issue
Block a user