Added support for Alien Swarm (bug 4530, r=dvander).

This commit is contained in:
Scott Ehlert
2010-07-27 17:32:32 -05:00
parent b3144dd19a
commit dd44a0aaea
24 changed files with 1185 additions and 139 deletions
+13 -3
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,6 +32,8 @@
#ifndef _INCLUDE_SOURCEMOD_COMPAT_WRAPPERS_H_
#define _INCLUDE_SOURCEMOD_COMPAT_WRAPPERS_H_
#include <datamap.h>
#if SOURCE_ENGINE >= SE_ORANGEBOX
#define CONVAR_REGISTER(object) ConVar_Register(0, object)
@@ -123,16 +125,20 @@
#if SOURCE_ENGINE >= SE_LEFT4DEAD
inline int IndexOfEdict(const edict_t *pEdict)
{
return (int)(pEdict - gpGlobals->baseEdict);
return (int)(pEdict - gpGlobals->pEdicts);
}
inline edict_t *PEntityOfEntIndex(int iEntIndex)
{
if (iEntIndex >= 0 && iEntIndex < gpGlobals->maxEntities)
{
return (edict_t *)(gpGlobals->baseEdict + iEntIndex);
return (edict_t *)(gpGlobals->pEdicts + iEntIndex);
}
return NULL;
}
inline int GetTypeDescOffs(typedescription_t *td)
{
return td->fieldOffset;
}
#else
inline int IndexOfEdict(const edict_t *pEdict)
{
@@ -142,6 +148,10 @@
{
return engine->PEntityOfEntIndex(iEntIndex);
}
inline int GetTypeDescOffs(typedescription_t *td)
{
return td->fieldOffset[TD_OFFSET_NORMAL];
}
#endif //SOURCE_ENGINE >= SE_LEFT4DEAD
#endif //_INCLUDE_SOURCEMOD_COMPAT_WRAPPERS_H_
+2
View File
@@ -38,7 +38,9 @@
*/
#if defined WIN32 || defined WIN64
#ifndef PLATFORM_WINDOWS
#define PLATFORM_WINDOWS
#endif
#if !defined WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif