mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-27 14:08:00 +03:00
Regamedll API WIP: added some more API functions.
Added new cvar, mp_hegrenade_penetration, mp_nadedrops more details in game.cfg. Let inflict damage by grenades to breakable objects.
This commit is contained in:
parent
455f0c6118
commit
d8b12ee80b
13
dist/game.cfg
vendored
13
dist/game.cfg
vendored
@ -30,3 +30,16 @@ mp_maxmoney 16000
|
|||||||
// Example setting: "ae" - blocks round time and bomb round end checks
|
// Example setting: "ae" - blocks round time and bomb round end checks
|
||||||
// Default value: "0"
|
// Default value: "0"
|
||||||
mp_round_infinite 0
|
mp_round_infinite 0
|
||||||
|
|
||||||
|
// Disable grenade damage through walls
|
||||||
|
// 0 - disabled
|
||||||
|
// 1 - enabled
|
||||||
|
// Default value: "0"
|
||||||
|
mp_hegrenade_penetration 0
|
||||||
|
|
||||||
|
// Drop a grenade after player death
|
||||||
|
// 0 - disabled
|
||||||
|
// 1 - enabled (only the first slot grenades)
|
||||||
|
// 2 - drop a everyone
|
||||||
|
// Default value: "0"
|
||||||
|
mp_nadedrops 0
|
||||||
|
@ -143,7 +143,8 @@ void setupToolchain(NativeBinarySpec b)
|
|||||||
'_vsnprintf': 'vsnprintf',
|
'_vsnprintf': 'vsnprintf',
|
||||||
'_write' : 'write',
|
'_write' : 'write',
|
||||||
'_close' : 'close',
|
'_close' : 'close',
|
||||||
'_vsnwprintf' : 'vswprintf'
|
'_vsnwprintf' : 'vswprintf',
|
||||||
|
'_access' : 'access'
|
||||||
])
|
])
|
||||||
|
|
||||||
cfg.linkerOptions.args '-no-opt-class-analysis'
|
cfg.linkerOptions.args '-no-opt-class-analysis'
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
// Give 3rd-party to get the virtual table of the object.
|
||||||
|
// Example: AMXModX module: Hamsandwich
|
||||||
|
// RegisterHam(Ham_Spawn, "bot", "CCSBot__Spawn", 1);
|
||||||
|
LINK_ENTITY_TO_CLASS(bot, CCSBot, CAPI_CSBot);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Return the number of bots following the given player
|
// Return the number of bots following the given player
|
||||||
int GetBotFollowCount(CBasePlayer *leader)
|
int GetBotFollowCount(CBasePlayer *leader)
|
||||||
{
|
{
|
||||||
|
@ -419,6 +419,14 @@ bool BotPhraseManager::Initialize(const char *filename, int bankIndex)
|
|||||||
char baseDir[RadioPathLen] = "";
|
char baseDir[RadioPathLen] = "";
|
||||||
char compositeFilename[RadioPathLen];
|
char compositeFilename[RadioPathLen];
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
char soundDir[MAX_PATH];
|
||||||
|
char filePath[MAX_PATH];
|
||||||
|
|
||||||
|
GET_GAME_DIR(soundDir);
|
||||||
|
Q_strcat(soundDir, "\\sound\\");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Parse the BotChatter.db into BotPhrase collections
|
// Parse the BotChatter.db into BotPhrase collections
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -567,8 +575,8 @@ bool BotPhraseManager::Initialize(const char *filename, int bankIndex)
|
|||||||
FREE_FILE(phraseDataFile);
|
FREE_FILE(phraseDataFile);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
token = MP_COM_GetToken();
|
|
||||||
|
|
||||||
|
token = MP_COM_GetToken();
|
||||||
GameEventType event = NameToGameEvent(token);
|
GameEventType event = NameToGameEvent(token);
|
||||||
if (event <= EVENT_START_RADIO_1 || event >= EVENT_END_RADIO)
|
if (event <= EVENT_START_RADIO_1 || event >= EVENT_END_RADIO)
|
||||||
{
|
{
|
||||||
@ -578,7 +586,6 @@ bool BotPhraseManager::Initialize(const char *filename, int bankIndex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
radioEvent = event;
|
radioEvent = event;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,6 +600,13 @@ bool BotPhraseManager::Initialize(const char *filename, int bankIndex)
|
|||||||
if (!Q_stricmp(token, "End"))
|
if (!Q_stricmp(token, "End"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
Q_snprintf(filePath, sizeof(filePath), "%s%s%s", soundDir, baseDir, token);
|
||||||
|
|
||||||
|
if (Q_access(filePath, 0) != 0)
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
// found a phrase - add it to the collection
|
// found a phrase - add it to the collection
|
||||||
BotSpeakable *speak = new BotSpeakable;
|
BotSpeakable *speak = new BotSpeakable;
|
||||||
if (baseDir[0])
|
if (baseDir[0])
|
||||||
|
@ -903,6 +903,31 @@ float CBaseMonster::DamageForce(float damage)
|
|||||||
return force;
|
return force;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EXT_FUNC PlayerBlind(CBasePlayer *pPlayer, entvars_t *pevInflictor, entvars_t *pevAttacker, float fadeTime, float fadeHold, int alpha, Vector &color)
|
||||||
|
{
|
||||||
|
UTIL_ScreenFade(pPlayer, color, fadeTime, fadeHold, alpha, 0);
|
||||||
|
|
||||||
|
for (int i = 1; i <= gpGlobals->maxClients; ++i)
|
||||||
|
{
|
||||||
|
CBasePlayer *pObserver = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||||
|
|
||||||
|
if (!pObserver || !pObserver->IsObservingPlayer(pPlayer))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!fadetoblack.value)
|
||||||
|
{
|
||||||
|
UTIL_ScreenFade(pObserver, color, fadeTime, fadeHold, alpha, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pPlayer->Blind(fadeTime * 0.33, fadeHold, fadeTime, alpha);
|
||||||
|
|
||||||
|
if (TheBots != NULL)
|
||||||
|
{
|
||||||
|
TheBots->OnEvent(EVENT_PLAYER_BLINDED_BY_FLASHBANG, pPlayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType)
|
void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType)
|
||||||
{
|
{
|
||||||
CBaseEntity *pEntity = NULL;
|
CBaseEntity *pEntity = NULL;
|
||||||
@ -948,12 +973,16 @@ void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker,
|
|||||||
vecSpot = pPlayer->BodyTarget(vecSrc);
|
vecSpot = pPlayer->BodyTarget(vecSrc);
|
||||||
UTIL_TraceLine(vecSrc, vecSpot, dont_ignore_monsters, ENT(pevInflictor), &tr);
|
UTIL_TraceLine(vecSrc, vecSpot, dont_ignore_monsters, ENT(pevInflictor), &tr);
|
||||||
|
|
||||||
|
g_ReGameHookchains.m_RadiusFlash_TraceLine.callChain(NULL, pPlayer, pevInflictor, pevAttacker, vecSrc, vecSpot, &tr);
|
||||||
|
|
||||||
if (tr.flFraction != 1.0f && tr.pHit != pPlayer->pev->pContainingEntity)
|
if (tr.flFraction != 1.0f && tr.pHit != pPlayer->pev->pContainingEntity)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
#ifndef REGAMEDLL_FIXES
|
||||||
UTIL_TraceLine(vecSpot, vecSrc, dont_ignore_monsters, tr.pHit, &tr2);
|
UTIL_TraceLine(vecSpot, vecSrc, dont_ignore_monsters, tr.pHit, &tr2);
|
||||||
|
|
||||||
if (tr2.flFraction >= 1.0)
|
if (tr2.flFraction >= 1.0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (tr.fStartSolid)
|
if (tr.fStartSolid)
|
||||||
{
|
{
|
||||||
@ -1000,27 +1029,8 @@ void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UTIL_ScreenFade(pPlayer, Vector(255, 255, 255), fadeTime, fadeHold, alpha, 0);
|
Vector color(255, 255, 255);
|
||||||
|
g_ReGameHookchains.m_PlayerBlind.callChain(PlayerBlind, pPlayer, pevInflictor, pevAttacker, fadeTime, fadeHold, alpha, color);
|
||||||
for (int i = 1; i <= gpGlobals->maxClients; ++i)
|
|
||||||
{
|
|
||||||
CBasePlayer *pObserver = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
|
||||||
|
|
||||||
if (!pObserver || !pObserver->IsObservingPlayer(pPlayer))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!fadetoblack.value)
|
|
||||||
{
|
|
||||||
UTIL_ScreenFade(pObserver, Vector(255, 255, 255), fadeTime, fadeHold, alpha, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayer->Blind(fadeTime * 0.33, fadeHold, fadeTime, alpha);
|
|
||||||
|
|
||||||
if (TheBots != NULL)
|
|
||||||
{
|
|
||||||
TheBots->OnEvent(EVENT_PLAYER_BLINDED_BY_FLASHBANG, pPlayer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1030,8 +1040,6 @@ float GetAmountOfPlayerVisible(Vector vecSrc, CBaseEntity *entity)
|
|||||||
float retval = 0.0f;
|
float retval = 0.0f;
|
||||||
TraceResult tr;
|
TraceResult tr;
|
||||||
Vector spot;
|
Vector spot;
|
||||||
Vector2D dir;
|
|
||||||
Vector2D perp;
|
|
||||||
|
|
||||||
const float topOfHead = 25.0f;
|
const float topOfHead = 25.0f;
|
||||||
const float standFeet = 34.0f;
|
const float standFeet = 34.0f;
|
||||||
@ -1070,11 +1078,10 @@ float GetAmountOfPlayerVisible(Vector vecSrc, CBaseEntity *entity)
|
|||||||
if (tr.flFraction == 1.0f)
|
if (tr.flFraction == 1.0f)
|
||||||
retval += 0.2f;
|
retval += 0.2f;
|
||||||
|
|
||||||
dir = (entity->pev->origin - vecSrc).Make2D();
|
Vector2D dir = (entity->pev->origin - vecSrc).Make2D();
|
||||||
dir.NormalizeInPlace();
|
dir.NormalizeInPlace();
|
||||||
|
|
||||||
perp.x = -dir.y * edgeOffset;
|
Vector2D perp(-dir.y * edgeOffset, dir.x * edgeOffset);
|
||||||
perp.y = dir.x * edgeOffset;
|
|
||||||
|
|
||||||
spot = entity->pev->origin + Vector(perp.x, perp.y, 0);
|
spot = entity->pev->origin + Vector(perp.x, perp.y, 0);
|
||||||
|
|
||||||
@ -1138,7 +1145,16 @@ void RadiusDamage(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker
|
|||||||
damageRatio = GetAmountOfPlayerVisible(vecSrc, pEntity);
|
damageRatio = GetAmountOfPlayerVisible(vecSrc, pEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
float length = (vecSrc - pEntity->pev->origin).Length();
|
damageRatio = GetAmountOfPlayerVisible(vecSrc, pEntity);
|
||||||
|
|
||||||
|
float length;
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
// allow to damage breakable objects
|
||||||
|
if (FClassnameIs(pEntity->pev, "func_breakable"))
|
||||||
|
length = (vecSrc - pEntity->Center()).Length();
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
length = (vecSrc - pEntity->pev->origin).Length();
|
||||||
|
|
||||||
if (useLOS)
|
if (useLOS)
|
||||||
{
|
{
|
||||||
@ -1151,12 +1167,28 @@ void RadiusDamage(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker
|
|||||||
flAdjustedDamage = (flRadius - length) * (flRadius - length) * 1.25 / (flRadius * flRadius) * (damageRatio * flDamage) * 1.5;
|
flAdjustedDamage = (flRadius - length) * (flRadius - length) * 1.25 / (flRadius * flRadius) * (damageRatio * flDamage) * 1.5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
flAdjustedDamage = flDamage - length * falloff;
|
flAdjustedDamage = flDamage - length * falloff;
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
// disable grenade damage through walls?
|
||||||
|
if (hegrenade_penetration.string[0] == '1' && (bitsDamageType & DMG_EXPLOSION))
|
||||||
|
{
|
||||||
|
UTIL_TraceLine(vecSrc, pEntity->pev->origin, ignore_monsters, NULL, &tr);
|
||||||
|
|
||||||
|
if (tr.flFraction != 1.0f)
|
||||||
|
flAdjustedDamage = 0.0f;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (flAdjustedDamage < 0)
|
if (flAdjustedDamage < 0)
|
||||||
flAdjustedDamage = 0;
|
flAdjustedDamage = 0;
|
||||||
|
|
||||||
pEntity->TakeDamage(pevInflictor, pevAttacker, flAdjustedDamage, bitsDamageType);
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (flAdjustedDamage > 0)
|
||||||
|
#endif
|
||||||
|
pEntity->TakeDamage(pevInflictor, pevAttacker, flAdjustedDamage, bitsDamageType);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,9 +95,11 @@ cvar_t sk_scientist_heal3 = { "sk_scientist_heal3", "0", 0, 0.0f, NULL };
|
|||||||
|
|
||||||
#ifdef REGAMEDLL_ADD
|
#ifdef REGAMEDLL_ADD
|
||||||
|
|
||||||
cvar_t game_version = { "game_version", APP_VERSION_STRD, FCVAR_SERVER, 0.0f, NULL };
|
cvar_t game_version = { "game_version", APP_VERSION_STRD, FCVAR_SERVER, 0.0f, nullptr };
|
||||||
cvar_t maxmoney = { "mp_maxmoney", "16000", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t maxmoney = { "mp_maxmoney", "16000", FCVAR_SERVER, 0.0f, nullptr };
|
||||||
cvar_t round_infinite = { "mp_round_infinite", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t round_infinite = { "mp_round_infinite", "0", FCVAR_SERVER, 0.0f, nullptr };
|
||||||
|
cvar_t hegrenade_penetration = { "mp_hegrenade_penetration", "0", 0, 0.0f, nullptr };
|
||||||
|
cvar_t nadedrops = { "mp_nadedrops", "0", 0, 0.0f, nullptr };
|
||||||
|
|
||||||
void GameDLL_Version_f()
|
void GameDLL_Version_f()
|
||||||
{
|
{
|
||||||
@ -222,6 +224,8 @@ void EXT_FUNC GameDLLInit()
|
|||||||
CVAR_REGISTER(&game_version);
|
CVAR_REGISTER(&game_version);
|
||||||
CVAR_REGISTER(&maxmoney);
|
CVAR_REGISTER(&maxmoney);
|
||||||
CVAR_REGISTER(&round_infinite);
|
CVAR_REGISTER(&round_infinite);
|
||||||
|
CVAR_REGISTER(&hegrenade_penetration);
|
||||||
|
CVAR_REGISTER(&nadedrops);
|
||||||
|
|
||||||
// print version
|
// print version
|
||||||
CONSOLE_ECHO("ReGameDLL build: " __TIME__ " " __DATE__ " (" APP_VERSION_STRD ")\n");
|
CONSOLE_ECHO("ReGameDLL build: " __TIME__ " " __DATE__ " (" APP_VERSION_STRD ")\n");
|
||||||
|
@ -135,6 +135,8 @@ extern cvar_t sk_scientist_heal3;
|
|||||||
|
|
||||||
extern cvar_t maxmoney;
|
extern cvar_t maxmoney;
|
||||||
extern cvar_t round_infinite;
|
extern cvar_t round_infinite;
|
||||||
|
extern cvar_t hegrenade_penetration;
|
||||||
|
extern cvar_t nadedrops;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
LINK_HOOK_CHAIN(int, GetForceCamera, (CBasePlayer *pObserver), pObserver);
|
LINK_HOOK_CHAIN(int, GetForceCamera, (CBasePlayer *pObserver), pObserver);
|
||||||
|
|
||||||
int GetForceCamera_internal(CBasePlayer *pObserver)
|
int __API_HOOK(GetForceCamera)(CBasePlayer *pObserver)
|
||||||
{
|
{
|
||||||
int retVal;
|
int retVal;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#define CAMERA_MODE_SPEC_ONLY_FRIST_PERSON 2
|
#define CAMERA_MODE_SPEC_ONLY_FRIST_PERSON 2
|
||||||
|
|
||||||
int GetForceCamera(CBasePlayer *pObserver);
|
int GetForceCamera(CBasePlayer *pObserver);
|
||||||
int GetForceCamera_internal(CBasePlayer *pObserver);
|
int GetForceCamera_(CBasePlayer *pObserver);
|
||||||
void UpdateClientEffects(CBasePlayer *pObserver, int oldMode);
|
void UpdateClientEffects(CBasePlayer *pObserver, int oldMode);
|
||||||
|
|
||||||
#endif // OBSERVER_H
|
#endif // OBSERVER_H
|
||||||
|
@ -706,7 +706,7 @@ bool CBasePlayer::IsHittingShield(Vector &vecDirection, TraceResult *ptr)
|
|||||||
|
|
||||||
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, TraceAttack, (entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType), pevAttacker, flDamage, vecDir, ptr, bitsDamageType);
|
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, TraceAttack, (entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType), pevAttacker, flDamage, vecDir, ptr, bitsDamageType);
|
||||||
|
|
||||||
void CBasePlayer::__API_VHOOK(TraceAttack)(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType)
|
void CBasePlayer::__API_VHOOK(TraceAttack)(entvars_t *pevAttacker, float flDamage, VectorRef vecDir, TraceResult *ptr, int bitsDamageType)
|
||||||
{
|
{
|
||||||
bool bShouldBleed = true;
|
bool bShouldBleed = true;
|
||||||
bool bShouldSpark = false;
|
bool bShouldSpark = false;
|
||||||
@ -1348,7 +1348,7 @@ void packPlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo)
|
|||||||
pWeaponBox->pev->angles.x = 0;
|
pWeaponBox->pev->angles.x = 0;
|
||||||
pWeaponBox->pev->angles.z = 0;
|
pWeaponBox->pev->angles.z = 0;
|
||||||
|
|
||||||
pWeaponBox->pev->velocity = pPlayer->pev->velocity * 0.75;
|
pWeaponBox->pev->velocity = pPlayer->pev->velocity * 0.75f;
|
||||||
|
|
||||||
pWeaponBox->SetThink(&CWeaponBox::Kill);
|
pWeaponBox->SetThink(&CWeaponBox::Kill);
|
||||||
pWeaponBox->pev->nextthink = gpGlobals->time + 300.0f;
|
pWeaponBox->pev->nextthink = gpGlobals->time + 300.0f;
|
||||||
@ -1362,6 +1362,55 @@ void packPlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
void packPlayerNade(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo)
|
||||||
|
{
|
||||||
|
if (pItem == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const char *modelName = GetCSModelName(pItem->m_iId);
|
||||||
|
if (modelName != NULL)
|
||||||
|
{
|
||||||
|
float flOffset = 0.0f;
|
||||||
|
switch (pItem->m_iId)
|
||||||
|
{
|
||||||
|
case WEAPON_HEGRENADE:
|
||||||
|
flOffset = 14.0f;
|
||||||
|
break;
|
||||||
|
case WEAPON_FLASHBANG:
|
||||||
|
flOffset = 0.0f;
|
||||||
|
break;
|
||||||
|
case WEAPON_SMOKEGRENADE:
|
||||||
|
flOffset = -14.0f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector vecAngles = pPlayer->pev->angles;
|
||||||
|
Vector dir(Q_cos(vecAngles.y) * flOffset, Q_sin(vecAngles.y) * flOffset, 0.0f);
|
||||||
|
|
||||||
|
vecAngles.x = 0.0f;
|
||||||
|
vecAngles.y += 45.0f;
|
||||||
|
|
||||||
|
CWeaponBox *pWeaponBox = (CWeaponBox *)CBaseEntity::Create("weaponbox", pPlayer->pev->origin + dir, vecAngles, ENT(pPlayer->pev));
|
||||||
|
|
||||||
|
pWeaponBox->pev->angles.x = 0;
|
||||||
|
pWeaponBox->pev->angles.z = 0;
|
||||||
|
|
||||||
|
pWeaponBox->pev->velocity = pPlayer->pev->velocity * 0.75f;
|
||||||
|
|
||||||
|
pWeaponBox->SetThink(&CWeaponBox::Kill);
|
||||||
|
pWeaponBox->pev->nextthink = gpGlobals->time + 300.0f;
|
||||||
|
pWeaponBox->PackWeapon(pItem);
|
||||||
|
|
||||||
|
if (packAmmo)
|
||||||
|
{
|
||||||
|
pWeaponBox->PackAmmo(MAKE_STRING(IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]);
|
||||||
|
}
|
||||||
|
SET_MODEL(ENT(pWeaponBox->pev), modelName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CBasePlayer::PackDeadPlayerItems()
|
void CBasePlayer::PackDeadPlayerItems()
|
||||||
{
|
{
|
||||||
bool bPackGun = (g_pGameRules->DeadPlayerWeapons(this) != GR_PLR_DROP_GUN_NO);
|
bool bPackGun = (g_pGameRules->DeadPlayerWeapons(this) != GR_PLR_DROP_GUN_NO);
|
||||||
@ -1379,7 +1428,7 @@ void CBasePlayer::PackDeadPlayerItems()
|
|||||||
int nBestWeight = 0;
|
int nBestWeight = 0;
|
||||||
CBasePlayerItem *pBestItem = NULL;
|
CBasePlayerItem *pBestItem = NULL;
|
||||||
|
|
||||||
for (int n = 0; n < MAX_ITEM_TYPES; n++)
|
for (int n = 0; n < MAX_ITEM_TYPES; ++n)
|
||||||
{
|
{
|
||||||
CBasePlayerItem *pPlayerItem = m_rgpPlayerItems[ n ];
|
CBasePlayerItem *pPlayerItem = m_rgpPlayerItems[ n ];
|
||||||
|
|
||||||
@ -1398,19 +1447,47 @@ void CBasePlayer::PackDeadPlayerItems()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// drop a grenade after death
|
// drop a grenade after death
|
||||||
else if (pPlayerItem->iItemSlot() == GRENADE_SLOT && g_bIsCzeroGame)
|
else if (pPlayerItem->iItemSlot() == GRENADE_SLOT)
|
||||||
packPlayerItem(this, pPlayerItem, true);
|
{
|
||||||
|
if (g_bIsCzeroGame)
|
||||||
|
packPlayerItem(this, pPlayerItem, true);
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch ((int)nadedrops.value)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
packPlayerItem(this, pPlayerItem, true);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
CBasePlayerItem *pNade = pPlayerItem;
|
||||||
|
while (pNade != nullptr)
|
||||||
|
{
|
||||||
|
CBasePlayerItem *pTemp = pNade->m_pNext;
|
||||||
|
packPlayerNade(this, pNade, true);
|
||||||
|
pNade = pTemp;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
pPlayerItem = pPlayerItem->m_pNext;
|
pPlayerItem = pPlayerItem->m_pNext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
packPlayerItem(this, pBestItem, bPackAmmo);
|
packPlayerItem(this, pBestItem, bPackAmmo);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveAllItems(TRUE);
|
RemoveAllItems(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBasePlayer::GiveDefaultItems()
|
LINK_HOOK_CLASS_VOID_CHAIN2(CBasePlayer, GiveDefaultItems);
|
||||||
|
|
||||||
|
void CBasePlayer::__API_HOOK(GiveDefaultItems)()
|
||||||
{
|
{
|
||||||
RemoveAllItems(FALSE);
|
RemoveAllItems(FALSE);
|
||||||
m_bHasPrimary = false;
|
m_bHasPrimary = false;
|
||||||
@ -2113,7 +2190,9 @@ BOOL CBasePlayer::IsBombGuy()
|
|||||||
return m_bHasC4;
|
return m_bHasC4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBasePlayer::SetAnimation(PLAYER_ANIM playerAnim)
|
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, SetAnimation, (PLAYER_ANIM playerAnim), playerAnim);
|
||||||
|
|
||||||
|
void CBasePlayer::__API_HOOK(SetAnimation)(PLAYER_ANIM playerAnim)
|
||||||
{
|
{
|
||||||
int animDesired;
|
int animDesired;
|
||||||
float speed;
|
float speed;
|
||||||
@ -2870,7 +2949,9 @@ void CWShield::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBasePlayer::GiveShield(bool bDeploy)
|
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, GiveShield, (bool bDeploy), bDeploy);
|
||||||
|
|
||||||
|
void CBasePlayer::__API_HOOK(GiveShield)(bool bDeploy)
|
||||||
{
|
{
|
||||||
m_bOwnsShield = true;
|
m_bOwnsShield = true;
|
||||||
m_bHasPrimary = true;
|
m_bHasPrimary = true;
|
||||||
@ -2983,7 +3064,9 @@ NOXREF void CBasePlayer::ThrowPrimary()
|
|||||||
DropShield();
|
DropShield();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBasePlayer::AddAccount(int amount, bool bTrackChange)
|
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, AddAccount, (int amount, bool bTrackChange), amount, bTrackChange);
|
||||||
|
|
||||||
|
void CBasePlayer::__API_HOOK(AddAccount)(int amount, bool bTrackChange)
|
||||||
{
|
{
|
||||||
m_iAccount += amount;
|
m_iAccount += amount;
|
||||||
|
|
||||||
@ -5714,7 +5797,9 @@ void CBloodSplat::Spray()
|
|||||||
pev->nextthink = gpGlobals->time + 0.1f;
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBasePlayer::GiveNamedItem(const char *pszName)
|
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, GiveNamedItem, (const char *pszName), pszName);
|
||||||
|
|
||||||
|
void CBasePlayer::__API_HOOK(GiveNamedItem)(const char *pszName)
|
||||||
{
|
{
|
||||||
string_t istr = MAKE_STRING(pszName);
|
string_t istr = MAKE_STRING(pszName);
|
||||||
edict_t *pent = CREATE_NAMED_ENTITY(istr);
|
edict_t *pent = CREATE_NAMED_ENTITY(istr);
|
||||||
@ -6764,7 +6849,7 @@ void CBasePlayer::__API_VHOOK(UpdateClientData)()
|
|||||||
m_tmNextRadarUpdate = gpGlobals->time + 1.0f;
|
m_tmNextRadarUpdate = gpGlobals->time + 1.0f;
|
||||||
|
|
||||||
#ifdef REGAMEDLL_ADD
|
#ifdef REGAMEDLL_ADD
|
||||||
if (friendlyfire.string[0] == '2')
|
if (CSGameRules()->IsFriendlyFireAttack())
|
||||||
vecOrigin = g_vecZero;
|
vecOrigin = g_vecZero;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -371,12 +371,14 @@ public:
|
|||||||
virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha);
|
virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha);
|
||||||
virtual void OnTouchingWeapon(CWeaponBox *pWeapon) { }
|
virtual void OnTouchingWeapon(CWeaponBox *pWeapon) { }
|
||||||
|
|
||||||
#ifdef REGAMEDLL_API
|
#if defined(REGAMEDLL_API) || defined(HOOK_GAMEDLL)
|
||||||
void Spawn_();
|
void Spawn_();
|
||||||
void Precache_();
|
void Precache_();
|
||||||
int ObjectCaps_();
|
int ObjectCaps_();
|
||||||
int Classify_();
|
int Classify_();
|
||||||
void TraceAttack_(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
int Save_(CSave &save);
|
||||||
|
int Restore_(CRestore &restore);
|
||||||
|
void TraceAttack_(entvars_t *pevAttacker, float flDamage, VectorRef vecDir, TraceResult *ptr, int bitsDamageType);
|
||||||
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
int TakeHealth_(float flHealth, int bitsDamageType);
|
int TakeHealth_(float flHealth, int bitsDamageType);
|
||||||
void Killed_(entvars_t *pevAttacker, int iGib);
|
void Killed_(entvars_t *pevAttacker, int iGib);
|
||||||
@ -394,11 +396,6 @@ public:
|
|||||||
void ImpulseCommands_();
|
void ImpulseCommands_();
|
||||||
void RoundRespawn_();
|
void RoundRespawn_();
|
||||||
void Blind_(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha);
|
void Blind_(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha);
|
||||||
#endif // REGAMEDLL_API
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
int Save_(CSave &save);
|
|
||||||
int Restore_(CRestore &restore);
|
|
||||||
const char *TeamID_();
|
const char *TeamID_();
|
||||||
BOOL FBecomeProne_();
|
BOOL FBecomeProne_();
|
||||||
int Illumination_();
|
int Illumination_();
|
||||||
@ -424,6 +421,7 @@ public:
|
|||||||
void ThrowWeapon(char *pszItemName);
|
void ThrowWeapon(char *pszItemName);
|
||||||
void ThrowPrimary();
|
void ThrowPrimary();
|
||||||
void AddAccount(int amount, bool bTrackChange = true);
|
void AddAccount(int amount, bool bTrackChange = true);
|
||||||
|
void AddAccount_(int amount, bool bTrackChange = true);
|
||||||
void Disappear();
|
void Disappear();
|
||||||
void MakeVIP();
|
void MakeVIP();
|
||||||
bool CanPlayerBuy(bool display = false);
|
bool CanPlayerBuy(bool display = false);
|
||||||
@ -437,6 +435,7 @@ public:
|
|||||||
void RenewItems();
|
void RenewItems();
|
||||||
void PackDeadPlayerItems();
|
void PackDeadPlayerItems();
|
||||||
void GiveDefaultItems();
|
void GiveDefaultItems();
|
||||||
|
void GiveDefaultItems_();
|
||||||
void RemoveAllItems(BOOL removeSuit);
|
void RemoveAllItems(BOOL removeSuit);
|
||||||
void SetBombIcon(BOOL bFlash = FALSE);
|
void SetBombIcon(BOOL bFlash = FALSE);
|
||||||
void SetProgressBarTime(int time);
|
void SetProgressBarTime(int time);
|
||||||
@ -463,6 +462,7 @@ public:
|
|||||||
void UpdatePlayerSound();
|
void UpdatePlayerSound();
|
||||||
void DeathSound();
|
void DeathSound();
|
||||||
void SetAnimation(PLAYER_ANIM playerAnim);
|
void SetAnimation(PLAYER_ANIM playerAnim);
|
||||||
|
void SetAnimation_(PLAYER_ANIM playerAnim);
|
||||||
void SetWeaponAnimType(const char *szExtention) { Q_strcpy(m_szAnimExtention, szExtention); }
|
void SetWeaponAnimType(const char *szExtention) { Q_strcpy(m_szAnimExtention, szExtention); }
|
||||||
void CheatImpulseCommands(int iImpulse);
|
void CheatImpulseCommands(int iImpulse);
|
||||||
void StartDeathCam();
|
void StartDeathCam();
|
||||||
@ -479,6 +479,7 @@ public:
|
|||||||
void ItemPreFrame();
|
void ItemPreFrame();
|
||||||
void ItemPostFrame();
|
void ItemPostFrame();
|
||||||
void GiveNamedItem(const char *pszName);
|
void GiveNamedItem(const char *pszName);
|
||||||
|
void GiveNamedItem_(const char *pszName);
|
||||||
void EnableControl(BOOL fControl);
|
void EnableControl(BOOL fControl);
|
||||||
bool HintMessage(const char *pMessage, BOOL bDisplayIfPlayerDead = FALSE, BOOL bOverride = FALSE);
|
bool HintMessage(const char *pMessage, BOOL bDisplayIfPlayerDead = FALSE, BOOL bOverride = FALSE);
|
||||||
void SendAmmoUpdate();
|
void SendAmmoUpdate();
|
||||||
@ -526,6 +527,7 @@ public:
|
|||||||
void RemoveShield();
|
void RemoveShield();
|
||||||
void DropShield(bool bDeploy = true);
|
void DropShield(bool bDeploy = true);
|
||||||
void GiveShield(bool bDeploy = true);
|
void GiveShield(bool bDeploy = true);
|
||||||
|
void GiveShield_(bool bDeploy = true);
|
||||||
bool IsHittingShield(Vector &vecDirection, TraceResult *ptr);
|
bool IsHittingShield(Vector &vecDirection, TraceResult *ptr);
|
||||||
bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot);
|
bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot);
|
||||||
bool IsReloading()
|
bool IsReloading()
|
||||||
|
@ -1816,6 +1816,11 @@ void CWeaponBox::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
|
|||||||
{
|
{
|
||||||
if (!FStringNull(m_rgiszAmmo[n]))
|
if (!FStringNull(m_rgiszAmmo[n]))
|
||||||
{
|
{
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (m_rgAmmo[n] < MaxAmmoCarry(m_rgiszAmmo[n]))
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
// there's some ammo of this type.
|
// there's some ammo of this type.
|
||||||
pPlayer->GiveAmmo(m_rgAmmo[n], (char *)STRING(m_rgiszAmmo[n]), MaxAmmoCarry(m_rgiszAmmo[n]));
|
pPlayer->GiveAmmo(m_rgAmmo[n], (char *)STRING(m_rgiszAmmo[n]), MaxAmmoCarry(m_rgiszAmmo[n]));
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ typedef struct incomingtransfer_s
|
|||||||
#define Q_alloca alloca
|
#define Q_alloca alloca
|
||||||
#define Q_free free
|
#define Q_free free
|
||||||
|
|
||||||
|
#define Q_access _access
|
||||||
#define Q_close _close
|
#define Q_close _close
|
||||||
#define Q_write _write
|
#define Q_write _write
|
||||||
#define Q_memset memset
|
#define Q_memset memset
|
||||||
|
@ -429,6 +429,7 @@ void CNavArea::Load(SteamFile *file, unsigned int version)
|
|||||||
file->Read(&pos, sizeof(float));
|
file->Read(&pos, sizeof(float));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6093,7 +6093,7 @@ AddressRef g_DataRefs[] =
|
|||||||
{ 0x01E23470, "cv_tutor_hint_interval_time", (size_t)&pcv_tutor_hint_interval_time },
|
{ 0x01E23470, "cv_tutor_hint_interval_time", (size_t)&pcv_tutor_hint_interval_time },
|
||||||
{ 0x01E11EE4, "cv_hostage_debug", (size_t)&pcv_hostage_debug },
|
{ 0x01E11EE4, "cv_hostage_debug", (size_t)&pcv_hostage_debug },
|
||||||
{ 0x01E11EF8, "cv_hostage_stop", (size_t)&pcv_hostage_stop },
|
{ 0x01E11EF8, "cv_hostage_stop", (size_t)&pcv_hostage_stop },
|
||||||
//{ 0x0, "_ZL14placeDirectory", (size_t)&pplaceDirectory }, // DONT USE - NOXREF
|
//{ 0x01E2A228, "_ZL14placeDirectory", (size_t)&pplaceDirectory }, // DONT USE - NOXREF
|
||||||
{ 0x01E2A0E4, "TheNavLadderList", (size_t)&pTheNavLadderList },
|
{ 0x01E2A0E4, "TheNavLadderList", (size_t)&pTheNavLadderList },
|
||||||
{ 0x01E2A0F0, "TheHidingSpotList", (size_t)&pTheHidingSpotList },
|
{ 0x01E2A0F0, "TheHidingSpotList", (size_t)&pTheHidingSpotList },
|
||||||
{ 0x01E14C5C, "sPlayerModelFiles", (size_t)&psPlayerModelFiles },
|
{ 0x01E14C5C, "sPlayerModelFiles", (size_t)&psPlayerModelFiles },
|
||||||
|
@ -1288,6 +1288,7 @@ void CGunTarget::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
|
|||||||
void CBasePlayer::Spawn() { Spawn_(); }
|
void CBasePlayer::Spawn() { Spawn_(); }
|
||||||
void CBasePlayer::Precache() { Precache_(); }
|
void CBasePlayer::Precache() { Precache_(); }
|
||||||
int CBasePlayer::Save(CSave &save) { return Save_(save); }
|
int CBasePlayer::Save(CSave &save) { return Save_(save); }
|
||||||
|
int CBasePlayer::ObjectCaps() { return ObjectCaps_(); }
|
||||||
int CBasePlayer::Restore(CRestore &restore) { return Restore_(restore); }
|
int CBasePlayer::Restore(CRestore &restore) { return Restore_(restore); }
|
||||||
int CBasePlayer::Classify() { return Classify_(); }
|
int CBasePlayer::Classify() { return Classify_(); }
|
||||||
void CBasePlayer::TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { TraceAttack_(pevAttacker, flDamage, vecDir, ptr, bitsDamageType); }
|
void CBasePlayer::TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { TraceAttack_(pevAttacker, flDamage, vecDir, ptr, bitsDamageType); }
|
||||||
|
@ -63,6 +63,8 @@ class CGraph;
|
|||||||
class CRestore;
|
class CRestore;
|
||||||
class CSaveRestoreBuffer;
|
class CSaveRestoreBuffer;
|
||||||
|
|
||||||
|
typedef Vector VectorRef;
|
||||||
|
|
||||||
#define __API_HOOK(fname)\
|
#define __API_HOOK(fname)\
|
||||||
fname
|
fname
|
||||||
|
|
||||||
@ -78,9 +80,10 @@ class CSaveRestoreBuffer;
|
|||||||
#define IMPL_CLASS(baseClass,var)\
|
#define IMPL_CLASS(baseClass,var)\
|
||||||
(*baseClass::p##var)
|
(*baseClass::p##var)
|
||||||
|
|
||||||
#define LINK_CLASS_HOOK_VOID_CHAIN(...)
|
#define LINK_HOOK_CLASS_VOID_CHAIN(...)
|
||||||
#define LINK_CLASS_HOOK_CHAIN(...)
|
#define LINK_HOOK_CLASS_VOID_CHAIN2(...)
|
||||||
#define LINK_CLASS_HOOK_API_CHAIN(...)
|
#define LINK_HOOK_CLASS_CHAIN(...)
|
||||||
|
#define LINK_HOOK_CLASS_CHAIN2(...)
|
||||||
#define LINK_HOOK_VOID_CHAIN(...)
|
#define LINK_HOOK_VOID_CHAIN(...)
|
||||||
#define LINK_HOOK_CHAIN(...)
|
#define LINK_HOOK_CHAIN(...)
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
#include <xstddef>
|
#include <xstddef>
|
||||||
|
|
||||||
|
#pragma warning(disable : 4348)
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma pack(push, 8)
|
#pragma pack(push, 8)
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
return (*this); }
|
return (*this); }
|
||||||
void reserve(size_type _N)
|
void reserve(size_type _N)
|
||||||
{if (capacity() < _N)
|
{if (capacity() < _N)
|
||||||
{iterator_ _S = allocator.allocate(_N, (void *)0);
|
{iterator _S = allocator.allocate(_N, (void *)0);
|
||||||
_Ucopy(_First, _Last, _S);
|
_Ucopy(_First, _Last, _S);
|
||||||
__Destroy(_First, _Last);
|
__Destroy(_First, _Last);
|
||||||
allocator.deallocate(_First, _End - _First);
|
allocator.deallocate(_First, _End - _First);
|
||||||
|
@ -51,8 +51,8 @@ typedef IHookChain<int> IReGameHook_CBasePlayer_Classify;
|
|||||||
typedef IHookChainRegistryClass<int, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Classify;
|
typedef IHookChainRegistryClass<int, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Classify;
|
||||||
|
|
||||||
// CBasePlayer::TraceAttack hook
|
// CBasePlayer::TraceAttack hook
|
||||||
typedef IVoidHookChain<struct entvars_s *, float, Vector, struct TraceResult *, int> IReGameHook_CBasePlayer_TraceAttack;
|
typedef IVoidHookChain<struct entvars_s *, float, Vector &, struct TraceResult *, int> IReGameHook_CBasePlayer_TraceAttack;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, struct entvars_s *, float, Vector, struct TraceResult *, int> IReGameHookRegistry_CBasePlayer_TraceAttack;
|
typedef IVoidHookChainRegistryClass<class CBasePlayer, struct entvars_s *, float, Vector &, struct TraceResult *, int> IReGameHookRegistry_CBasePlayer_TraceAttack;
|
||||||
|
|
||||||
// CBasePlayer::TakeDamage hook
|
// CBasePlayer::TakeDamage hook
|
||||||
typedef IHookChain<int, struct entvars_s *, struct entvars_s *, float, int> IReGameHook_CBasePlayer_TakeDamage;
|
typedef IHookChain<int, struct entvars_s *, struct entvars_s *, float, int> IReGameHook_CBasePlayer_TakeDamage;
|
||||||
@ -123,20 +123,50 @@ typedef IVoidHookChain<float, float, float, int> IReGameHook_CBasePlayer_Blind;
|
|||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
typedef IVoidHookChainRegistryClass<class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
||||||
|
|
||||||
|
|
||||||
|
// CBasePlayer::Observer_IsValidTarget hook
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Observer_IsValidTarget hook
|
|
||||||
typedef IHookChain<class CBaseEntity *, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
typedef IHookChain<class CBaseEntity *, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
||||||
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
||||||
|
|
||||||
|
// CBasePlayer::SetAnimation hook
|
||||||
|
typedef IVoidHookChain<PLAYER_ANIM> IReGameHook_CBasePlayer_SetAnimation;
|
||||||
|
typedef IVoidHookChainRegistryClass<class CBasePlayer, PLAYER_ANIM> IReGameHookRegistry_CBasePlayer_SetAnimation;
|
||||||
|
|
||||||
|
// CBasePlayer::GiveDefaultItems hook
|
||||||
|
typedef IVoidHookChain<> IReGameHook_CBasePlayer_GiveDefaultItems;
|
||||||
|
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_GiveDefaultItems;
|
||||||
|
|
||||||
|
// CBasePlayer::GiveNamedItem hook
|
||||||
|
typedef IVoidHookChain<const char *> IReGameHook_CBasePlayer_GiveNamedItem;
|
||||||
|
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_GiveNamedItem;
|
||||||
|
|
||||||
|
// CBasePlayer::AddAccount hook
|
||||||
|
typedef IVoidHookChain<int, bool> IReGameHook_CBasePlayer_AddAccount;
|
||||||
|
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_AddAccount;
|
||||||
|
|
||||||
|
// CBasePlayer::GiveShield hook
|
||||||
|
typedef IVoidHookChain<bool> IReGameHook_CBasePlayer_GiveShield;
|
||||||
|
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_GiveShield;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// GetForceCamera hook
|
// GetForceCamera hook
|
||||||
typedef IHookChain<int, class CBasePlayer *> IReGameHook_GetForceCamera;
|
typedef IHookChain<int, class CBasePlayer *> IReGameHook_GetForceCamera;
|
||||||
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_GetForceCamera;
|
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_GetForceCamera;
|
||||||
|
|
||||||
|
// PlayerBlind hook
|
||||||
|
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHook_PlayerBlind;
|
||||||
|
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHookRegistry_PlayerBlind;
|
||||||
|
|
||||||
|
// RadiusFlash_TraceLine hook
|
||||||
|
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, struct TraceResult *> IReGameHook_RadiusFlash_TraceLine;
|
||||||
|
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, struct TraceResult *> IReGameHookRegistry_RadiusFlash_TraceLine;
|
||||||
|
|
||||||
class IReGameHookchains {
|
class IReGameHookchains {
|
||||||
public:
|
public:
|
||||||
virtual ~IReGameHookchains() {}
|
virtual ~IReGameHookchains() {}
|
||||||
@ -164,13 +194,18 @@ public:
|
|||||||
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn* CBasePlayer_RoundRespawn() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn* CBasePlayer_RoundRespawn() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Blind* CBasePlayer_Blind() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Blind* CBasePlayer_Blind() = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CBasePlayer_Observer_IsValidTarget() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CBasePlayer_Observer_IsValidTarget() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_SetAnimation* CBasePlayer_SetAnimation() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_GiveDefaultItems* CBasePlayer_GiveDefaultItems() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_GiveNamedItem* CBasePlayer_GiveNamedItem() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_AddAccount* CBasePlayer_AddAccount() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_GiveShield* CBasePlayer_GiveShield() = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera() = 0;
|
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera() = 0;
|
||||||
|
virtual IReGameHookRegistry_PlayerBlind* PlayerBlind() = 0;
|
||||||
|
virtual IReGameHookRegistry_RadiusFlash_TraceLine* RadiusFlash_TraceLine() = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -181,6 +216,8 @@ struct ReGameFuncs_t {
|
|||||||
class ICSPlayer *(*INDEX_TO_CSPLAYER)(int iPlayerIndex);
|
class ICSPlayer *(*INDEX_TO_CSPLAYER)(int iPlayerIndex);
|
||||||
class ICSEntity *(*INDEX_TO_CSENTITY)(int iEntityIndex);
|
class ICSEntity *(*INDEX_TO_CSENTITY)(int iEntityIndex);
|
||||||
struct edict_s *(*CREATE_NAMED_ENTITY2)(string_t iClass);
|
struct edict_s *(*CREATE_NAMED_ENTITY2)(string_t iClass);
|
||||||
|
|
||||||
|
void (*CopyString)(char *dest, const char *source);
|
||||||
};
|
};
|
||||||
|
|
||||||
class IReGameApi {
|
class IReGameApi {
|
||||||
|
@ -293,6 +293,12 @@ public:
|
|||||||
virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) = 0;
|
virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) = 0;
|
||||||
public:
|
public:
|
||||||
virtual bool IsConnected() const = 0;
|
virtual bool IsConnected() const = 0;
|
||||||
|
|
||||||
|
virtual void SetAnimation(PLAYER_ANIM playerAnim) = 0;
|
||||||
|
virtual void AddAccount(int amount, bool bTrackChange = true) = 0;
|
||||||
|
virtual void GiveNamedItem(const char *pszName) = 0;
|
||||||
|
virtual void GiveDefaultItems() = 0;
|
||||||
|
virtual void GiveShield(bool bDeploy = true) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IAPI_Bot: public virtual ICSPlayer {
|
class IAPI_Bot: public virtual ICSPlayer {
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
// declared virtual function's and globals for hooks
|
// declared virtual function's and globals for hooks
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
#include "hooker_impl.h"
|
#include "hooker_impl.h"
|
||||||
|
#else
|
||||||
|
typedef Vector& VectorRef;
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#include "h_export.h"
|
#include "h_export.h"
|
||||||
|
@ -37,6 +37,8 @@ ReGameFuncs_t g_ReGameApiFuncs = {
|
|||||||
&INDEX_TO_CSPLAYER,
|
&INDEX_TO_CSPLAYER,
|
||||||
&INDEX_TO_CSENTITY,
|
&INDEX_TO_CSENTITY,
|
||||||
&CREATE_NAMED_ENTITY,
|
&CREATE_NAMED_ENTITY,
|
||||||
|
|
||||||
|
&Regamedll_CopyString_api,
|
||||||
};
|
};
|
||||||
|
|
||||||
IReGameHookRegistry_CBasePlayer_Spawn* CReGameHookchains::CBasePlayer_Spawn() { return &m_CBasePlayer_Spawn; }
|
IReGameHookRegistry_CBasePlayer_Spawn* CReGameHookchains::CBasePlayer_Spawn() { return &m_CBasePlayer_Spawn; }
|
||||||
@ -62,10 +64,17 @@ IReGameHookRegistry_CBasePlayer_ImpulseCommands* CReGameHookchains::CBasePlayer_
|
|||||||
IReGameHookRegistry_CBasePlayer_RoundRespawn* CReGameHookchains::CBasePlayer_RoundRespawn() { return &m_CBasePlayer_RoundRespawn; }
|
IReGameHookRegistry_CBasePlayer_RoundRespawn* CReGameHookchains::CBasePlayer_RoundRespawn() { return &m_CBasePlayer_RoundRespawn; }
|
||||||
IReGameHookRegistry_CBasePlayer_Blind* CReGameHookchains::CBasePlayer_Blind() { return &m_CBasePlayer_Blind; }
|
IReGameHookRegistry_CBasePlayer_Blind* CReGameHookchains::CBasePlayer_Blind() { return &m_CBasePlayer_Blind; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CReGameHookchains::CBasePlayer_Observer_IsValidTarget() { return &m_CBasePlayer_Observer_IsValidTarget; }
|
IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CReGameHookchains::CBasePlayer_Observer_IsValidTarget() { return &m_CBasePlayer_Observer_IsValidTarget; }
|
||||||
|
IReGameHookRegistry_CBasePlayer_SetAnimation* CReGameHookchains::CBasePlayer_SetAnimation() { return &m_CBasePlayer_SetAnimation; }
|
||||||
|
IReGameHookRegistry_CBasePlayer_GiveDefaultItems* CReGameHookchains::CBasePlayer_GiveDefaultItems() { return &m_CBasePlayer_GiveDefaultItems; }
|
||||||
|
IReGameHookRegistry_CBasePlayer_GiveNamedItem* CReGameHookchains::CBasePlayer_GiveNamedItem() { return &m_CBasePlayer_GiveNamedItem; }
|
||||||
|
IReGameHookRegistry_CBasePlayer_AddAccount* CReGameHookchains::CBasePlayer_AddAccount() { return &m_CBasePlayer_AddAccount; }
|
||||||
|
IReGameHookRegistry_CBasePlayer_GiveShield* CReGameHookchains::CBasePlayer_GiveShield() { return &m_CBasePlayer_GiveShield; }
|
||||||
|
|
||||||
|
|
||||||
IReGameHookRegistry_GetForceCamera* CReGameHookchains::GetForceCamera() { return &m_GetForceCamera; }
|
IReGameHookRegistry_GetForceCamera* CReGameHookchains::GetForceCamera() { return &m_GetForceCamera; }
|
||||||
|
IReGameHookRegistry_PlayerBlind* CReGameHookchains::PlayerBlind() { return &m_PlayerBlind; }
|
||||||
|
IReGameHookRegistry_RadiusFlash_TraceLine* CReGameHookchains::RadiusFlash_TraceLine() { return &m_RadiusFlash_TraceLine; }
|
||||||
|
|
||||||
int CReGameApi::GetMajorVersion()
|
int CReGameApi::GetMajorVersion()
|
||||||
{
|
{
|
||||||
@ -92,4 +101,15 @@ IReGameData *CReGameApi::GetGameData()
|
|||||||
return &g_ReGameData;
|
return &g_ReGameData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EXT_FUNC Regamedll_CopyString_api(char *dest, const char *source)
|
||||||
|
{
|
||||||
|
size_t len = Q_strlen(source);
|
||||||
|
if (dest == nullptr || Q_strlen(dest) != len) {
|
||||||
|
delete [] dest;
|
||||||
|
dest = new char [len + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_strcpy(dest, source);
|
||||||
|
}
|
||||||
|
|
||||||
EXPOSE_SINGLE_INTERFACE(CReGameApi, IReGameApi, VRE_GAMEDLL_API_VERSION);
|
EXPOSE_SINGLE_INTERFACE(CReGameApi, IReGameApi, VRE_GAMEDLL_API_VERSION);
|
||||||
|
@ -48,20 +48,13 @@ typedef IHookChainClassImpl<int, CBasePlayer> CRegameHook_CBasePlayer_Classify;
|
|||||||
typedef IHookChainRegistryClassImpl<int, CBasePlayer> CReGameHookRegistry_CBasePlayer_Classify;
|
typedef IHookChainRegistryClassImpl<int, CBasePlayer> CReGameHookRegistry_CBasePlayer_Classify;
|
||||||
|
|
||||||
// CBasePlayer::TraceAttack hook
|
// CBasePlayer::TraceAttack hook
|
||||||
typedef IVoidHookChainClassImpl<CBasePlayer, entvars_t *, float, Vector, TraceResult *, int> CRegameHook_CBasePlayer_TraceAttack;
|
typedef IVoidHookChainClassImpl<CBasePlayer, entvars_t *, float, Vector &, TraceResult *, int> CRegameHook_CBasePlayer_TraceAttack;
|
||||||
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, entvars_t *, float, Vector, TraceResult *, int> CReGameHookRegistry_CBasePlayer_TraceAttack;
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, entvars_t *, float, Vector &, TraceResult *, int> CReGameHookRegistry_CBasePlayer_TraceAttack;
|
||||||
|
|
||||||
// CBasePlayer::TakeDamage hook
|
// CBasePlayer::TakeDamage hook
|
||||||
typedef IHookChainClassImpl<int, CBasePlayer, entvars_t *, entvars_t *, float, int> CRegameHook_CBasePlayer_TakeDamage;
|
typedef IHookChainClassImpl<int, CBasePlayer, entvars_t *, entvars_t *, float, int> CRegameHook_CBasePlayer_TakeDamage;
|
||||||
typedef IHookChainRegistryClassImpl<int, CBasePlayer, entvars_t *, entvars_t *, float, int> CReGameHookRegistry_CBasePlayer_TakeDamage;
|
typedef IHookChainRegistryClassImpl<int, CBasePlayer, entvars_t *, entvars_t *, float, int> CReGameHookRegistry_CBasePlayer_TakeDamage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// CBasePlayer::TakeHealth hook
|
// CBasePlayer::TakeHealth hook
|
||||||
typedef IHookChainClassImpl<int, CBasePlayer, float, int> CRegameHook_CBasePlayer_TakeHealth;
|
typedef IHookChainClassImpl<int, CBasePlayer, float, int> CRegameHook_CBasePlayer_TakeHealth;
|
||||||
typedef IHookChainRegistryClassImpl<int, CBasePlayer, float, int> CReGameHookRegistry_CBasePlayer_TakeHealth;
|
typedef IHookChainRegistryClassImpl<int, CBasePlayer, float, int> CReGameHookRegistry_CBasePlayer_TakeHealth;
|
||||||
@ -127,19 +120,45 @@ typedef IVoidHookChainClassImpl<CBasePlayer, float, float, float, int> CRegameHo
|
|||||||
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, float, float, float, int> CReGameHookRegistry_CBasePlayer_Blind;
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, float, float, float, int> CReGameHookRegistry_CBasePlayer_Blind;
|
||||||
|
|
||||||
|
|
||||||
|
// CBasePlayer::Observer_IsValidTarget hook
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// CBasePlayer::Observer_IsValidTarget
|
|
||||||
typedef IHookChainClassImpl<CBaseEntity *, CBasePlayer, int, bool> CReGameHook_CBasePlayer_Observer_IsValidTarget;
|
typedef IHookChainClassImpl<CBaseEntity *, CBasePlayer, int, bool> CReGameHook_CBasePlayer_Observer_IsValidTarget;
|
||||||
typedef IHookChainRegistryClassImpl<CBaseEntity *, CBasePlayer, int, bool> CReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
typedef IHookChainRegistryClassImpl<CBaseEntity *, CBasePlayer, int, bool> CReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
||||||
|
|
||||||
// GetForceCamera
|
// CBasePlayer::SetAnimation hook
|
||||||
|
typedef IVoidHookChainClassImpl<CBasePlayer, PLAYER_ANIM> CRegameHook_CBasePlayer_SetAnimation;
|
||||||
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, PLAYER_ANIM> CReGameHookRegistry_CBasePlayer_SetAnimation;
|
||||||
|
|
||||||
|
// CBasePlayer::GiveDefaultItems hook
|
||||||
|
typedef IVoidHookChainClassImpl<CBasePlayer> CRegameHook_CBasePlayer_GiveDefaultItems;
|
||||||
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer> CReGameHookRegistry_CBasePlayer_GiveDefaultItems;
|
||||||
|
|
||||||
|
// CBasePlayer::GiveNamedItem hook
|
||||||
|
typedef IVoidHookChainClassImpl<CBasePlayer, const char *> CRegameHook_CBasePlayer_GiveNamedItem;
|
||||||
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, const char *> CReGameHookRegistry_CBasePlayer_GiveNamedItem;
|
||||||
|
|
||||||
|
// CBasePlayer::AddAccount hook
|
||||||
|
typedef IVoidHookChainClassImpl<CBasePlayer, int, bool> CRegameHook_CBasePlayer_AddAccount;
|
||||||
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, int, bool> CReGameHookRegistry_CBasePlayer_AddAccount;
|
||||||
|
|
||||||
|
// CBasePlayer::AddAccount hook
|
||||||
|
typedef IVoidHookChainClassImpl<CBasePlayer, bool> CRegameHook_CBasePlayer_GiveShield;
|
||||||
|
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, bool> CReGameHookRegistry_CBasePlayer_GiveShield;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// GetForceCamera hook
|
||||||
typedef IHookChainImpl<int, class CBasePlayer *> CReGameHook_GetForceCamera;
|
typedef IHookChainImpl<int, class CBasePlayer *> CReGameHook_GetForceCamera;
|
||||||
typedef IHookChainRegistryImpl<int, class CBasePlayer *> CReGameHookRegistry_GetForceCamera;
|
typedef IHookChainRegistryImpl<int, class CBasePlayer *> CReGameHookRegistry_GetForceCamera;
|
||||||
|
|
||||||
|
// PlayerBlind hook
|
||||||
|
typedef IVoidHookChainImpl<CBasePlayer *, entvars_t *, entvars_t *, float, float, int, Vector &> CReGameHook_PlayerBlind;
|
||||||
|
typedef IVoidHookChainRegistryImpl<CBasePlayer *, entvars_t *, entvars_t *, float, float, int, Vector &> CReGameHookRegistry_PlayerBlind;
|
||||||
|
|
||||||
|
// RadiusFlash_TraceLine hook
|
||||||
|
typedef IVoidHookChainImpl<CBasePlayer *, entvars_t *, entvars_t *, Vector &, Vector &, TraceResult *> CReGameHook_RadiusFlash_TraceLine;
|
||||||
|
typedef IVoidHookChainRegistryImpl<CBasePlayer *, entvars_t *, entvars_t *, Vector &, Vector &, TraceResult *> CReGameHookRegistry_RadiusFlash_TraceLine;
|
||||||
|
|
||||||
class CReGameHookchains: public IReGameHookchains {
|
class CReGameHookchains: public IReGameHookchains {
|
||||||
public:
|
public:
|
||||||
// CBasePlayer virtual
|
// CBasePlayer virtual
|
||||||
@ -166,16 +185,17 @@ public:
|
|||||||
CReGameHookRegistry_CBasePlayer_RoundRespawn m_CBasePlayer_RoundRespawn;
|
CReGameHookRegistry_CBasePlayer_RoundRespawn m_CBasePlayer_RoundRespawn;
|
||||||
CReGameHookRegistry_CBasePlayer_Blind m_CBasePlayer_Blind;
|
CReGameHookRegistry_CBasePlayer_Blind m_CBasePlayer_Blind;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CReGameHookRegistry_CBasePlayer_Observer_IsValidTarget m_CBasePlayer_Observer_IsValidTarget;
|
CReGameHookRegistry_CBasePlayer_Observer_IsValidTarget m_CBasePlayer_Observer_IsValidTarget;
|
||||||
|
CReGameHookRegistry_CBasePlayer_SetAnimation m_CBasePlayer_SetAnimation;
|
||||||
|
CReGameHookRegistry_CBasePlayer_GiveDefaultItems m_CBasePlayer_GiveDefaultItems;
|
||||||
|
CReGameHookRegistry_CBasePlayer_GiveNamedItem m_CBasePlayer_GiveNamedItem;
|
||||||
|
CReGameHookRegistry_CBasePlayer_AddAccount m_CBasePlayer_AddAccount;
|
||||||
|
CReGameHookRegistry_CBasePlayer_GiveShield m_CBasePlayer_GiveShield;
|
||||||
|
|
||||||
|
|
||||||
CReGameHookRegistry_GetForceCamera m_GetForceCamera;
|
CReGameHookRegistry_GetForceCamera m_GetForceCamera;
|
||||||
|
CReGameHookRegistry_PlayerBlind m_PlayerBlind;
|
||||||
|
CReGameHookRegistry_RadiusFlash_TraceLine m_RadiusFlash_TraceLine;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn();
|
virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn();
|
||||||
@ -201,16 +221,19 @@ public:
|
|||||||
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn* CBasePlayer_RoundRespawn();
|
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn* CBasePlayer_RoundRespawn();
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Blind* CBasePlayer_Blind();
|
virtual IReGameHookRegistry_CBasePlayer_Blind* CBasePlayer_Blind();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CBasePlayer_Observer_IsValidTarget();
|
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CBasePlayer_Observer_IsValidTarget();
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_SetAnimation* CBasePlayer_SetAnimation();
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_GiveDefaultItems* CBasePlayer_GiveDefaultItems();
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_GiveNamedItem* CBasePlayer_GiveNamedItem();
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_AddAccount* CBasePlayer_AddAccount();
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_GiveShield* CBasePlayer_GiveShield();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera();
|
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera();
|
||||||
|
virtual IReGameHookRegistry_PlayerBlind* PlayerBlind();
|
||||||
|
virtual IReGameHookRegistry_RadiusFlash_TraceLine* RadiusFlash_TraceLine();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -227,3 +250,5 @@ public:
|
|||||||
virtual IReGameHookchains *GetHookchains();
|
virtual IReGameHookchains *GetHookchains();
|
||||||
virtual IReGameData* GetGameData();
|
virtual IReGameData* GetGameData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern void Regamedll_CopyString_api(char *dest, const char *source);
|
||||||
|
@ -92,7 +92,7 @@ void Regamedll_MonitorEntities()
|
|||||||
|
|
||||||
++nCount;
|
++nCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
CONSOLE_ECHO(__FUNCTION__":: nCount: (%d) (%d)\n", nCount, gpGlobals->maxEntities);
|
CONSOLE_ECHO(__FUNCTION__":: nCount: (%d) (%d)\n", nCount, gpGlobals->maxEntities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +45,9 @@ extern ICSEntity *INDEX_TO_CSENTITY(int iEntityIndex);
|
|||||||
#define __API_VHOOK(fname)\
|
#define __API_VHOOK(fname)\
|
||||||
fname##_
|
fname##_
|
||||||
|
|
||||||
#define __API_HOOK __API_VHOOK
|
|
||||||
|
|
||||||
#ifndef HOOK_GAMEDLL
|
#ifndef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
#define __API_HOOK __API_VHOOK
|
||||||
#define __MAKE_VHOOK(fname)\
|
#define __MAKE_VHOOK(fname)\
|
||||||
fname
|
fname
|
||||||
|
|
||||||
@ -72,13 +71,14 @@ extern ICSEntity *INDEX_TO_CSENTITY(int iEntityIndex);
|
|||||||
|
|
||||||
#define LINK_HOOK_VOID_CHAIN(functionName, args, ...)\
|
#define LINK_HOOK_VOID_CHAIN(functionName, args, ...)\
|
||||||
void functionName args {\
|
void functionName args {\
|
||||||
g_ReGameHookchains.m_##functionName.callChain(functionName##_internal, __VA_ARGS__);\
|
g_ReGameHookchains.m_##functionName.callChain(functionName##_, __VA_ARGS__);\
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LINK_HOOK_CHAIN(ret, functionName, args, ...)\
|
#define LINK_HOOK_CHAIN(ret, functionName, args, ...)\
|
||||||
ret functionName args {\
|
ret functionName args {\
|
||||||
return g_ReGameHookchains.m_##functionName.callChain(functionName##_internal, __VA_ARGS__);\
|
return g_ReGameHookchains.m_##functionName.callChain(functionName##_, __VA_ARGS__);\
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Implementation interfaces
|
// Implementation interfaces
|
||||||
@ -198,8 +198,6 @@ public:
|
|||||||
virtual ICSPlayerItem *GetWeaponPtr() { ((CBasePlayerItem *)m_pEntity)->GetWeaponPtr(); }
|
virtual ICSPlayerItem *GetWeaponPtr() { ((CBasePlayerItem *)m_pEntity)->GetWeaponPtr(); }
|
||||||
virtual float GetMaxSpeed() { ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); }
|
virtual float GetMaxSpeed() { ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); }
|
||||||
virtual int iItemSlot() { ((CBasePlayerItem *)m_pEntity)->iItemSlot(); }
|
virtual int iItemSlot() { ((CBasePlayerItem *)m_pEntity)->iItemSlot(); }
|
||||||
public:
|
|
||||||
virtual CBasePlayerItem *GetEntity() const { return (CBasePlayerItem *)m_pEntity; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCSToggle: public CCSAnimating {
|
class CCSToggle: public CCSAnimating {
|
||||||
@ -311,7 +309,13 @@ public:
|
|||||||
virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) { ((CBasePlayer *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)pWeapon->m_pEntity); }
|
virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) { ((CBasePlayer *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)pWeapon->m_pEntity); }
|
||||||
public:
|
public:
|
||||||
virtual bool IsConnected() const { return m_pEntity->has_disconnected == false; }
|
virtual bool IsConnected() const { return m_pEntity->has_disconnected == false; }
|
||||||
virtual CBasePlayer *GetEntity() const { return (CBasePlayer *)m_pEntity; }
|
|
||||||
|
virtual void SetAnimation(PLAYER_ANIM playerAnim) { ((CBasePlayer *)m_pEntity)->SetAnimation(playerAnim); }
|
||||||
|
virtual void AddAccount(int amount, bool bTrackChange = true) { ((CBasePlayer *)m_pEntity)->AddAccount(amount, bTrackChange); }
|
||||||
|
virtual void GiveNamedItem(const char *pszName) { ((CBasePlayer *)m_pEntity)->GiveNamedItem(pszName); }
|
||||||
|
virtual void GiveDefaultItems() { ((CBasePlayer *)m_pEntity)->GiveDefaultItems(); }
|
||||||
|
virtual void GiveShield(bool bDeploy = true) { ((CBasePlayer *)m_pEntity)->GiveShield(bDeploy); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CAPI_Bot: public CCSPlayer {
|
class CAPI_Bot: public CCSPlayer {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user