diff --git a/dlls/enginecallback.h b/dlls/enginecallback.h index 7712ceea..16c69117 100644 --- a/dlls/enginecallback.h +++ b/dlls/enginecallback.h @@ -95,15 +95,15 @@ EXPORT void DEBUG_MSG(ALERT_TYPE target, const char* format, ...); #if defined(PLUGIN_BUILD) && defined(PLUGIN_NAME) #define ALERT(target, fmt, ...) { \ - DEBUG_MSG(target, "[" PLUGIN_NAME "] "); \ - DEBUG_MSG(target, fmt, ##__VA_ARGS__ ); \ + DEBUG_MSG(target, "[" PLUGIN_NAME "] ", NULL); \ + DEBUG_MSG(target, fmt, ##__VA_ARGS__, NULL); \ } #else #define ALERT DEBUG_MSG #endif #define print(...) {ALERT(at_console, __VA_ARGS__);} -#define println(...) {ALERT(at_console, __VA_ARGS__); DEBUG_MSG(at_console, "\n");} +#define println(...) {ALERT(at_console, __VA_ARGS__); DEBUG_MSG(at_console, "\n", NULL);} #define ENGINE_FPRINTF (*g_engfuncs.pfnEngineFprintf) #define ALLOC_PRIVATE (*g_engfuncs.pfnPvAllocEntPrivateData) inline void *GET_PRIVATE( const edict_t *pent ) diff --git a/dlls/monster/CShockTrooper.cpp b/dlls/monster/CShockTrooper.cpp index eef78343..d7b225e2 100644 --- a/dlls/monster/CShockTrooper.cpp +++ b/dlls/monster/CShockTrooper.cpp @@ -964,8 +964,7 @@ void CShockTrooper::HandleAnimEvent(MonsterEvent_t* pEvent) GetAttachment(0, vecArmPos, vecArmAngles); - //MESSAGE_BEGIN(MSG_PVS, SVC_TEMPENTITY, vecArmPos); - MESSAGE_BEGIN(MSG_ALL, SVC_TEMPENTITY, vecArmPos); + MESSAGE_BEGIN(MSG_PVS, SVC_TEMPENTITY, vecArmPos); WRITE_BYTE(TE_SPRITE); WRITE_COORD(vecArmPos.x); WRITE_COORD(vecArmPos.y); diff --git a/dlls/net/Socket_unix.cpp b/dlls/net/Socket_unix.cpp index 6555803f..8b096035 100644 --- a/dlls/net/Socket_unix.cpp +++ b/dlls/net/Socket_unix.cpp @@ -39,7 +39,7 @@ SocketData * Socket::createSocket(const char * addr, const char * port) if (sock->sock == -1) { ALERT(at_console, "Socket creation failed\n"); - delete sock; + delete (SocketData*)sock; return NULL; } @@ -101,7 +101,7 @@ Socket::Socket(int socketType, IPV4 addr) if (ret == 0) { ALERT(at_console, "inet_aton() failed\n"); - delete sock; + delete (SocketData*)sock; return; } ALERT(at_console, "Created client socket on %s\n", addr.getString().c_str()); @@ -114,7 +114,7 @@ Socket::~Socket(void) if (sock != NULL) { close(sock->sock); - delete sock; + delete (SocketData*)sock; } } @@ -224,7 +224,7 @@ bool Socket::bind() { ALERT(at_console, "Socket listen failed with error: %s\n", strerror_r( err, buff, 256 )); close(sock->sock); - delete skt; + delete (SocketData*)skt; skt = NULL; return false; } diff --git a/dlls/net/Socket_win.cpp b/dlls/net/Socket_win.cpp index 7930b189..5458d7da 100644 --- a/dlls/net/Socket_win.cpp +++ b/dlls/net/Socket_win.cpp @@ -32,10 +32,10 @@ struct SocketData SocketData * Socket::createSocket(const char * addr, const char * port) { - SocketData * skt = new SocketData; + SocketData * sdat = new SocketData; // Resolve the local address and port to be used by the server addrinfo * hints = (socketType & SOCKET_TCP) ? &tcphints : &udphints; - int ret = getaddrinfo(addr, port, hints, &skt->addr); + int ret = getaddrinfo(addr, port, hints, &sdat->addr); if (ret != 0) { @@ -45,12 +45,12 @@ SocketData * Socket::createSocket(const char * addr, const char * port) } // create the socket - skt->sock = socket(skt->addr->ai_family, skt->addr->ai_socktype, skt->addr->ai_protocol); + sdat->sock = socket(sdat->addr->ai_family, sdat->addr->ai_socktype, sdat->addr->ai_protocol); - if (skt->sock == INVALID_SOCKET) + if (sdat->sock == INVALID_SOCKET) { ALERT(at_console, "Socket creation failed at socket(): %d\n", WSAGetLastError()); - freeaddrinfo(skt->addr); + freeaddrinfo(sdat->addr); delete skt; return NULL; } @@ -59,11 +59,11 @@ SocketData * Socket::createSocket(const char * addr, const char * port) if (!(socketType & SOCKET_BLOCKING)) { u_long iMode = 1; - ret = ioctlsocket(skt->sock, FIONBIO, &iMode); + ret = ioctlsocket(sdat->sock, FIONBIO, &iMode); if (ret == SOCKET_ERROR) { ALERT(at_console, "Failed to set socket to non-blocking: %d\n", WSAGetLastError()); - freeaddrinfo(skt->addr); + freeaddrinfo(sdat->addr); delete skt; return NULL; } @@ -72,10 +72,10 @@ SocketData * Socket::createSocket(const char * addr, const char * port) if (socketType & SOCKET_UDP) { BOOL bNewBehavior = FALSE; DWORD dwBytesReturned = 0; - WSAIoctl(skt->sock, WSAECONNRESET, &bNewBehavior, sizeof bNewBehavior, NULL, 0, &dwBytesReturned, NULL, NULL); + WSAIoctl(sdat->sock, WSAECONNRESET, &bNewBehavior, sizeof bNewBehavior, NULL, 0, &dwBytesReturned, NULL, NULL); } - return skt; + return sdat; } Socket::Socket()