1.1 --- a/core/smn_bitbuffer.cpp Fri Mar 29 12:28:02 2013 -0400
1.2 +++ b/core/smn_bitbuffer.cpp Fri Mar 29 11:37:29 2013 -0700
1.3 @@ -34,11 +34,12 @@
1.4 #ifndef USE_PROTOBUF_USERMESSAGES
1.5
1.6 #include "sourcemod.h"
1.7 -#include "HandleSys.h"
1.8 #include <bitbuf.h>
1.9 #include <vector.h>
1.10 #include <HalfLife2.h>
1.11 #include "smn_usermsgs.h"
1.12 +#include "sourcemod.h"
1.13 +#include "logic_bridge.h"
1.14
1.15 static cell_t smn_BfWriteBool(IPluginContext *pCtx, const cell_t *params)
1.16 {
1.17 @@ -50,7 +51,7 @@
1.18 sec.pOwner = NULL;
1.19 sec.pIdentity = g_pCoreIdent;
1.20
1.21 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.22 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.23 != HandleError_None)
1.24 {
1.25 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.26 @@ -71,7 +72,7 @@
1.27 sec.pOwner = NULL;
1.28 sec.pIdentity = g_pCoreIdent;
1.29
1.30 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.31 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.32 != HandleError_None)
1.33 {
1.34 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.35 @@ -92,7 +93,7 @@
1.36 sec.pOwner = NULL;
1.37 sec.pIdentity = g_pCoreIdent;
1.38
1.39 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.40 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.41 != HandleError_None)
1.42 {
1.43 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.44 @@ -113,7 +114,7 @@
1.45 sec.pOwner = NULL;
1.46 sec.pIdentity = g_pCoreIdent;
1.47
1.48 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.49 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.50 != HandleError_None)
1.51 {
1.52 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.53 @@ -134,7 +135,7 @@
1.54 sec.pOwner = NULL;
1.55 sec.pIdentity = g_pCoreIdent;
1.56
1.57 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.58 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.59 != HandleError_None)
1.60 {
1.61 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.62 @@ -155,7 +156,7 @@
1.63 sec.pOwner = NULL;
1.64 sec.pIdentity = g_pCoreIdent;
1.65
1.66 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.67 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.68 != HandleError_None)
1.69 {
1.70 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.71 @@ -176,7 +177,7 @@
1.72 sec.pOwner = NULL;
1.73 sec.pIdentity = g_pCoreIdent;
1.74
1.75 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.76 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.77 != HandleError_None)
1.78 {
1.79 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.80 @@ -198,7 +199,7 @@
1.81 sec.pOwner = NULL;
1.82 sec.pIdentity = g_pCoreIdent;
1.83
1.84 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.85 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.86 != HandleError_None)
1.87 {
1.88 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.89 @@ -226,7 +227,7 @@
1.90 sec.pOwner = NULL;
1.91 sec.pIdentity = g_pCoreIdent;
1.92
1.93 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.94 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.95 != HandleError_None)
1.96 {
1.97 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.98 @@ -254,7 +255,7 @@
1.99 sec.pOwner = NULL;
1.100 sec.pIdentity = g_pCoreIdent;
1.101
1.102 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.103 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.104 != HandleError_None)
1.105 {
1.106 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.107 @@ -275,7 +276,7 @@
1.108 sec.pOwner = NULL;
1.109 sec.pIdentity = g_pCoreIdent;
1.110
1.111 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.112 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.113 != HandleError_None)
1.114 {
1.115 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.116 @@ -296,7 +297,7 @@
1.117 sec.pOwner = NULL;
1.118 sec.pIdentity = g_pCoreIdent;
1.119
1.120 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.121 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.122 != HandleError_None)
1.123 {
1.124 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.125 @@ -320,7 +321,7 @@
1.126 sec.pOwner = NULL;
1.127 sec.pIdentity = g_pCoreIdent;
1.128
1.129 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.130 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.131 != HandleError_None)
1.132 {
1.133 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.134 @@ -344,7 +345,7 @@
1.135 sec.pOwner = NULL;
1.136 sec.pIdentity = g_pCoreIdent;
1.137
1.138 - if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.139 + if ((herr=handlesys->ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf))
1.140 != HandleError_None)
1.141 {
1.142 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.143 @@ -368,7 +369,7 @@
1.144 sec.pOwner = NULL;
1.145 sec.pIdentity = g_pCoreIdent;
1.146
1.147 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.148 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.149 != HandleError_None)
1.150 {
1.151 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.152 @@ -387,7 +388,7 @@
1.153 sec.pOwner = NULL;
1.154 sec.pIdentity = g_pCoreIdent;
1.155
1.156 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.157 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.158 != HandleError_None)
1.159 {
1.160 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.161 @@ -406,7 +407,7 @@
1.162 sec.pOwner = NULL;
1.163 sec.pIdentity = g_pCoreIdent;
1.164
1.165 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.166 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.167 != HandleError_None)
1.168 {
1.169 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.170 @@ -425,7 +426,7 @@
1.171 sec.pOwner = NULL;
1.172 sec.pIdentity = g_pCoreIdent;
1.173
1.174 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.175 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.176 != HandleError_None)
1.177 {
1.178 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.179 @@ -444,7 +445,7 @@
1.180 sec.pOwner = NULL;
1.181 sec.pIdentity = g_pCoreIdent;
1.182
1.183 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.184 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.185 != HandleError_None)
1.186 {
1.187 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.188 @@ -463,7 +464,7 @@
1.189 sec.pOwner = NULL;
1.190 sec.pIdentity = g_pCoreIdent;
1.191
1.192 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.193 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.194 != HandleError_None)
1.195 {
1.196 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.197 @@ -482,7 +483,7 @@
1.198 sec.pOwner = NULL;
1.199 sec.pIdentity = g_pCoreIdent;
1.200
1.201 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.202 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.203 != HandleError_None)
1.204 {
1.205 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.206 @@ -503,7 +504,7 @@
1.207 sec.pOwner = NULL;
1.208 sec.pIdentity = g_pCoreIdent;
1.209
1.210 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.211 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.212 != HandleError_None)
1.213 {
1.214 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.215 @@ -530,7 +531,7 @@
1.216 sec.pOwner = NULL;
1.217 sec.pIdentity = g_pCoreIdent;
1.218
1.219 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.220 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.221 != HandleError_None)
1.222 {
1.223 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.224 @@ -551,7 +552,7 @@
1.225 sec.pOwner = NULL;
1.226 sec.pIdentity = g_pCoreIdent;
1.227
1.228 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.229 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.230 != HandleError_None)
1.231 {
1.232 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.233 @@ -570,7 +571,7 @@
1.234 sec.pOwner = NULL;
1.235 sec.pIdentity = g_pCoreIdent;
1.236
1.237 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.238 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.239 != HandleError_None)
1.240 {
1.241 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.242 @@ -589,7 +590,7 @@
1.243 sec.pOwner = NULL;
1.244 sec.pIdentity = g_pCoreIdent;
1.245
1.246 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.247 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.248 != HandleError_None)
1.249 {
1.250 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.251 @@ -618,7 +619,7 @@
1.252 sec.pOwner = NULL;
1.253 sec.pIdentity = g_pCoreIdent;
1.254
1.255 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.256 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.257 != HandleError_None)
1.258 {
1.259 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.260 @@ -647,7 +648,7 @@
1.261 sec.pOwner = NULL;
1.262 sec.pIdentity = g_pCoreIdent;
1.263
1.264 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.265 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.266 != HandleError_None)
1.267 {
1.268 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);
1.269 @@ -676,7 +677,7 @@
1.270 sec.pOwner = NULL;
1.271 sec.pIdentity = g_pCoreIdent;
1.272
1.273 - if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.274 + if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf))
1.275 != HandleError_None)
1.276 {
1.277 return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr);