added linux support and fixed a few bugs in sdktools
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40962
This commit is contained in:
parent
0b9447d986
commit
212407d9f6
@ -9,12 +9,13 @@ SOURCEMM = ../../../../sourcemm
|
||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||
#####################################
|
||||
|
||||
PROJECT = sample
|
||||
PROJECT = sdktools.ext
|
||||
|
||||
#Uncomment for SourceMM-enabled extensions
|
||||
#LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
|
||||
|
||||
OBJECTS = sdk/smsdk_ext.cpp extension.cpp
|
||||
OBJECTS = sdk/smsdk_ext.cpp extension.cpp vdecoder.cpp vcallbuilder.cpp \
|
||||
vcaller.cpp vnatives.cpp
|
||||
|
||||
##############################################
|
||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||
@ -36,7 +37,7 @@ INCLUDE = -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2
|
||||
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(SMM_TRUNK) -I$(SMM_TRUNK)/sourcehook -I$(SMM_TRUNK)/sourcemm \
|
||||
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions \
|
||||
|
||||
CFLAGS = -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror -fPIC -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H
|
||||
CFLAGS = -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror -Wno-switch -Wno-unused -fPIC -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H
|
||||
CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
||||
|
||||
################################################
|
||||
|
@ -83,9 +83,9 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p
|
||||
void *addrInBase = NULL;
|
||||
if (params[1] == SDKLibrary_Server)
|
||||
{
|
||||
addrInBase = g_SMAPI->serverFactory(false);
|
||||
addrInBase = (void *)g_SMAPI->serverFactory(false);
|
||||
} else if (params[1] == SDKLibrary_Engine) {
|
||||
addrInBase = g_SMAPI->engineFactory(false);
|
||||
addrInBase = (void *)g_SMAPI->engineFactory(false);
|
||||
}
|
||||
if (addrInBase == NULL)
|
||||
{
|
||||
|
@ -145,9 +145,9 @@ DataStatus EncodeValveParam(IPluginContext *pContext,
|
||||
cell_t *addr;
|
||||
pContext->LocalToPhysAddr(param, &addr);
|
||||
|
||||
addr[0] = v->x;
|
||||
addr[1] = v->y;
|
||||
addr[2] = v->z;
|
||||
addr[0] = sp_ftoc(v->x);
|
||||
addr[1] = sp_ftoc(v->y);
|
||||
addr[2] = sp_ftoc(v->z);
|
||||
|
||||
return Data_Okay;
|
||||
}
|
||||
@ -165,9 +165,9 @@ DataStatus EncodeValveParam(IPluginContext *pContext,
|
||||
cell_t *addr;
|
||||
pContext->LocalToPhysAddr(param, &addr);
|
||||
|
||||
addr[0] = q->x;
|
||||
addr[1] = q->y;
|
||||
addr[2] = q->z;
|
||||
addr[0] = sp_ftoc(q->x);
|
||||
addr[1] = sp_ftoc(q->y);
|
||||
addr[2] = sp_ftoc(q->z);
|
||||
|
||||
return Data_Okay;
|
||||
}
|
||||
@ -380,7 +380,7 @@ DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
pContext->ThrowNativeError("Entity index %d is not a valid client", param);
|
||||
return Data_Fail;
|
||||
}
|
||||
CBaseEntity *pEntity;
|
||||
CBaseEntity *pEntity = NULL;
|
||||
if (pEdict)
|
||||
{
|
||||
IServerUnknown *pUnknown = pEdict->GetUnknown();
|
||||
@ -395,8 +395,6 @@ DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
pContext->ThrowNativeError("Entity %d is not a CBaseEntity");
|
||||
return Data_Fail;
|
||||
}
|
||||
} else {
|
||||
pEdict = NULL;
|
||||
}
|
||||
|
||||
CBaseEntity **ebuf = (CBaseEntity **)buffer;
|
||||
@ -450,7 +448,7 @@ DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
return Data_Fail;
|
||||
}
|
||||
}
|
||||
CBaseEntity *pEntity;
|
||||
CBaseEntity *pEntity = NULL;
|
||||
if (pEdict)
|
||||
{
|
||||
IServerUnknown *pUnknown = pEdict->GetUnknown();
|
||||
@ -465,8 +463,6 @@ DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
pContext->ThrowNativeError("Entity %d is not a CBaseEntity");
|
||||
return Data_Fail;
|
||||
}
|
||||
} else {
|
||||
pEdict = NULL;
|
||||
}
|
||||
|
||||
CBaseEntity **ebuf = (CBaseEntity **)buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user