Rewrote CString
This commit is contained in:
parent
2a00a62bcb
commit
955fcb8549
@ -56,8 +56,8 @@ CmdMngr::Command::Command( CPluginMngr::CPlugin* pplugin,const char* pcmd,
|
|||||||
char szCmd[64], szArg[64];
|
char szCmd[64], szArg[64];
|
||||||
*szCmd = 0; *szArg=0;
|
*szCmd = 0; *szArg=0;
|
||||||
sscanf(pcmd,"%s %s",szCmd,szArg);
|
sscanf(pcmd,"%s %s",szCmd,szArg);
|
||||||
command.set(szCmd);
|
command.assign(szCmd);
|
||||||
argument.set(szArg);
|
argument.assign(szArg);
|
||||||
plugin = pplugin;
|
plugin = pplugin;
|
||||||
flags = pflags;
|
flags = pflags;
|
||||||
cmdtype = 0;
|
cmdtype = 0;
|
||||||
@ -238,7 +238,7 @@ void CmdMngr::registerPrefix( const char* nn )
|
|||||||
CmdMngr::CmdPrefix** CmdMngr::findPrefix( const char* nn ){
|
CmdMngr::CmdPrefix** CmdMngr::findPrefix( const char* nn ){
|
||||||
CmdPrefix** aa = &prefixHead;
|
CmdPrefix** aa = &prefixHead;
|
||||||
while(*aa){
|
while(*aa){
|
||||||
if ( !strncmp( (*aa)->name.str(), nn, (*aa)->name.size() ) )
|
if ( !strncmp( (*aa)->name.c_str(), nn, (*aa)->name.size() ) )
|
||||||
break;
|
break;
|
||||||
aa=&(*aa)->next;
|
aa=&(*aa)->next;
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,10 @@ public:
|
|||||||
friend class CmdMngr;
|
friend class CmdMngr;
|
||||||
CPluginMngr::CPlugin* plugin;
|
CPluginMngr::CPlugin* plugin;
|
||||||
CmdMngr* parent;
|
CmdMngr* parent;
|
||||||
String command;
|
CString command;
|
||||||
String argument;
|
CString argument;
|
||||||
String commandline;
|
CString commandline;
|
||||||
String info;
|
CString info;
|
||||||
bool listable;
|
bool listable;
|
||||||
int function;
|
int function;
|
||||||
int flags;
|
int flags;
|
||||||
@ -67,12 +67,12 @@ public:
|
|||||||
~Command();
|
~Command();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline const char* getCommand() const{ return command.str(); }
|
inline const char* getCommand() { return command.c_str(); }
|
||||||
inline const char* getArgument() const{ return argument.str(); }
|
inline const char* getArgument() { return argument.c_str(); }
|
||||||
inline const char* getCmdInfo() const{ return info.str(); }
|
inline const char* getCmdInfo() { return info.c_str(); }
|
||||||
inline const char* getCmdLine() const{ return commandline.str(); }
|
inline const char* getCmdLine() { return commandline.c_str(); }
|
||||||
inline bool matchCommandLine(const char* cmd, const char* arg) { return (!stricmp(command.str()+prefix, cmd+prefix ) && (argument.empty() || !stricmp(argument.str() , arg ))); }
|
inline bool matchCommandLine(const char* cmd, const char* arg) { return (!stricmp(command.c_str()+prefix, cmd+prefix ) && (argument.empty() || !stricmp(argument.c_str() , arg ))); }
|
||||||
inline bool matchCommand(const char* cmd) { return (!strcmp(command.str(), cmd )); }
|
inline bool matchCommand(const char* cmd) { return (!strcmp(command.c_str(), cmd )); }
|
||||||
inline int getFunction() const { return function; }
|
inline int getFunction() const { return function; }
|
||||||
inline bool gotAccess(int f) const { return (!flags||((flags & f)==flags)); }
|
inline bool gotAccess(int f) const { return (!flags||((flags & f)==flags)); }
|
||||||
inline CPluginMngr::CPlugin* getPlugin() { return plugin; }
|
inline CPluginMngr::CPlugin* getPlugin() { return plugin; }
|
||||||
@ -100,7 +100,7 @@ private:
|
|||||||
CmdLink* clcmdlist;
|
CmdLink* clcmdlist;
|
||||||
|
|
||||||
struct CmdPrefix {
|
struct CmdPrefix {
|
||||||
String name;
|
CString name;
|
||||||
CmdMngr* parent;
|
CmdMngr* parent;
|
||||||
CmdLink* list;
|
CmdLink* list;
|
||||||
CmdPrefix* next;
|
CmdPrefix* next;
|
||||||
|
@ -169,7 +169,7 @@ void EventsMngr::ClEvent::registerFilter(char *filter)
|
|||||||
tmpCond->paramId = atoi(filter);
|
tmpCond->paramId = atoi(filter);
|
||||||
|
|
||||||
// rest of line
|
// rest of line
|
||||||
tmpCond->sValue.set(value);
|
tmpCond->sValue.assign(value);
|
||||||
tmpCond->fValue = atof(value);
|
tmpCond->fValue = atof(value);
|
||||||
tmpCond->iValue = atoi(value);
|
tmpCond->iValue = atoi(value);
|
||||||
|
|
||||||
@ -381,9 +381,9 @@ void EventsMngr::parseValue(const char *sz)
|
|||||||
anyConditions = true;
|
anyConditions = true;
|
||||||
switch(condIter->type)
|
switch(condIter->type)
|
||||||
{
|
{
|
||||||
case '=': if (!strcmp(sz, condIter->sValue.str())) execute=true; break;
|
case '=': if (!strcmp(sz, condIter->sValue.c_str())) execute=true; break;
|
||||||
case '!': if (strcmp(sz, condIter->sValue.str())) execute=true; break;
|
case '!': if (strcmp(sz, condIter->sValue.c_str())) execute=true; break;
|
||||||
case '&': if (strstr(sz, condIter->sValue.str())) execute=true; break;
|
case '&': if (strstr(sz, condIter->sValue.c_str())) execute=true; break;
|
||||||
}
|
}
|
||||||
if (execute)
|
if (execute)
|
||||||
break;
|
break;
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
{
|
{
|
||||||
int paramId; // the message parameter id
|
int paramId; // the message parameter id
|
||||||
|
|
||||||
String sValue; // value (string)
|
CString sValue; // value (string)
|
||||||
float fValue; // value (float)
|
float fValue; // value (float)
|
||||||
int iValue; // value (int)
|
int iValue; // value (int)
|
||||||
int type; // type (can be int, float, string)
|
int type; // type (can be int, float, string)
|
||||||
|
@ -52,9 +52,9 @@ File::operator bool ( ) const
|
|||||||
return fp && !feof(fp);
|
return fp && !feof(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
File& operator<<( File& f, const String& n )
|
File& operator<<( File& f, const CString& n )
|
||||||
{
|
{
|
||||||
if ( f ) fputs( n.str() , f.fp ) ;
|
if ( f ) fputs( n.c_str() , f.fp ) ;
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,12 +77,12 @@ File& operator<<( File& f, const char& c )
|
|||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
File& operator>>( File& f, String& n )
|
File& operator>>( File& f, CString& n )
|
||||||
{
|
{
|
||||||
if ( !f ) return f;
|
if ( !f ) return f;
|
||||||
char temp[1024];
|
char temp[1024];
|
||||||
fscanf( f.fp , "%s", temp );
|
fscanf( f.fp , "%s", temp );
|
||||||
n.set(temp);
|
n.assign(temp);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@ public:
|
|||||||
File( const char* n, const char* m );
|
File( const char* n, const char* m );
|
||||||
~File( );
|
~File( );
|
||||||
operator bool ( ) const;
|
operator bool ( ) const;
|
||||||
friend File& operator<<( File& f, const String& n );
|
friend File& operator<<( File& f, const CString& n );
|
||||||
friend File& operator<<( File& f, const char* n );
|
friend File& operator<<( File& f, const char* n );
|
||||||
friend File& operator<<( File& f, const char& c );
|
friend File& operator<<( File& f, const char& c );
|
||||||
friend File& operator<<( File& f, int n );
|
friend File& operator<<( File& f, int n );
|
||||||
friend File& operator>>( File& f, String& n );
|
friend File& operator>>( File& f, CString& n );
|
||||||
friend File& operator>>( File& f, char* n );
|
friend File& operator>>( File& f, char* n );
|
||||||
int getline( char* buf, int sz );
|
int getline( char* buf, int sz );
|
||||||
File& skipWs( );
|
File& skipWs( );
|
||||||
|
@ -50,8 +50,8 @@ int LogEventsMngr::CLogCmp::compareCondition(const char* string){
|
|||||||
if ( logid == parent->logCounter )
|
if ( logid == parent->logCounter )
|
||||||
return result;
|
return result;
|
||||||
logid = parent->logCounter;
|
logid = parent->logCounter;
|
||||||
if ( in ) return result = strstr( string , text.str() ) ? 0 : 1;
|
if ( in ) return result = strstr( string , text.c_str() ) ? 0 : 1;
|
||||||
return result = strcmp(string,text.str());
|
return result = strcmp(string,text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
LogEventsMngr::CLogCmp* LogEventsMngr::registerCondition(char* filter){
|
LogEventsMngr::CLogCmp* LogEventsMngr::registerCondition(char* filter){
|
||||||
@ -65,7 +65,7 @@ LogEventsMngr::CLogCmp* LogEventsMngr::registerCondition(char* filter){
|
|||||||
if ( pos < 0 || pos >= MAX_LOGARGS) pos = 0;
|
if ( pos < 0 || pos >= MAX_LOGARGS) pos = 0;
|
||||||
CLogCmp* c = logcmplist;
|
CLogCmp* c = logcmplist;
|
||||||
while( c ) {
|
while( c ) {
|
||||||
if ( (c->pos==pos) && (c->in==in) && !strcmp(c->text.str(), filter))
|
if ( (c->pos==pos) && (c->in==in) && !strcmp(c->text.c_str(), filter))
|
||||||
return c;
|
return c;
|
||||||
c = c->next;
|
c = c->next;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
friend class LogEventsMngr;
|
friend class LogEventsMngr;
|
||||||
friend class CLogEvent;
|
friend class CLogEvent;
|
||||||
LogEventsMngr* parent;
|
LogEventsMngr* parent;
|
||||||
String text;
|
CString text;
|
||||||
int logid;
|
int logid;
|
||||||
int pos;
|
int pos;
|
||||||
int result;
|
int result;
|
||||||
|
@ -51,7 +51,7 @@ MenuMngr::~MenuMngr()
|
|||||||
int MenuMngr::findMenuId(const char* name, AMX* amx)
|
int MenuMngr::findMenuId(const char* name, AMX* amx)
|
||||||
{
|
{
|
||||||
for( MenuIdEle* b = headid; b ; b = b->next) {
|
for( MenuIdEle* b = headid; b ; b = b->next) {
|
||||||
if ( (!b->amx || amx == b->amx) && strstr(name,b->name.str()) )
|
if ( (!b->amx || amx == b->amx) && strstr(name,b->name.c_str()) )
|
||||||
return b->id;
|
return b->id;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -40,7 +40,7 @@ class MenuMngr
|
|||||||
{
|
{
|
||||||
struct MenuIdEle
|
struct MenuIdEle
|
||||||
{
|
{
|
||||||
String name;
|
CString name;
|
||||||
AMX* amx;
|
AMX* amx;
|
||||||
MenuIdEle* next;
|
MenuIdEle* next;
|
||||||
int id;
|
int id;
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
* version.
|
* version.
|
||||||
*/
|
*/
|
||||||
#include "amxmodx.h"
|
#include "amxmodx.h"
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
// class CPlayer
|
// class CPlayer
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
|
||||||
void CPlayer::Init( edict_t* e , int i )
|
void CPlayer::Init( edict_t* e , int i )
|
||||||
{
|
{
|
||||||
index = i;
|
index = i;
|
||||||
@ -61,13 +61,14 @@ void CPlayer::Disconnect() {
|
|||||||
authorized = false;
|
authorized = false;
|
||||||
bot = 0;
|
bot = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::PutInServer() {
|
void CPlayer::PutInServer() {
|
||||||
playtime = gpGlobals->time;
|
playtime = gpGlobals->time;
|
||||||
ingame = true;
|
ingame = true;
|
||||||
}
|
}
|
||||||
bool CPlayer::Connect(const char* connectname,const char* ipaddress) {
|
bool CPlayer::Connect(const char* connectname,const char* ipaddress) {
|
||||||
name.set(connectname);
|
name.assign(connectname);
|
||||||
ip.set(ipaddress);
|
ip.assign(ipaddress);
|
||||||
time = gpGlobals->time;
|
time = gpGlobals->time;
|
||||||
bot = IsBot();
|
bot = IsBot();
|
||||||
death_killer = 0;
|
death_killer = 0;
|
||||||
@ -118,6 +119,7 @@ bool Grenades::find( edict_t* enemy, CPlayer** p, int& type )
|
|||||||
Obj* b = (*a)->next;
|
Obj* b = (*a)->next;
|
||||||
delete *a;
|
delete *a;
|
||||||
*a = b;
|
*a = b;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -190,7 +192,7 @@ void TeamIds::registerTeam( const char* n ,int s )
|
|||||||
{
|
{
|
||||||
TeamEle** a = &head;
|
TeamEle** a = &head;
|
||||||
while( *a ){
|
while( *a ){
|
||||||
if ( strcmp((*a)->name.str(),n) == 0 ){
|
if ( strcmp((*a)->name.c_str(),n) == 0 ){
|
||||||
if (s != -1){
|
if (s != -1){
|
||||||
(*a)->id = s;
|
(*a)->id = s;
|
||||||
newTeam &= ~(1<<(*a)->tid);
|
newTeam &= ~(1<<(*a)->tid);
|
||||||
@ -208,7 +210,7 @@ int TeamIds::findTeamId( const char* n )
|
|||||||
{
|
{
|
||||||
TeamEle* a = head;
|
TeamEle* a = head;
|
||||||
while( a ){
|
while( a ){
|
||||||
if ( !strcmpi(a->name.str(),n) )
|
if ( !strcmpi(a->name.c_str(),n) )
|
||||||
return a->id;
|
return a->id;
|
||||||
a = a->next;
|
a = a->next;
|
||||||
}
|
}
|
||||||
@ -219,7 +221,7 @@ int TeamIds::findTeamIdCase( const char* n)
|
|||||||
{
|
{
|
||||||
TeamEle* a = head;
|
TeamEle* a = head;
|
||||||
while( a ){
|
while( a ){
|
||||||
if ( !strcmp(a->name.str(), n) )
|
if ( !strcmp(a->name.c_str(), n) )
|
||||||
return a->id;
|
return a->id;
|
||||||
a = a->next;
|
a = a->next;
|
||||||
}
|
}
|
||||||
|
@ -40,20 +40,20 @@
|
|||||||
class CCVar
|
class CCVar
|
||||||
{
|
{
|
||||||
cvar_t cvar;
|
cvar_t cvar;
|
||||||
String name;
|
CString name;
|
||||||
String plugin;
|
CString plugin;
|
||||||
public:
|
public:
|
||||||
CCVar( const char* pname, const char* pplugin,
|
CCVar( const char* pname, const char* pplugin,
|
||||||
int pflags, float pvalue ) : name(pname) , plugin(pplugin ) {
|
int pflags, float pvalue ) : name(pname) , plugin(pplugin ) {
|
||||||
cvar.name = (char*)name.str();
|
cvar.name = (char*)name.c_str();
|
||||||
cvar.flags = pflags;
|
cvar.flags = pflags;
|
||||||
cvar.string = "";
|
cvar.string = "";
|
||||||
cvar.value = pvalue;
|
cvar.value = pvalue;
|
||||||
}
|
}
|
||||||
inline cvar_t* getCvar() { return &cvar; }
|
inline cvar_t* getCvar() { return &cvar; }
|
||||||
inline const char* getPluginName() { return plugin.str(); }
|
inline const char* getPluginName() { return plugin.c_str(); }
|
||||||
inline const char* getName() { return name.str(); }
|
inline const char* getName() { return name.c_str(); }
|
||||||
inline bool operator == ( const char* string ) const { return (strcmp(name.str(),string)==0); }
|
inline bool operator == ( const char* string ) { return (strcmp(name.c_str(),string)==0); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -68,9 +68,9 @@ class CPlayer
|
|||||||
public:
|
public:
|
||||||
edict_t* pEdict;
|
edict_t* pEdict;
|
||||||
|
|
||||||
String name;
|
CString name;
|
||||||
String ip;
|
CString ip;
|
||||||
String team;
|
CString team;
|
||||||
|
|
||||||
bool initialized;
|
bool initialized;
|
||||||
bool ingame;
|
bool ingame;
|
||||||
@ -98,7 +98,7 @@ public:
|
|||||||
int death_killer;
|
int death_killer;
|
||||||
int death_victim;
|
int death_victim;
|
||||||
bool death_tk;
|
bool death_tk;
|
||||||
String death_weapon;
|
CString death_weapon;
|
||||||
|
|
||||||
Vector lastTrace;
|
Vector lastTrace;
|
||||||
Vector thisTrace;
|
Vector thisTrace;
|
||||||
@ -150,7 +150,7 @@ public:
|
|||||||
// class ForceObject
|
// class ForceObject
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
class ForceObject {
|
class ForceObject {
|
||||||
String filename;
|
CString filename;
|
||||||
FORCE_TYPE type;
|
FORCE_TYPE type;
|
||||||
Vector mins;
|
Vector mins;
|
||||||
Vector maxs;
|
Vector maxs;
|
||||||
@ -158,7 +158,7 @@ class ForceObject {
|
|||||||
public:
|
public:
|
||||||
ForceObject(const char* n, FORCE_TYPE c,Vector& mi, Vector& ma, AMX* a) :
|
ForceObject(const char* n, FORCE_TYPE c,Vector& mi, Vector& ma, AMX* a) :
|
||||||
filename(n) , type(c), mins(mi), maxs(ma), amx(a) {}
|
filename(n) , type(c), mins(mi), maxs(ma), amx(a) {}
|
||||||
inline const char* getFilename() { return filename.str(); }
|
inline const char* getFilename() { return filename.c_str(); }
|
||||||
inline AMX* getAMX() { return amx; }
|
inline AMX* getAMX() { return amx; }
|
||||||
Vector& getMin() { return mins; }
|
Vector& getMin() { return mins; }
|
||||||
Vector& getMax() { return maxs; }
|
Vector& getMax() { return maxs; }
|
||||||
@ -204,13 +204,13 @@ public:
|
|||||||
// *****************************************************
|
// *****************************************************
|
||||||
class CScript
|
class CScript
|
||||||
{
|
{
|
||||||
String filename;
|
CString filename;
|
||||||
AMX* amx;
|
AMX* amx;
|
||||||
void* code;
|
void* code;
|
||||||
public:
|
public:
|
||||||
CScript(AMX* aa, void* cc,const char* ff):filename(ff),amx(aa),code(cc){}
|
CScript(AMX* aa, void* cc,const char* ff):filename(ff),amx(aa),code(cc){}
|
||||||
inline AMX* getAMX() { return amx; }
|
inline AMX* getAMX() { return amx; }
|
||||||
inline const char* getName() { return filename.str(); }
|
inline const char* getName() { return filename.c_str(); }
|
||||||
inline bool operator==( void* a ) { return (amx == (AMX*)a); }
|
inline bool operator==( void* a ) { return (amx == (AMX*)a); }
|
||||||
inline void* getCode() { return code; }
|
inline void* getCode() { return code; }
|
||||||
};
|
};
|
||||||
@ -221,7 +221,7 @@ public:
|
|||||||
class TeamIds
|
class TeamIds
|
||||||
{
|
{
|
||||||
struct TeamEle {
|
struct TeamEle {
|
||||||
String name;
|
CString name;
|
||||||
int id;
|
int id;
|
||||||
char tid;
|
char tid;
|
||||||
static char uid;
|
static char uid;
|
||||||
|
@ -147,7 +147,7 @@ void CModule::clear(bool clearFilename)
|
|||||||
m_Handle = NULL;
|
m_Handle = NULL;
|
||||||
m_Status = MODULE_NONE;
|
m_Status = MODULE_NONE;
|
||||||
if (clearFilename)
|
if (clearFilename)
|
||||||
m_Filename.set("unknown");
|
m_Filename.assign("unknown");
|
||||||
|
|
||||||
// old
|
// old
|
||||||
m_InfoOld = NULL;
|
m_InfoOld = NULL;
|
||||||
@ -187,7 +187,7 @@ bool CModule::attachModule()
|
|||||||
m_Status = MODULE_LOADED;
|
m_Status = MODULE_LOADED;
|
||||||
return true;
|
return true;
|
||||||
case AMXX_PARAM:
|
case AMXX_PARAM:
|
||||||
AMXXLOG_Log("[AMXX] Internal Error: Module \"%s\" (version \"%s\") retured \"Invalid parameter\" from Attach func.", m_Filename.str(), getVersion());
|
AMXXLOG_Log("[AMXX] Internal Error: Module \"%s\" (version \"%s\") retured \"Invalid parameter\" from Attach func.", m_Filename.c_str(), getVersion());
|
||||||
m_Status = MODULE_INTERROR;
|
m_Status = MODULE_INTERROR;
|
||||||
return false;
|
return false;
|
||||||
case AMXX_FUNC_NOT_PRESENT:
|
case AMXX_FUNC_NOT_PRESENT:
|
||||||
@ -195,7 +195,7 @@ bool CModule::attachModule()
|
|||||||
m_MissingFunc = g_LastRequestedFunc;
|
m_MissingFunc = g_LastRequestedFunc;
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
AMXXLOG_Log("[AMXX] Module \"%s\" (version \"%s\") returned an invalid code.", m_Filename.str(), getVersion());
|
AMXXLOG_Log("[AMXX] Module \"%s\" (version \"%s\") returned an invalid code.", m_Filename.c_str(), getVersion());
|
||||||
m_Status = MODULE_BADLOAD;
|
m_Status = MODULE_BADLOAD;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ bool CModule::queryModule()
|
|||||||
if (m_Status != MODULE_NONE) // don't check if already queried
|
if (m_Status != MODULE_NONE) // don't check if already queried
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_Handle = DLLOAD(m_Filename.str()); // load file
|
m_Handle = DLLOAD(m_Filename.c_str()); // load file
|
||||||
if (!m_Handle)
|
if (!m_Handle)
|
||||||
{
|
{
|
||||||
m_Status = MODULE_BADLOAD;
|
m_Status = MODULE_BADLOAD;
|
||||||
@ -242,7 +242,7 @@ bool CModule::queryModule()
|
|||||||
switch (retVal)
|
switch (retVal)
|
||||||
{
|
{
|
||||||
case AMXX_PARAM:
|
case AMXX_PARAM:
|
||||||
AMXXLOG_Log("[AMXX] Internal Error: Module \"%s\" (version \"%s\") retured \"Invalid parameter\" from Attach func.", m_Filename.str(), getVersion());
|
AMXXLOG_Log("[AMXX] Internal Error: Module \"%s\" (version \"%s\") retured \"Invalid parameter\" from Attach func.", m_Filename.c_str(), getVersion());
|
||||||
m_Status = MODULE_INTERROR;
|
m_Status = MODULE_INTERROR;
|
||||||
return false;
|
return false;
|
||||||
case AMXX_IFVERS:
|
case AMXX_IFVERS:
|
||||||
@ -254,7 +254,7 @@ bool CModule::queryModule()
|
|||||||
case AMXX_OK:
|
case AMXX_OK:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
AMXXLOG_Log("[AMXX] Module \"%s\" (version \"%s\") returned an invalid code.", m_Filename.str(), getVersion());
|
AMXXLOG_Log("[AMXX] Module \"%s\" (version \"%s\") returned an invalid code.", m_Filename.c_str(), getVersion());
|
||||||
m_Status = MODULE_BADLOAD;
|
m_Status = MODULE_BADLOAD;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ struct amxx_module_info_s
|
|||||||
|
|
||||||
class CModule
|
class CModule
|
||||||
{
|
{
|
||||||
String m_Filename; // Filename
|
CString m_Filename; // Filename
|
||||||
bool m_Metamod; // Using metamod?
|
bool m_Metamod; // Using metamod?
|
||||||
bool m_Amxx; // Using new module interface?
|
bool m_Amxx; // Using new module interface?
|
||||||
module_info_s* m_InfoOld; // module info (old module interface)
|
module_info_s* m_InfoOld; // module info (old module interface)
|
||||||
@ -95,11 +95,11 @@ public:
|
|||||||
inline module_info_s* getInfo() const { return m_InfoOld; } // old
|
inline module_info_s* getInfo() const { return m_InfoOld; } // old
|
||||||
inline const amxx_module_info_s* getInfoNew() const { return &m_InfoNew; } // new
|
inline const amxx_module_info_s* getInfoNew() const { return &m_InfoNew; } // new
|
||||||
inline int getStatusValue() { return m_Status; }
|
inline int getStatusValue() { return m_Status; }
|
||||||
inline bool operator==( void* fname ) { return !strcmp( m_Filename.str() , (char*)fname ); }
|
inline bool operator==( void* fname ) { return !strcmp( m_Filename.c_str() , (char*)fname ); }
|
||||||
inline bool isReloadable() { return m_Amxx ? ((m_Status == MODULE_LOADED) && (m_InfoNew.reload != 0)) : ( (m_Status==MODULE_LOADED) && (m_InfoOld->type==RELOAD_MODULE)); }
|
inline bool isReloadable() { return m_Amxx ? ((m_Status == MODULE_LOADED) && (m_InfoNew.reload != 0)) : ( (m_Status==MODULE_LOADED) && (m_InfoOld->type==RELOAD_MODULE)); }
|
||||||
inline bool isAmxx() const { return m_Amxx; }
|
inline bool isAmxx() const { return m_Amxx; }
|
||||||
inline const char *getMissingFunc() const { return m_MissingFunc; }
|
inline const char *getMissingFunc() const { return m_MissingFunc; }
|
||||||
inline const char *getFilename() const { return m_Filename.str(); }
|
inline const char *getFilename() { return m_Filename.c_str(); }
|
||||||
void CModule::CallPluginsLoaded();
|
void CModule::CallPluginsLoaded();
|
||||||
|
|
||||||
CList<AMX_NATIVE_INFO*> m_Natives;
|
CList<AMX_NATIVE_INFO*> m_Natives;
|
||||||
|
@ -112,7 +112,7 @@ CPluginMngr::CPlugin* CPluginMngr::findPlugin(const char* name) {
|
|||||||
int len = strlen(name);
|
int len = strlen(name);
|
||||||
if (!len) return 0;
|
if (!len) return 0;
|
||||||
CPlugin*a = head;
|
CPlugin*a = head;
|
||||||
while( a && strncmp(a->name.str(), name,len) )
|
while( a && strncmp(a->name.c_str(), name,len) )
|
||||||
a=a->next;
|
a=a->next;
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
@ -130,9 +130,9 @@ const char* CPluginMngr::CPlugin::getStatus() const {
|
|||||||
|
|
||||||
CPluginMngr::CPlugin::CPlugin(int i, const char* p,const char* n, char* e) : name(n), title(n) {
|
CPluginMngr::CPlugin::CPlugin(int i, const char* p,const char* n, char* e) : name(n), title(n) {
|
||||||
const char* unk = "unknown";
|
const char* unk = "unknown";
|
||||||
title.set(unk);
|
title.assign(unk);
|
||||||
author.set(unk);
|
author.assign(unk);
|
||||||
version.set(unk);
|
version.assign(unk);
|
||||||
char* path = build_pathname("%s/%s",p,n);
|
char* path = build_pathname("%s/%s",p,n);
|
||||||
code = 0;
|
code = 0;
|
||||||
int err = load_amxscript(&amx,&code,path,e );
|
int err = load_amxscript(&amx,&code,path,e );
|
||||||
|
@ -59,10 +59,10 @@ public:
|
|||||||
|
|
||||||
AMX amx;
|
AMX amx;
|
||||||
void* code;
|
void* code;
|
||||||
String name;
|
CString name;
|
||||||
String version;
|
CString version;
|
||||||
String title;
|
CString title;
|
||||||
String author;
|
CString author;
|
||||||
int paused_fun;
|
int paused_fun;
|
||||||
int status;
|
int status;
|
||||||
CPlugin* next;
|
CPlugin* next;
|
||||||
@ -72,15 +72,15 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline const char* getName() const { return name.str();}
|
inline const char* getName() { return name.c_str();}
|
||||||
inline const char* getVersion() const { return version.str();}
|
inline const char* getVersion() { return version.c_str();}
|
||||||
inline const char* getTitle() const { return title.str();}
|
inline const char* getTitle() { return title.c_str();}
|
||||||
inline const char* getAuthor()const { return author.str();}
|
inline const char* getAuthor() { return author.c_str();}
|
||||||
inline int getId() const { return id; }
|
inline int getId() const { return id; }
|
||||||
inline AMX* getAMX() { return &amx; }
|
inline AMX* getAMX() { return &amx; }
|
||||||
inline void setTitle( const char* n ) { title.set(n); }
|
inline void setTitle( const char* n ) { title.assign(n); }
|
||||||
inline void setAuthor( const char* n ) { author.set(n); }
|
inline void setAuthor( const char* n ) { author.assign(n); }
|
||||||
inline void setVersion( const char* n ) { version.set(n); }
|
inline void setVersion( const char* n ) { version.assign(n); }
|
||||||
inline bool isValid() const { return ((status != ps_bad_load) && (status != ps_locked)); }
|
inline bool isValid() const { return ((status != ps_bad_load) && (status != ps_locked)); }
|
||||||
inline bool isPaused() const { return ( (status == ps_paused) || (status == ps_stopped)); }
|
inline bool isPaused() const { return ( (status == ps_paused) || (status == ps_stopped)); }
|
||||||
inline bool isFunctionPaused( int id ) const { return (paused_fun & (1<<id)) ? true : false; }
|
inline bool isFunctionPaused( int id ) const { return (paused_fun & (1<<id)) ? true : false; }
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
/* AMX Mod X
|
|
||||||
*
|
|
||||||
* by the AMX Mod X Development Team
|
|
||||||
* originally developed by OLO
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the
|
|
||||||
* Free Software Foundation; either version 2 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
|
||||||
* In addition, as a special exception, the author gives permission to
|
|
||||||
* link the code of this program with the Half-Life Game Engine ("HL
|
|
||||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
|
||||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
|
||||||
* respects for all of the code used other than the HL Engine and MODs
|
|
||||||
* from Valve. If you modify this file, you may extend this exception
|
|
||||||
* to your version of the file, but you are not obligated to do so. If
|
|
||||||
* you do not wish to do so, delete this exception statement from your
|
|
||||||
* version.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "string.h"
|
|
||||||
#include "amxmodx.h"
|
|
||||||
#include "CString.h"
|
|
||||||
#include "CFile.h"
|
|
||||||
|
|
||||||
String::String()
|
|
||||||
{
|
|
||||||
len = 0;
|
|
||||||
napis = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
String::String( const char* n )
|
|
||||||
{
|
|
||||||
napis = 0;
|
|
||||||
set(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
String::~String()
|
|
||||||
{
|
|
||||||
clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
void String::set( const char* n )
|
|
||||||
{
|
|
||||||
clear();
|
|
||||||
if ( n != 0 ){
|
|
||||||
len = strlen( n );
|
|
||||||
napis = new char[ len + 1 ];
|
|
||||||
if ( napis ) strcpy( napis , n );
|
|
||||||
else len = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void String::clear() {
|
|
||||||
delete[] napis;
|
|
||||||
napis = 0;
|
|
||||||
len = 0;
|
|
||||||
}
|
|
||||||
|
|
@ -29,30 +29,110 @@
|
|||||||
* version.
|
* version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRING_CUSTOM_H
|
#ifndef _INCLUDE_CSTRING_H
|
||||||
#define STRING_CUSTOM_H
|
#define _INCLUDE_CSTRING_H
|
||||||
|
|
||||||
// *****************************************************
|
//by David "BAILOPAN" Anderson
|
||||||
// class String
|
class CString
|
||||||
// *****************************************************
|
|
||||||
|
|
||||||
class String
|
|
||||||
{
|
{
|
||||||
char* napis;
|
|
||||||
short int len;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
String();
|
CString() { v = NULL; mSize = 0; }
|
||||||
String( const char* n );
|
~CString() { if (v) delete [] v; }
|
||||||
~String();
|
|
||||||
void set( const char* n );
|
//added these for amxx
|
||||||
inline bool empty() const { return (len == 0); }
|
CString(const char *src) { v = NULL; mSize = 0; assign(src); }
|
||||||
inline const char* str() const { return napis ? napis : "(null)"; }
|
CString(CString &src) { v = NULL; mSize = 0; assign(src.c_str()); }
|
||||||
inline short int size() const { return len; }
|
|
||||||
void clear();
|
const char *c_str() { return v?v:""; }
|
||||||
|
const char *c_str() const { return v?v:""; }
|
||||||
|
|
||||||
|
void append(const char *t)
|
||||||
|
{
|
||||||
|
Grow(strlen(v) + strlen(t));
|
||||||
|
strcat(v, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
void append(CString &d)
|
||||||
|
{
|
||||||
|
const char *t = d.c_str();
|
||||||
|
Grow(strlen(v) + strlen(t));
|
||||||
|
strcat(v, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
void assign(const char *d)
|
||||||
|
{
|
||||||
|
if (!d)
|
||||||
|
{
|
||||||
|
Grow(1);
|
||||||
|
strcpy(v, "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Grow(strlen(d));
|
||||||
|
if (v)
|
||||||
|
strcpy(v, d);
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear()
|
||||||
|
{
|
||||||
|
if (v)
|
||||||
|
delete [] v;
|
||||||
|
v = NULL;
|
||||||
|
mSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int compare (const char *d)
|
||||||
|
{
|
||||||
|
if (v) {
|
||||||
|
if (d) {
|
||||||
|
return strcmp(v, d);
|
||||||
|
} else {
|
||||||
|
return strlen(v);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (d) {
|
||||||
|
return strlen(d);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Added this for amxx inclusion
|
||||||
|
bool empty()
|
||||||
|
{
|
||||||
|
if (!v || !mSize)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int size()
|
||||||
|
{
|
||||||
|
if (!v)
|
||||||
|
return 0;
|
||||||
|
return strlen(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void Grow(int d)
|
||||||
|
{
|
||||||
|
if (d<1)
|
||||||
|
return;
|
||||||
|
if (d > mSize)
|
||||||
|
{
|
||||||
|
char *t = new char[d+1];
|
||||||
|
if (v) {
|
||||||
|
strcpy(t, v);
|
||||||
|
t[strlen(v)] = 0;
|
||||||
|
delete [] v;
|
||||||
|
}
|
||||||
|
v = t;
|
||||||
|
mSize = d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char *v;
|
||||||
|
int mSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif //_INCLUDE_CSTRING_H
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -60,7 +60,7 @@ void Vault::put( const char* k, const char* v )
|
|||||||
|
|
||||||
if ( *a )
|
if ( *a )
|
||||||
{
|
{
|
||||||
(*a)->value.set(v);
|
(*a)->value.assign(v);
|
||||||
(*a)->number = atoi( v );
|
(*a)->number = atoi( v );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -78,7 +78,7 @@ Vault::Obj** Vault::find( const char* n )
|
|||||||
|
|
||||||
while( *a )
|
while( *a )
|
||||||
{
|
{
|
||||||
if ( strcmp((*a)->key.str(), n) == 0 )
|
if ( strcmp((*a)->key.c_str(), n) == 0 )
|
||||||
return a;
|
return a;
|
||||||
|
|
||||||
a = &(*a)->next;
|
a = &(*a)->next;
|
||||||
@ -107,7 +107,7 @@ const char* Vault::get( const char* n )
|
|||||||
|
|
||||||
if ( b == 0 ) return "";
|
if ( b == 0 ) return "";
|
||||||
|
|
||||||
return b->value.str();
|
return b->value.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Vault::clear()
|
void Vault::clear()
|
||||||
@ -133,7 +133,7 @@ void Vault::remove( const char* n )
|
|||||||
|
|
||||||
void Vault::setSource( const char* n )
|
void Vault::setSource( const char* n )
|
||||||
{
|
{
|
||||||
path.set(n);
|
path.assign(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ bool Vault::loadVault( )
|
|||||||
|
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
File a( path.str() , "r" );
|
File a( path.c_str() , "r" );
|
||||||
|
|
||||||
if ( !a ) return false;
|
if ( !a ) return false;
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ bool Vault::saveVault( )
|
|||||||
{
|
{
|
||||||
if ( path.empty() ) return false;
|
if ( path.empty() ) return false;
|
||||||
|
|
||||||
File a( path.str() , "w" );
|
File a( path.c_str() , "w" );
|
||||||
|
|
||||||
if ( !a ) return false;
|
if ( !a ) return false;
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ class Vault
|
|||||||
{
|
{
|
||||||
struct Obj
|
struct Obj
|
||||||
{
|
{
|
||||||
String key;
|
CString key;
|
||||||
String value;
|
CString value;
|
||||||
int number;
|
int number;
|
||||||
Obj *next;
|
Obj *next;
|
||||||
Obj( const char* k, const char* v);
|
Obj( const char* k, const char* v);
|
||||||
} *head;
|
} *head;
|
||||||
|
|
||||||
String path;
|
CString path;
|
||||||
|
|
||||||
Obj** find( const char* n );
|
Obj** find( const char* n );
|
||||||
|
|
||||||
@ -79,8 +79,8 @@ public:
|
|||||||
iterator& operator++() { if ( a ) a = a->next; return *this; }
|
iterator& operator++() { if ( a ) a = a->next; return *this; }
|
||||||
bool operator==(const iterator& b) const { return a == b.a; }
|
bool operator==(const iterator& b) const { return a == b.a; }
|
||||||
bool operator!=(const iterator& b) const { return !operator==(b); }
|
bool operator!=(const iterator& b) const { return !operator==(b); }
|
||||||
String& key() const { return a->key; }
|
CString& key() const { return a->key; }
|
||||||
String& value() const { return a->value; }
|
CString& value() const { return a->value; }
|
||||||
};
|
};
|
||||||
|
|
||||||
inline iterator begin() const { return iterator(head); }
|
inline iterator begin() const { return iterator(head); }
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
* version.
|
* version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmodx.h"
|
||||||
|
|
||||||
@ -193,7 +192,7 @@ static cell AMX_NATIVE_CALL console_print(AMX *amx, cell *params) /* 2 param */
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL client_print(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL client_print(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int len;
|
int len = 0;
|
||||||
char *msg;
|
char *msg;
|
||||||
if (params[1] == 0)
|
if (params[1] == 0)
|
||||||
{
|
{
|
||||||
@ -310,7 +309,7 @@ static cell AMX_NATIVE_CALL get_user_name(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
return set_amxstring(amx,params[2],(index<1||index>gpGlobals->maxClients) ?
|
return set_amxstring(amx,params[2],(index<1||index>gpGlobals->maxClients) ?
|
||||||
hostname->string : g_players[index].name.str() , params[3]);
|
hostname->string : g_players[index].name.c_str() , params[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_user_index(AMX *amx, cell *params) /* 1 param */
|
static cell AMX_NATIVE_CALL get_user_index(AMX *amx, cell *params) /* 1 param */
|
||||||
@ -319,7 +318,7 @@ static cell AMX_NATIVE_CALL get_user_index(AMX *amx, cell *params) /* 1 param *
|
|||||||
char* sptemp = get_amxstring(amx,params[1],0,i);
|
char* sptemp = get_amxstring(amx,params[1],0,i);
|
||||||
for(i = 1; i <= gpGlobals->maxClients; ++i) {
|
for(i = 1; i <= gpGlobals->maxClients; ++i) {
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
||||||
if ( strcmp(pPlayer->name.str(), sptemp) == 0 )
|
if ( strcmp(pPlayer->name.c_str(), sptemp) == 0 )
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,7 +470,7 @@ static cell AMX_NATIVE_CALL get_weaponname(AMX *amx, cell *params) /* 3 param */
|
|||||||
amx_RaiseError(amx,AMX_ERR_NATIVE);
|
amx_RaiseError(amx,AMX_ERR_NATIVE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return set_amxstring(amx,params[2],g_weaponsData[index].fullName.str(),params[3]);
|
return set_amxstring(amx,params[2],g_weaponsData[index].fullName.c_str(),params[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_user_weapons(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_weapons(AMX *amx, cell *params) /* 3 param */
|
||||||
@ -554,7 +553,7 @@ static cell AMX_NATIVE_CALL get_user_ip(AMX *amx, cell *params) /* 3 param */
|
|||||||
char *ptr;
|
char *ptr;
|
||||||
char szIp[32];
|
char szIp[32];
|
||||||
strcpy(szIp,(index<1||index>gpGlobals->maxClients)?
|
strcpy(szIp,(index<1||index>gpGlobals->maxClients)?
|
||||||
CVAR_GET_STRING("net_address"):g_players[index].ip.str());
|
CVAR_GET_STRING("net_address"):g_players[index].ip.c_str());
|
||||||
if (params[4] && (ptr = strstr(szIp,":"))!=0)
|
if (params[4] && (ptr = strstr(szIp,":"))!=0)
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
return set_amxstring(amx,params[2],szIp,params[3]);
|
return set_amxstring(amx,params[2],szIp,params[3]);
|
||||||
@ -701,7 +700,7 @@ static cell AMX_NATIVE_CALL get_user_team(AMX *amx, cell *params) /* 3 param */
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if ( params[3] )
|
if ( params[3] )
|
||||||
set_amxstring(amx,params[2],pPlayer->team.str(),params[3]);
|
set_amxstring(amx,params[2],pPlayer->team.c_str(),params[3]);
|
||||||
|
|
||||||
return pPlayer->teamId;
|
return pPlayer->teamId;
|
||||||
}
|
}
|
||||||
@ -1248,7 +1247,7 @@ static cell AMX_NATIVE_CALL log_to_file(AMX *amx, cell *params) /* 1 param */
|
|||||||
int ilen;
|
int ilen;
|
||||||
char* szFile = get_amxstring(amx,params[1],0,ilen);
|
char* szFile = get_amxstring(amx,params[1],0,ilen);
|
||||||
FILE*fp;
|
FILE*fp;
|
||||||
const char* filename = build_pathname("%s/%s",g_log_dir.str(),szFile);
|
const char* filename = build_pathname("%s/%s",g_log_dir.c_str(),szFile);
|
||||||
bool first_time = true;
|
bool first_time = true;
|
||||||
if ((fp=fopen(filename,"r"))!=NULL){
|
if ((fp=fopen(filename,"r"))!=NULL){
|
||||||
first_time = false;
|
first_time = false;
|
||||||
@ -1270,11 +1269,11 @@ static cell AMX_NATIVE_CALL log_to_file(AMX *amx, cell *params) /* 1 param */
|
|||||||
if ( first_time ){
|
if ( first_time ){
|
||||||
char game_dir[512];
|
char game_dir[512];
|
||||||
GET_GAME_DIR(game_dir);
|
GET_GAME_DIR(game_dir);
|
||||||
filename = build_pathname("%s/%s",g_log_dir.str(),szFile);
|
filename = build_pathname("%s/%s",g_log_dir.c_str(),szFile);
|
||||||
fprintf(fp,"L %s: Log file started (file \"%s\") (game \"%s\") (amx \"%s\")\n",
|
fprintf(fp,"L %s: Log file started (file \"%s\") (game \"%s\") (amx \"%s\")\n",
|
||||||
date,filename,g_mod_name.str(),Plugin_info.version);
|
date,filename,g_mod_name.c_str(),Plugin_info.version);
|
||||||
print_srvconsole("L %s: Log file started (file \"%s\") (game \"%s\") (amx \"%s\")\n",
|
print_srvconsole("L %s: Log file started (file \"%s\") (game \"%s\") (amx \"%s\")\n",
|
||||||
date,filename,g_mod_name.str(),Plugin_info.version);
|
date,filename,g_mod_name.c_str(),Plugin_info.version);
|
||||||
}
|
}
|
||||||
fprintf(fp,"L %s: %s",date,message);
|
fprintf(fp,"L %s: %s",date,message);
|
||||||
print_srvconsole("L %s: %s",date,message);
|
print_srvconsole("L %s: %s",date,message);
|
||||||
@ -1442,18 +1441,18 @@ static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */
|
|||||||
continue;
|
continue;
|
||||||
/*if ( flags & 16 ) {
|
/*if ( flags & 16 ) {
|
||||||
if (flags & 64){
|
if (flags & 64){
|
||||||
if (strcmpi(pPlayer->team.str(),sptemp))
|
if (strcmpi(pPlayer->team.c_str(),sptemp))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (strcmp(pPlayer->team.str(),sptemp))
|
else if (strcmp(pPlayer->team.c_str(),sptemp))
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}*/
|
||||||
if (flags & 32){
|
if (flags & 32){
|
||||||
if (flags & 64){
|
if (flags & 64){
|
||||||
if (stristr(pPlayer->name.str(),sptemp)==NULL)
|
if (stristr(pPlayer->name.c_str(),sptemp)==NULL)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (strstr(pPlayer->name.str(),sptemp)==NULL)
|
else if (strstr(pPlayer->name.c_str(),sptemp)==NULL)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aPlayers[iNum++] = i;
|
aPlayers[iNum++] = i;
|
||||||
@ -1484,18 +1483,18 @@ static cell AMX_NATIVE_CALL find_player(AMX *amx, cell *params) /* 1 param */
|
|||||||
continue;
|
continue;
|
||||||
if (flags&1){
|
if (flags&1){
|
||||||
if (flags&2048) {
|
if (flags&2048) {
|
||||||
if (strcmpi(pPlayer->name.str(),sptemp))
|
if (strcmpi(pPlayer->name.c_str(),sptemp))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (strcmp(pPlayer->name.str(),sptemp))
|
else if (strcmp(pPlayer->name.c_str(),sptemp))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (flags&2){
|
if (flags&2){
|
||||||
if (flags&2048) {
|
if (flags&2048) {
|
||||||
if (stristr(pPlayer->name.str(),sptemp)==NULL)
|
if (stristr(pPlayer->name.c_str(),sptemp)==NULL)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (strstr(pPlayer->name.str(),sptemp)==NULL)
|
else if (strstr(pPlayer->name.c_str(),sptemp)==NULL)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (flags&4){
|
if (flags&4){
|
||||||
@ -1508,15 +1507,15 @@ static cell AMX_NATIVE_CALL find_player(AMX *amx, cell *params) /* 1 param */
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (flags&8){
|
if (flags&8){
|
||||||
if (strncmp(pPlayer->ip.str(),sptemp,ilen))
|
if (strncmp(pPlayer->ip.c_str(),sptemp,ilen))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (flags&16){
|
if (flags&16){
|
||||||
if (flags&2048) {
|
if (flags&2048) {
|
||||||
if (strcmpi(pPlayer->team.str(),sptemp))
|
if (strcmpi(pPlayer->team.c_str(),sptemp))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (strcmp(pPlayer->team.str(),sptemp))
|
else if (strcmp(pPlayer->team.c_str(),sptemp))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result = i;
|
result = i;
|
||||||
@ -1546,7 +1545,7 @@ static cell AMX_NATIVE_CALL get_mapname(AMX *amx, cell *params) /* 2 param */
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_modname(AMX *amx, cell *params) /* 2 param */
|
static cell AMX_NATIVE_CALL get_modname(AMX *amx, cell *params) /* 2 param */
|
||||||
{
|
{
|
||||||
return set_amxstring(amx,params[1],g_mod_name.str(),params[2]);
|
return set_amxstring(amx,params[1],g_mod_name.c_str(),params[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void UTIL_ShowMenu( edict_t* pEntity, int slots, int time, char *menu, int mlen
|
|||||||
#define GET_PLAYER_POINTER_I(i) (&g_players[i])
|
#define GET_PLAYER_POINTER_I(i) (&g_players[i])
|
||||||
|
|
||||||
struct WeaponsVault {
|
struct WeaponsVault {
|
||||||
String fullName;
|
CString fullName;
|
||||||
short int iId;
|
short int iId;
|
||||||
short int ammoSlot;
|
short int ammoSlot;
|
||||||
};
|
};
|
||||||
@ -145,8 +145,8 @@ extern Grenades g_grenades;
|
|||||||
extern LogEventsMngr g_logevents;
|
extern LogEventsMngr g_logevents;
|
||||||
extern MenuMngr g_menucmds;
|
extern MenuMngr g_menucmds;
|
||||||
extern CLangMngr g_langMngr;
|
extern CLangMngr g_langMngr;
|
||||||
extern String g_log_dir;
|
extern CString g_log_dir;
|
||||||
extern String g_mod_name;
|
extern CString g_mod_name;
|
||||||
extern TeamIds g_teamsIds;
|
extern TeamIds g_teamsIds;
|
||||||
extern Vault g_vault;
|
extern Vault g_vault;
|
||||||
extern CForwardMngr g_forwards;
|
extern CForwardMngr g_forwards;
|
||||||
|
@ -56,11 +56,11 @@ void CLog::CloseFile()
|
|||||||
// log "log file closed" to old file, if any
|
// log "log file closed" to old file, if any
|
||||||
if (!m_LogFile.empty())
|
if (!m_LogFile.empty())
|
||||||
{
|
{
|
||||||
FILE *fp = fopen(m_LogFile.str(), "r");
|
FILE *fp = fopen(m_LogFile.c_str(), "r");
|
||||||
if (fp)
|
if (fp)
|
||||||
{
|
{
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
fopen(m_LogFile.str(), "a+");
|
fopen(m_LogFile.c_str(), "a+");
|
||||||
|
|
||||||
// get time
|
// get time
|
||||||
time_t td;
|
time_t td;
|
||||||
@ -88,36 +88,36 @@ void CLog::CreateNewFile()
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
m_LogFile.set(build_pathname("%s/L%02d%02d%03d.log", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday, i));
|
m_LogFile.assign(build_pathname("%s/L%02d%02d%03d.log", g_log_dir.c_str(), curTime->tm_mon + 1, curTime->tm_mday, i));
|
||||||
FILE *pTmpFile = fopen(m_LogFile.str(), "r"); // open for reading to check whether the file exists
|
FILE *pTmpFile = fopen(m_LogFile.c_str(), "r"); // open for reading to check whether the file exists
|
||||||
if (!pTmpFile)
|
if (!pTmpFile)
|
||||||
break;
|
break;
|
||||||
fclose(pTmpFile);
|
fclose(pTmpFile);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
// Log logfile start
|
// Log logfile start
|
||||||
FILE *fp = fopen(m_LogFile.str(), "w");
|
FILE *fp = fopen(m_LogFile.c_str(), "w");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
ALERT(at_logged, "[AMXX] Unexpected fatal logging error. AMXX Logging disabled.\n");
|
ALERT(at_logged, "[AMXX] Unexpected fatal logging error. AMXX Logging disabled.\n");
|
||||||
SET_LOCALINFO("amxx_logging", "0");
|
SET_LOCALINFO("amxx_logging", "0");
|
||||||
}
|
}
|
||||||
fprintf(fp, "AMX Mod X log file started (file \"%s/L%02d%02d%03d.log\") (version \"%s\")\n", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday, i, AMX_VERSION);
|
fprintf(fp, "AMX Mod X log file started (file \"%s/L%02d%02d%03d.log\") (version \"%s\")\n", g_log_dir.c_str(), curTime->tm_mon + 1, curTime->tm_mday, i, AMX_VERSION);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLog::UseFile(const String &fileName)
|
void CLog::UseFile(const CString &fileName)
|
||||||
{
|
{
|
||||||
m_LogFile.set(build_pathname("%s/%s", g_log_dir.str(), fileName.str()));
|
m_LogFile.assign(build_pathname("%s/%s", g_log_dir.c_str(), fileName.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLog::MapChange()
|
void CLog::MapChange()
|
||||||
{
|
{
|
||||||
// create dir if not existing
|
// create dir if not existing
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
mkdir(build_pathname("%s", g_log_dir.str()), 0700);
|
mkdir(build_pathname("%s", g_log_dir.c_str()), 0700);
|
||||||
#else
|
#else
|
||||||
mkdir(build_pathname("%s", g_log_dir.str()));
|
mkdir(build_pathname("%s", g_log_dir.c_str()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_LogType = atoi(get_localinfo("amxx_logging", "1"));
|
m_LogType = atoi(get_localinfo("amxx_logging", "1"));
|
||||||
@ -164,14 +164,14 @@ void CLog::Log(const char *fmt, ...)
|
|||||||
FILE *pF;
|
FILE *pF;
|
||||||
if (m_LogType == 2)
|
if (m_LogType == 2)
|
||||||
{
|
{
|
||||||
pF = fopen(m_LogFile.str(), "a+");
|
pF = fopen(m_LogFile.c_str(), "a+");
|
||||||
if (!pF)
|
if (!pF)
|
||||||
{
|
{
|
||||||
CreateNewFile();
|
CreateNewFile();
|
||||||
pF = fopen(m_LogFile.str(), "a+");
|
pF = fopen(m_LogFile.c_str(), "a+");
|
||||||
if (!pF)
|
if (!pF)
|
||||||
{
|
{
|
||||||
ALERT(at_logged, "[AMXX] Unexpected fatal logging error (couldn't open %s for a+). AMXX Logging disabled for this map.\n", m_LogFile.str());
|
ALERT(at_logged, "[AMXX] Unexpected fatal logging error (couldn't open %s for a+). AMXX Logging disabled for this map.\n", m_LogFile.c_str());
|
||||||
m_LogType = 0;
|
m_LogType = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ void CLog::Log(const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pF = fopen(build_pathname("%s/L%02d%02d.log", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday), "a+");
|
pF = fopen(build_pathname("%s/L%02d%02d.log", g_log_dir.c_str(), curTime->tm_mon + 1, curTime->tm_mday), "a+");
|
||||||
}
|
}
|
||||||
fprintf(pF, "L %s: %s\n", date, msg);
|
fprintf(pF, "L %s: %s\n", date, msg);
|
||||||
|
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
class CLog
|
class CLog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
String m_LogFile;
|
CString m_LogFile;
|
||||||
int m_LogType;
|
int m_LogType;
|
||||||
|
|
||||||
void GetLastFile(int &outMonth, int &outDay, String &outFilename);
|
void GetLastFile(int &outMonth, int &outDay, CString &outFilename);
|
||||||
void UseFile(const String &fileName);
|
void UseFile(const CString &fileName);
|
||||||
public:
|
public:
|
||||||
CLog();
|
CLog();
|
||||||
~CLog();
|
~CLog();
|
||||||
|
@ -90,7 +90,7 @@ void Client_TeamInfo(void* mValue)
|
|||||||
case 1:
|
case 1:
|
||||||
if ( index < 1 || index > gpGlobals->maxClients ) break;
|
if ( index < 1 || index > gpGlobals->maxClients ) break;
|
||||||
char* msg = (char*)mValue;
|
char* msg = (char*)mValue;
|
||||||
g_players[ index ].team.set( msg );
|
g_players[ index ].team.assign( msg );
|
||||||
g_teamsIds.registerTeam( msg , -1 );
|
g_teamsIds.registerTeam( msg , -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,7 +169,7 @@ void Client_WeaponList(void* mValue)
|
|||||||
wpnList |= (1<<iId);
|
wpnList |= (1<<iId);
|
||||||
g_weaponsData[iId].iId = iId;
|
g_weaponsData[iId].iId = iId;
|
||||||
g_weaponsData[iId].ammoSlot = iSlot;
|
g_weaponsData[iId].ammoSlot = iSlot;
|
||||||
g_weaponsData[iId].fullName.set(wpnName);
|
g_weaponsData[iId].fullName.assign(wpnName);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -243,7 +243,7 @@ void Client_ScoreInfo(void* mValue)
|
|||||||
pPlayer->deaths = deaths;
|
pPlayer->deaths = deaths;
|
||||||
pPlayer->teamId = *(int*)mValue;
|
pPlayer->teamId = *(int*)mValue;
|
||||||
if ( g_teamsIds.isNewTeam() )
|
if ( g_teamsIds.isNewTeam() )
|
||||||
g_teamsIds.registerTeam( pPlayer->team.str() , pPlayer->teamId );
|
g_teamsIds.registerTeam( pPlayer->team.c_str() , pPlayer->teamId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ void Client_DamageEnd(void* mValue)
|
|||||||
g_events.parseValue( dead->death_killer );
|
g_events.parseValue( dead->death_killer );
|
||||||
g_events.parseValue( dead->index );
|
g_events.parseValue( dead->index );
|
||||||
g_events.parseValue( dead->death_headshot );
|
g_events.parseValue( dead->death_headshot );
|
||||||
g_events.parseValue( dead->death_weapon.str() );
|
g_events.parseValue( dead->death_weapon.c_str() );
|
||||||
g_events.parseValue( dead->death_tk ? 1 : 0 );
|
g_events.parseValue( dead->death_tk ? 1 : 0 );
|
||||||
g_events.executeEvents();
|
g_events.executeEvents();
|
||||||
dead->death_killer = 0;
|
dead->death_killer = 0;
|
||||||
@ -291,7 +291,7 @@ void Client_DeathMsg(void* mValue)
|
|||||||
if ( !killer || !victim ) break;
|
if ( !killer || !victim ) break;
|
||||||
|
|
||||||
victim->death_killer = killer_id;
|
victim->death_killer = killer_id;
|
||||||
victim->death_weapon.set((char*)mValue);
|
victim->death_weapon.assign((char*)mValue);
|
||||||
victim->death_headshot = hs;
|
victim->death_headshot = hs;
|
||||||
victim->death_tk = (killer->teamId == victim->teamId);
|
victim->death_tk = (killer->teamId == victim->teamId);
|
||||||
}
|
}
|
||||||
|
@ -2319,7 +2319,7 @@ enginefuncs_t g_EngineFunctionTable_Post =
|
|||||||
// ***** CFakeMetaPlugin
|
// ***** CFakeMetaPlugin
|
||||||
CFakeMeta::CFakeMetaPlugin::CFakeMetaPlugin(const char *path)
|
CFakeMeta::CFakeMetaPlugin::CFakeMetaPlugin(const char *path)
|
||||||
{
|
{
|
||||||
m_Path.set(path);
|
m_Path.assign(path);
|
||||||
m_Status = PL_EMPTY;
|
m_Status = PL_EMPTY;
|
||||||
m_Info = NULL;
|
m_Info = NULL;
|
||||||
memset((void *)&m_DllFuncTable, 0, sizeof(DLL_FUNCTIONS));
|
memset((void *)&m_DllFuncTable, 0, sizeof(DLL_FUNCTIONS));
|
||||||
@ -2345,7 +2345,7 @@ int CFakeMeta::CFakeMetaPlugin::Query(mutil_funcs_t *pMetaUtilFuncs)
|
|||||||
{
|
{
|
||||||
// Load the library
|
// Load the library
|
||||||
// We don't have to DLCLOSE here.
|
// We don't have to DLCLOSE here.
|
||||||
m_Handle = DLOPEN(build_pathname("%s", m_Path.str()));
|
m_Handle = DLOPEN(build_pathname("%s", m_Path.c_str()));
|
||||||
if (!m_Handle)
|
if (!m_Handle)
|
||||||
{
|
{
|
||||||
m_Status = PL_BADFILE;
|
m_Status = PL_BADFILE;
|
||||||
@ -2360,25 +2360,25 @@ int CFakeMeta::CFakeMetaPlugin::Query(mutil_funcs_t *pMetaUtilFuncs)
|
|||||||
bool missingFunc = false;
|
bool missingFunc = false;
|
||||||
if (!queryFn)
|
if (!queryFn)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a Query function.", m_Path.str());
|
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a Query function.", m_Path.c_str());
|
||||||
missingFunc = true;
|
missingFunc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!giveEngFuncsFn)
|
if (!giveEngFuncsFn)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a GiveFnptrsToDll function.", m_Path.str());
|
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a GiveFnptrsToDll function.", m_Path.c_str());
|
||||||
missingFunc = true;
|
missingFunc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also check for Attach and Detach
|
// Also check for Attach and Detach
|
||||||
if (DLSYM(m_Handle, "Meta_Attach") == NULL)
|
if (DLSYM(m_Handle, "Meta_Attach") == NULL)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a Meta_Attach function.", m_Path.str());
|
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a Meta_Attach function.", m_Path.c_str());
|
||||||
missingFunc = true;
|
missingFunc = true;
|
||||||
}
|
}
|
||||||
if (DLSYM(m_Handle, "Meta_Detach") == NULL)
|
if (DLSYM(m_Handle, "Meta_Detach") == NULL)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a Meta_Detach function.", m_Path.str());
|
AMXXLOG_Log("[AMXX] Module \"%s\" doesn't provide a Meta_Detach function.", m_Path.c_str());
|
||||||
missingFunc = true;
|
missingFunc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2391,7 +2391,7 @@ int CFakeMeta::CFakeMetaPlugin::Query(mutil_funcs_t *pMetaUtilFuncs)
|
|||||||
|
|
||||||
if (queryFn(META_INTERFACE_VERSION, &m_Info, pMetaUtilFuncs) != 1)
|
if (queryFn(META_INTERFACE_VERSION, &m_Info, pMetaUtilFuncs) != 1)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Query Module \"%s\" failed.", m_Path.str());
|
AMXXLOG_Log("[AMXX] Query Module \"%s\" failed.", m_Path.c_str());
|
||||||
m_Status = PL_BADFILE;
|
m_Status = PL_BADFILE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2413,7 +2413,7 @@ int CFakeMeta::CFakeMetaPlugin::Attach(PLUG_LOADTIME now, meta_globals_t *pMGlob
|
|||||||
}
|
}
|
||||||
if (attachFn(now, &m_MetaFuncTable, pMGlobals, pGameDllFuncs) != 1)
|
if (attachFn(now, &m_MetaFuncTable, pMGlobals, pGameDllFuncs) != 1)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Can't Attach Module \"%s\" (\"%s\").", m_Info->name, m_Path.str());
|
AMXXLOG_Log("[AMXX] Can't Attach Module \"%s\" (\"%s\").", m_Info->name, m_Path.c_str());
|
||||||
m_Status = PL_FAILED;
|
m_Status = PL_FAILED;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2435,7 +2435,7 @@ int CFakeMeta::CFakeMetaPlugin::Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reaso
|
|||||||
}
|
}
|
||||||
if (detachFn(now, reason) != 1)
|
if (detachFn(now, reason) != 1)
|
||||||
{
|
{
|
||||||
AMXXLOG_Log("[AMXX] Can't Detach Module \"%s\" (\"%s\").", m_Info->name, m_Path.str());
|
AMXXLOG_Log("[AMXX] Can't Detach Module \"%s\" (\"%s\").", m_Info->name, m_Path.c_str());
|
||||||
m_Status = PL_FAILED;
|
m_Status = PL_FAILED;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2452,7 +2452,7 @@ int CFakeMeta::CFakeMetaPlugin::Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reaso
|
|||||||
{ \
|
{ \
|
||||||
if (!m_MetaFuncTable.pfn##getFunc(&table, &ifVers)) \
|
if (!m_MetaFuncTable.pfn##getFunc(&table, &ifVers)) \
|
||||||
{ \
|
{ \
|
||||||
AMXXLOG_Log("[AMXX] Failed calling \"%s\" in module \"%s\" (\"%s\")", #getFunc, m_Info->name, m_Path.str()); \
|
AMXXLOG_Log("[AMXX] Failed calling \"%s\" in module \"%s\" (\"%s\")", #getFunc, m_Info->name, m_Path.c_str()); \
|
||||||
return 0; \
|
return 0; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// plugin info
|
// plugin info
|
||||||
String m_Path;
|
CString m_Path;
|
||||||
PLUG_STATUS m_Status;
|
PLUG_STATUS m_Status;
|
||||||
plugin_info_t *m_Info;
|
plugin_info_t *m_Info;
|
||||||
// Function tables
|
// Function tables
|
||||||
@ -104,8 +104,8 @@ public:
|
|||||||
inline void SetInfo(plugin_info_t *newInfo)
|
inline void SetInfo(plugin_info_t *newInfo)
|
||||||
{ m_Info = newInfo; }
|
{ m_Info = newInfo; }
|
||||||
|
|
||||||
inline const char * GetPath() const
|
inline const char * GetPath()
|
||||||
{ return m_Path.str(); }
|
{ return m_Path.c_str(); }
|
||||||
|
|
||||||
inline const META_FUNCTIONS &GetMetaFunctions() const
|
inline const META_FUNCTIONS &GetMetaFunctions() const
|
||||||
{ return m_MetaFuncTable; }
|
{ return m_MetaFuncTable; }
|
||||||
|
@ -73,8 +73,8 @@ Grenades g_grenades;
|
|||||||
LogEventsMngr g_logevents;
|
LogEventsMngr g_logevents;
|
||||||
MenuMngr g_menucmds;
|
MenuMngr g_menucmds;
|
||||||
CLangMngr g_langMngr;
|
CLangMngr g_langMngr;
|
||||||
String g_log_dir;
|
CString g_log_dir;
|
||||||
String g_mod_name;
|
CString g_mod_name;
|
||||||
XVars g_xvars;
|
XVars g_xvars;
|
||||||
bool g_bmod_cstrike;
|
bool g_bmod_cstrike;
|
||||||
bool g_bmod_dod;
|
bool g_bmod_dod;
|
||||||
@ -91,7 +91,7 @@ float g_auth_time;
|
|||||||
#ifdef MEMORY_TEST
|
#ifdef MEMORY_TEST
|
||||||
float g_next_memreport_time;
|
float g_next_memreport_time;
|
||||||
unsigned int g_memreport_count;
|
unsigned int g_memreport_count;
|
||||||
String g_memreport_dir;
|
CString g_memreport_dir;
|
||||||
bool g_memreport_enabled;
|
bool g_memreport_enabled;
|
||||||
#define MEMREPORT_INTERVAL 300.0f /* 5 mins */
|
#define MEMREPORT_INTERVAL 300.0f /* 5 mins */
|
||||||
#endif // MEMORY_TEST
|
#endif // MEMORY_TEST
|
||||||
@ -480,10 +480,10 @@ void C_ServerDeactivate_Post() {
|
|||||||
char buffer[256];
|
char buffer[256];
|
||||||
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
mkdir(build_pathname("%s", g_log_dir.str()), 0700);
|
mkdir(build_pathname("%s", g_log_dir.c_str()), 0700);
|
||||||
if (mkdir(build_pathname(buffer), 0700) < 0)
|
if (mkdir(build_pathname(buffer), 0700) < 0)
|
||||||
#else
|
#else
|
||||||
mkdir(build_pathname("%s", g_log_dir.str()));
|
mkdir(build_pathname("%s", g_log_dir.c_str()));
|
||||||
if (mkdir(build_pathname(buffer)) < 0)
|
if (mkdir(build_pathname(buffer)) < 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -501,13 +501,13 @@ void C_ServerDeactivate_Post() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_memreport_dir.set(buffer);
|
g_memreport_dir.assign(buffer);
|
||||||
// g_memreport_dir should be valid now
|
// g_memreport_dir should be valid now
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_dumpMemoryReport(build_pathname("%s/r%03d", g_memreport_dir.str(), g_memreport_count));
|
m_dumpMemoryReport(build_pathname("%s/r%03d", g_memreport_dir.c_str(), g_memreport_count));
|
||||||
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d\") (interval %f)", g_memreport_count + 1, g_memreport_dir.str(), g_memreport_count, MEMREPORT_INTERVAL);
|
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d\") (interval %f)", g_memreport_count + 1, g_memreport_dir.c_str(), g_memreport_count, MEMREPORT_INTERVAL);
|
||||||
g_memreport_count++;
|
g_memreport_count++;
|
||||||
}
|
}
|
||||||
#endif // MEMORY_TEST
|
#endif // MEMORY_TEST
|
||||||
@ -569,7 +569,7 @@ void C_ClientUserInfoChanged_Post( edict_t *pEntity, char *infobuffer ) {
|
|||||||
// Emulate bot connection and putinserver
|
// Emulate bot connection and putinserver
|
||||||
if ( pPlayer->ingame )
|
if ( pPlayer->ingame )
|
||||||
{
|
{
|
||||||
pPlayer->name.set(name); // Make sure player have name up to date
|
pPlayer->name.assign(name); // Make sure player have name up to date
|
||||||
}
|
}
|
||||||
else if ( pPlayer->IsBot() )
|
else if ( pPlayer->IsBot() )
|
||||||
{
|
{
|
||||||
@ -745,10 +745,10 @@ void C_StartFrame_Post( void ) {
|
|||||||
char buffer[256];
|
char buffer[256];
|
||||||
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
mkdir(build_pathname("%s", g_log_dir.str()), 0700);
|
mkdir(build_pathname("%s", g_log_dir.c_str()), 0700);
|
||||||
if (mkdir(build_pathname(buffer), 0700) < 0)
|
if (mkdir(build_pathname(buffer), 0700) < 0)
|
||||||
#else
|
#else
|
||||||
mkdir(build_pathname("%s", g_log_dir.str()));
|
mkdir(build_pathname("%s", g_log_dir.c_str()));
|
||||||
if (mkdir(build_pathname(buffer)) < 0)
|
if (mkdir(build_pathname(buffer)) < 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -766,13 +766,13 @@ void C_StartFrame_Post( void ) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_memreport_dir.set(buffer);
|
g_memreport_dir.assign(buffer);
|
||||||
// g_memreport_dir should be valid now
|
// g_memreport_dir should be valid now
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_dumpMemoryReport(build_pathname("%s/r%03d", g_memreport_dir.str(), g_memreport_count));
|
m_dumpMemoryReport(build_pathname("%s/r%03d", g_memreport_dir.c_str(), g_memreport_count));
|
||||||
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d\") (interval %f)", g_memreport_count + 1, g_memreport_dir.str(), g_memreport_count, MEMREPORT_INTERVAL);
|
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d\") (interval %f)", g_memreport_count + 1, g_memreport_dir.c_str(), g_memreport_count, MEMREPORT_INTERVAL);
|
||||||
g_memreport_count++;
|
g_memreport_count++;
|
||||||
}
|
}
|
||||||
#endif // MEMORY_TEST
|
#endif // MEMORY_TEST
|
||||||
@ -1038,7 +1038,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
|
|||||||
while ( gameDir[i] )
|
while ( gameDir[i] )
|
||||||
if (gameDir[i++] == '/')
|
if (gameDir[i++] == '/')
|
||||||
a = &gameDir[i];
|
a = &gameDir[i];
|
||||||
g_mod_name.set(a);
|
g_mod_name.assign(a);
|
||||||
|
|
||||||
// ###### Print short GPL
|
// ###### Print short GPL
|
||||||
print_srvconsole( "\n AMX Mod X version %s Copyright (c) 2004 AMX Mod X Development Team \n"
|
print_srvconsole( "\n AMX Mod X version %s Copyright (c) 2004 AMX Mod X Development Team \n"
|
||||||
@ -1053,14 +1053,14 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
|
|||||||
if ( amx_config.loadVault() ){
|
if ( amx_config.loadVault() ){
|
||||||
Vault::iterator a = amx_config.begin();
|
Vault::iterator a = amx_config.begin();
|
||||||
while ( a != amx_config.end() ) {
|
while ( a != amx_config.end() ) {
|
||||||
SET_LOCALINFO( (char*)a.key().str() , (char*)a.value().str() );
|
SET_LOCALINFO( (char*)a.key().c_str(), (char*)a.value().c_str() );
|
||||||
++a;
|
++a;
|
||||||
}
|
}
|
||||||
amx_config.clear();
|
amx_config.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ###### Initialize logging here
|
// ###### Initialize logging here
|
||||||
g_log_dir.set(get_localinfo("amxx_logs", "addons/amxx/logs"));
|
g_log_dir.assign(get_localinfo("amxx_logs", "addons/amxx/logs"));
|
||||||
|
|
||||||
// ###### Now attach metamod modules
|
// ###### Now attach metamod modules
|
||||||
// This will also call modules Meta_Query and Meta_Attach functions
|
// This will also call modules Meta_Query and Meta_Attach functions
|
||||||
@ -1205,7 +1205,7 @@ C_DLLEXPORT int GetEntityAPI2_Post( DLL_FUNCTIONS *pFunctionTable, int *interfac
|
|||||||
enginefuncs_t meta_engfuncs;
|
enginefuncs_t meta_engfuncs;
|
||||||
C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion ) {
|
C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion ) {
|
||||||
|
|
||||||
if ( stricmp(g_mod_name.str(),"cstrike") == 0 || stricmp(g_mod_name.str(),"czero")==0 )
|
if ( stricmp(g_mod_name.c_str(),"cstrike") == 0 || stricmp(g_mod_name.c_str(),"czero")==0 )
|
||||||
{
|
{
|
||||||
meta_engfuncs.pfnSetModel = C_SetModel;
|
meta_engfuncs.pfnSetModel = C_SetModel;
|
||||||
g_bmod_cstrike = true;
|
g_bmod_cstrike = true;
|
||||||
@ -1213,7 +1213,7 @@ C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *inte
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_bmod_cstrike = false;
|
g_bmod_cstrike = false;
|
||||||
g_bmod_dod = !stricmp(g_mod_name.str(),"dod");
|
g_bmod_dod = !stricmp(g_mod_name.c_str(),"dod");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ const char* get_amxscriptname(AMX* amx)
|
|||||||
|
|
||||||
void get_modname(char* buffer )
|
void get_modname(char* buffer )
|
||||||
{
|
{
|
||||||
strcpy( buffer , g_mod_name.str() );
|
strcpy( buffer , g_mod_name.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
char* build_pathname(char *fmt, ... )
|
char* build_pathname(char *fmt, ... )
|
||||||
@ -279,7 +279,7 @@ char* build_pathname(char *fmt, ... )
|
|||||||
#else
|
#else
|
||||||
"%s/",
|
"%s/",
|
||||||
#endif
|
#endif
|
||||||
g_mod_name.str());
|
g_mod_name.c_str());
|
||||||
|
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
va_start (argptr, fmt);
|
va_start (argptr, fmt);
|
||||||
@ -609,7 +609,7 @@ const char *MNF_GetModname(void)
|
|||||||
{
|
{
|
||||||
// :TODO: Do we have to do this??
|
// :TODO: Do we have to do this??
|
||||||
static char buffer[64];
|
static char buffer[64];
|
||||||
strcpy(buffer, g_mod_name.str());
|
strcpy(buffer, g_mod_name.c_str());
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,13 +713,13 @@ const char * MNF_GetPlayerName(int id)
|
|||||||
{
|
{
|
||||||
if (id < 1 || id > gpGlobals->maxClients)
|
if (id < 1 || id > gpGlobals->maxClients)
|
||||||
return NULL;
|
return NULL;
|
||||||
return GET_PLAYER_POINTER_I(id)->name.str();
|
return GET_PLAYER_POINTER_I(id)->name.c_str();
|
||||||
}
|
}
|
||||||
const char * MNF_GetPlayerIP(int id)
|
const char * MNF_GetPlayerIP(int id)
|
||||||
{
|
{
|
||||||
if (id < 1 || id > gpGlobals->maxClients)
|
if (id < 1 || id > gpGlobals->maxClients)
|
||||||
return NULL;
|
return NULL;
|
||||||
return GET_PLAYER_POINTER_I(id)->ip.str();
|
return GET_PLAYER_POINTER_I(id)->ip.c_str();
|
||||||
}
|
}
|
||||||
int MNF_IsPlayerInGame(int id)
|
int MNF_IsPlayerInGame(int id)
|
||||||
{
|
{
|
||||||
|
@ -637,9 +637,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\CPlugin.cpp">
|
RelativePath="..\CPlugin.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\CString.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\CTask.cpp">
|
RelativePath="..\CTask.cpp">
|
||||||
</File>
|
</File>
|
||||||
@ -741,6 +738,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\amxxfile.h">
|
RelativePath="..\amxxfile.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxxlog.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\CCmd.h">
|
RelativePath="..\CCmd.h">
|
||||||
</File>
|
</File>
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 7.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxmodx_mm", "amxmodx_mm.vcproj", "{CDD792EF-ABC5-4C61-803F-616E209C03D6}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxmodx_mm", "amxmodx_mm.vcproj", "{CDD792EF-ABC5-4C61-803F-616E209C03D6}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfiguration) = preSolution
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
ConfigName.0 = Debug
|
Debug = Debug
|
||||||
ConfigName.1 = JITDebug
|
JITDebug = JITDebug
|
||||||
ConfigName.2 = JITMemtestRelease
|
JITMemtestRelease = JITMemtestRelease
|
||||||
ConfigName.3 = JITRelease
|
JITRelease = JITRelease
|
||||||
ConfigName.4 = MaximalSpeed
|
MaximalSpeed = MaximalSpeed
|
||||||
ConfigName.5 = MemtestDebug
|
MemtestDebug = MemtestDebug
|
||||||
ConfigName.6 = MemtestRelease
|
MemtestRelease = MemtestRelease
|
||||||
ConfigName.7 = Release
|
Release = Release
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectDependencies) = postSolution
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
{CDD792EF-ABC5-4C61-803F-616E209C03D6}.Debug.ActiveCfg = Debug|Win32
|
{CDD792EF-ABC5-4C61-803F-616E209C03D6}.Debug.ActiveCfg = Debug|Win32
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.00"
|
Version="7.10"
|
||||||
Name="amxmodx_mm"
|
Name="amxmodx_mm"
|
||||||
SccProjectName=""
|
SccProjectName=""
|
||||||
SccLocalPath="">
|
SccLocalPath="">
|
||||||
@ -73,8 +73,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
@ -138,8 +144,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="MemtestDebug|Win32"
|
Name="MemtestDebug|Win32"
|
||||||
@ -204,8 +216,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="MemtestRelease|Win32"
|
Name="MemtestRelease|Win32"
|
||||||
@ -269,8 +287,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="JITDebug|Win32"
|
Name="JITDebug|Win32"
|
||||||
@ -335,8 +359,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="JITRelease|Win32"
|
Name="JITRelease|Win32"
|
||||||
@ -400,8 +430,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="JITMemtestRelease|Win32"
|
Name="JITMemtestRelease|Win32"
|
||||||
@ -465,8 +501,14 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="MaximalSpeed|Win32"
|
Name="MaximalSpeed|Win32"
|
||||||
@ -533,14 +575,37 @@
|
|||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||||
|
<File
|
||||||
|
RelativePath="..\amx.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxcore.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxmodx.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxtime.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxxlog.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\CCmd.cpp">
|
RelativePath="..\CCmd.cpp">
|
||||||
</File>
|
</File>
|
||||||
@ -577,21 +642,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\CVault.cpp">
|
RelativePath="..\CVault.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\amx.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxcore.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxmodx.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxtime.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxxlog.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\emsg.cpp">
|
RelativePath="..\emsg.cpp">
|
||||||
</File>
|
</File>
|
||||||
@ -675,6 +725,15 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
Filter="h;hpp;hxx;hm;inl">
|
||||||
|
<File
|
||||||
|
RelativePath="..\amx.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxmodx.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\amxxfile.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\CCmd.h">
|
RelativePath="..\CCmd.h">
|
||||||
</File>
|
</File>
|
||||||
@ -717,15 +776,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\CVector.h">
|
RelativePath="..\CVector.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\amx.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxmodx.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxxfile.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\fakemeta.h">
|
RelativePath="..\fakemeta.h">
|
||||||
</File>
|
</File>
|
||||||
|
Loading…
Reference in New Issue
Block a user