Skip to content

Commit

Permalink
improved "random" things I did
Browse files Browse the repository at this point in the history
ignore that native helper stupid thing, I'm just guessing whatever amxx classes does under the hood, and if you see something stupid here just let it be
  • Loading branch information
Rafflesian committed Feb 15, 2024
1 parent 3661b9e commit 1cff6bc
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 84 deletions.
6 changes: 2 additions & 4 deletions reapi/include/cssdk/dlls/regamedll_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,12 @@ struct ReGameFuncs_t {
class CWeaponBox *(*CreateWeaponBox)(CBasePlayerItem *pItem, CBasePlayer *pPlayerOwner, const char *modelName, Vector &origin, Vector &angles, Vector &velocity, float lifeTime, bool packAmmo);
class CGrenade *(*SpawnGrenade)(WeaponIdType weaponId, entvars_t *pevOwner, Vector &vecSrc, Vector &vecThrow, float time, int iTeam, unsigned short usEvent);

// navs
// navs
NavErrorType (*LoadNavigationMap)();
bool (*CheckNavigationmap)();
void (*DestroyNavigationMap)();

ConnectInfoData *(*AddConnectInfoList)(CBaseEntity *entity);
ConnectInfoData *(*AddConnectInfoList)(CBaseEntity *entity, float update_min, float update_max);
bool (*RemoveConnectInfoList)(CBaseEntity *entity);
void (*DestroyConnectInfoList)();

Expand All @@ -832,8 +832,6 @@ struct ReGameFuncs_t {

ConnectInfoData *(*ComputePath)(CBaseEntity *entity, ConnectInfoData *data, CNavArea *startArea, const Vector *start, CNavArea *goalArea, const Vector *goal, RouteType route);
bool (*UpdatePathMovement)(CBaseEntity *entity, ConnectInfoData *data, float tolerance, bool check2D);

ConnectInfoList *(*GetConnectInfoList)();
};

class IReGameApi {
Expand Down
8 changes: 7 additions & 1 deletion reapi/include/cssdk/game_shared/bot/nav_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct ConnectInfoData
{
CBaseEntity* entity; // path entity
ConnectInfo_api *path; // path pointer
CNavArea *currentArea; // path's current area
Vector currentGoal; // path current goal (fast access)
int length; // path length
int index; // path current index
Expand All @@ -53,10 +54,15 @@ struct ConnectInfoData
enum ConnectInfoData_e
{
e_path,
e_path_flags,
e_path_how,
e_area,
e_goal,
e_length,
e_index,
e_update,
e_goal
e_update_min,
e_update_max,
};

typedef std::list<ConnectInfoData *> ConnectInfoList;
7 changes: 0 additions & 7 deletions reapi/src/natives/natives_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ class CAmxArg
return nullptr;
return UTIL_PlayerByIndex(m_value);
}
operator CNavArea*() const
{
if (m_value < 0)
return nullptr;

return getPrivate<CNavArea>(m_value);
}
operator IGameClient *() const
{
if (m_value <= 0)
Expand Down
Loading

0 comments on commit 1cff6bc

Please sign in to comment.