Skip to content

Commit

Permalink
Merge branch 's1lentq:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeperezz16 authored Jan 2, 2024
2 parents 9f54246 + 15df1a9 commit 5268e6b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ReGameDLL_CS [![Download](https://camo.githubusercontent.com/0c15c5ed5da356288ad4bb69ed24267fb48498f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73316c656e74712f526547616d65444c4c5f43532e737667)](https://github.com/s1lentq/ReGameDLL_CS/releases/latest) [![Downloads](https://camo.githubusercontent.com/7eb895bf12d373df1d7c2bd2af3eb7d6328cdf6c02eee380fa93f81365c32d41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f73316c656e74712f526547616d65444c4c5f43532f746f74616c3f636f6c6f723d696d706f7274616e74)]() [![Percentage of issues still open](http://isitmaintained.com/badge/open/s1lentq/ReGameDLL_CS.svg)](http://isitmaintained.com/project/s1lentq/ReGameDLL_CS "Percentage of issues still open") [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) <img align="right" src="https://cloud.githubusercontent.com/assets/5860435/20008568/b3623150-a2d3-11e6-85f3-0d6571045fc9.png" alt="Counter-Strike 1.6 GameDLL" />
# ReGameDLL_CS [![GitHub release (by tag)](https://img.shields.io/github/downloads/s1lentq/ReGameDLL_CS/latest/total)](https://github.com/s1lentq/ReGameDLL_CS/releases/latest) ![GitHub all releases](https://img.shields.io/github/downloads/s1lentq/ReGameDLL_CS/total) [![Percentage of issues still open](http://isitmaintained.com/badge/open/s1lentq/ReGameDLL_CS.svg)](http://isitmaintained.com/project/s1lentq/ReGameDLL_CS "Percentage of issues still open") [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) <img align="right" src="https://cloud.githubusercontent.com/assets/5860435/20008568/b3623150-a2d3-11e6-85f3-0d6571045fc9.png" alt="Counter-Strike 1.6 GameDLL" />
Reverse-engineered gamedll (mp.dll / Counter-Strike)

## What is this?
Expand Down
4 changes: 2 additions & 2 deletions dist/game.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ mp_free_armor "0"
// 1 - Affects teammates (default behaviour)
//
// Default value: "1"
mp_team_flash 1
mp_team_flash "1"
// Players can receive all other players text chat, team restrictions apply.
// 0 - disabled (default behaviour)
Expand Down Expand Up @@ -566,4 +566,4 @@ mp_freezetime_duck "1"
// 1 - enabled (default behaviour)
//
// Default value: "1"
mp_freezetime_jump "1"
mp_freezetime_jump "1"
1 change: 1 addition & 0 deletions regamedll/dlls/bot/cs_bot_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@ void CCSBotManager::SetLooseBomb(CBaseEntity *bomb)
if (bomb)
{
m_looseBombArea = TheNavAreaGrid.GetNearestNavArea(&bomb->pev->origin);
DbgAssert(m_looseBombArea); // TODO: Need investigation and find out why it cannot find nearest area for a lost bomb, just catch it
}
else
{
Expand Down
9 changes: 7 additions & 2 deletions regamedll/dlls/bot/states/cs_bot_hunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,15 @@ void HuntState::OnUpdate(CCSBot *me)
{
if (!me->IsRogue() && me->CanSeeLooseBomb())
{
CNavArea *looseBombArea = TheCSBots()->GetLooseBombArea();

// if we are near the loose bomb and can see it, hide nearby and guard it
me->SetTask(CCSBot::GUARD_LOOSE_BOMB);
me->Hide(TheCSBots()->GetLooseBombArea());
me->GetChatter()->AnnouncePlan("GoingToGuardLooseBomb", TheCSBots()->GetLooseBombArea()->GetPlace());
me->Hide(looseBombArea);

if (looseBombArea)
me->GetChatter()->AnnouncePlan("GoingToGuardLooseBomb", looseBombArea->GetPlace());

return;
}
else if (TheCSBots()->IsBombPlanted())
Expand Down
2 changes: 2 additions & 0 deletions regamedll/game_shared/bot/nav_area.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ void CNavArea::OnDestroyNotify(CNavArea *dead)
// Connect this area to given area in given direction
void CNavArea::ConnectTo(CNavArea *area, NavDirType dir)
{
DbgAssert(area);

// check if already connected
for (NavConnectList::iterator iter = m_connect[dir].begin(); iter != m_connect[dir].end(); iter++)
{
Expand Down
7 changes: 6 additions & 1 deletion regamedll/game_shared/bot/nav_area.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
int ladderTopDir;
while (true)
{
CNavArea *newArea;
CNavArea *newArea = nullptr;
NavTraverseType how;
const CNavLadder *ladder = nullptr;

Expand Down Expand Up @@ -716,6 +716,11 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
newArea = (*floorIter).area;
how = (NavTraverseType)dir;
floorIter++;

DbgAssert(newArea);

if (!newArea)
continue;
}
// search ladders
else
Expand Down

0 comments on commit 5268e6b

Please sign in to comment.