Skip to content

Commit

Permalink
Tagged 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dvander committed Oct 26, 2007
2 parents 6899af4 + cc99d6d commit 1a6c457
Show file tree
Hide file tree
Showing 39 changed files with 691 additions and 416 deletions.
35 changes: 23 additions & 12 deletions amxmodx/CVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@
// Vector
template <class T> class CVector
{
bool Grow()
bool Grow(size_t amount)
{
// automatic grow
size_t newSize = m_Size * 2;

if (newSize == 0)
newSize = 8; // a good init value
{
newSize = 8;
}

while (m_CurrentUsedSize + amount > newSize)
{
newSize *= 2;
}
T *newData = new T[newSize];
if (!newData)
return false;
Expand All @@ -57,12 +65,16 @@ template <class T> class CVector
return true;
}

bool GrowIfNeeded()
bool GrowIfNeeded(size_t amount)
{
if (m_CurrentUsedSize >= m_Size)
return Grow();
if (m_CurrentUsedSize + amount >= m_Size)
{
return Grow(amount);
}
else
{
return true;
}
}

bool ChangeSize(size_t size)
Expand Down Expand Up @@ -329,14 +341,13 @@ template <class T> class CVector

bool push_back(const T & elem)
{
++m_CurrentUsedSize;
if (!GrowIfNeeded())
if (!GrowIfNeeded(1))
{
--m_CurrentUsedSize;
return false;
}

m_Data[m_CurrentUsedSize - 1] = elem;
m_Data[m_CurrentUsedSize++] = elem;

return true;
}

Expand Down Expand Up @@ -434,13 +445,13 @@ template <class T> class CVector

size_t ofs = where - begin();

++m_CurrentUsedSize;
if (!GrowIfNeeded())
if (!GrowIfNeeded(1))
{
--m_CurrentUsedSize;
return false;
}

++m_CurrentUsedSize;

where = begin() + ofs;

// Move subsequent entries
Expand Down
2 changes: 1 addition & 1 deletion amxmodx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile written by David "BAILOPAN" Anderson

HLSDK = ../../hlsdk
MM_ROOT = ../metamod/metamod
MM_ROOT = ../../metamod/metamod

### EDIT BELOW FOR OTHER PROJECTS ###

Expand Down
8 changes: 4 additions & 4 deletions amxmodx/srvcmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void amx_command()
{

print_srvconsole("Currently loaded plugins:\n");
print_srvconsole(" %-23.22s %-8.7s %-17.16s %-16.15s %-9.8s\n", "name", "version", "author", "file", "status");
print_srvconsole(" %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", "name", "version", "author", "file", "status");

int plugins = 0;
int running = 0;
Expand All @@ -52,7 +52,7 @@ void amx_command()
if ((*a).isValid() && !(*a).isPaused())
++running;

print_srvconsole(" [%3d] %-23.22s %-8.7s %-17.16s %-16.15s %-9.8s\n", plugins, (*a).getTitle(), (*a).getVersion(), (*a).getAuthor(), (*a).getName(), (*a).getStatus());
print_srvconsole(" [%3d] %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", plugins, (*a).getTitle(), (*a).getVersion(), (*a).getAuthor(), (*a).getName(), (*a).getStatus());
++a;
}

Expand Down Expand Up @@ -215,7 +215,7 @@ void amx_command()
else if (!strcmp(cmd, "modules"))
{
print_srvconsole("Currently loaded modules:\n");
print_srvconsole(" %-23.22s %-8.7s %-20.19s %-11.10s\n", "name", "version", "author", "status");
print_srvconsole(" %-23.22s %-11.10s %-20.19s %-11.10s\n", "name", "version", "author", "status");

int running = 0;
int modules = 0;
Expand All @@ -228,7 +228,7 @@ void amx_command()
++running;
++modules;

print_srvconsole(" [%2d] %-23.22s %-8.7s %-20.19s %-11.10s\n", modules, (*a).getName(), (*a).getVersion(), (*a).getAuthor(), (*a).getStatus());
print_srvconsole(" [%2d] %-23.22s %-11.10s %-20.19s %-11.10s\n", modules, (*a).getName(), (*a).getVersion(), (*a).getAuthor(), (*a).getStatus());
++a;
}

Expand Down
4 changes: 2 additions & 2 deletions amxmodx/svn_version.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef _INCLUDE_SVN_VERSION_H_
#define _INCLUDE_SVN_VERSION_H_

#define SVN_VERSION_STRING "1.8.0.3648"
#define SVN_VERSION_DWORD 1,8,0,3648
#define SVN_VERSION_STRING "1.8.0.3660"
#define SVN_VERSION_DWORD 1,8,0,3660
#define SVN_VERSION_PRODUCT "1.8.0"

#endif //_INCLUDE_SVN_VERSION_H_
2 changes: 1 addition & 1 deletion dlls/cstrike/cstrike/svn_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */
/** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */

#define SVN_VERSION "1.8.0.3635"
#define SVN_VERSION "1.8.0.3660"

#endif //_INCLUDE_SVN_VERSION_H_
2 changes: 1 addition & 1 deletion dlls/cstrike/csx/svn_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */
/** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */

#define SVN_VERSION "1.8.0.3550"
#define SVN_VERSION "1.8.0.3660"

#endif //_INCLUDE_SVN_VERSION_H_
2 changes: 1 addition & 1 deletion dlls/dod/dodfun/svn_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */
/** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */

#define SVN_VERSION "1.8.0.3587"
#define SVN_VERSION "1.8.0.3660"

#endif //_INCLUDE_SVN_VERSION_H_
2 changes: 1 addition & 1 deletion dlls/dod/dodx/svn_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */
/** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */

#define SVN_VERSION "1.8.0.3538"
#define SVN_VERSION "1.8.0.3660"

#endif //_INCLUDE_SVN_VERSION_H_
Loading

0 comments on commit 1a6c457

Please sign in to comment.