really fix min/max crap on linux. vpc tricked me by failing on client before ever getting to server

This commit is contained in:
Dexter 2014-03-18 06:13:23 +00:00 committed by squeek
parent 71a29f46ef
commit 5b3f36bda0
4 changed files with 38 additions and 6 deletions

View file

@ -106,7 +106,7 @@ $Project "Client (FF)"
//$File "$SRCDIR\game\client\ShaderEditor\Grass\CGrassCluster.h"
}
$Folder "Implementation Files"
$Folder "Implementation Files" // [$WIN32]
{
$File "$SRCDIR\game\client\ShaderEditor\ShaderEditorSystem.cpp"
$File "$SRCDIR\game\client\ShaderEditor\SEdit_ModelRender.cpp"

View file

@ -4,6 +4,7 @@
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "ff_sh_gamerules.h"
#include "viewport_panel_names.h"
@ -33,12 +34,31 @@
#include "hl2mp_cvars.h"
//#include "ff_sh_team_manager.h"
#include "ff_sv_info_ff_team_manager.h"
#include <vector>
#include "tier0/valve_minmax_off.h"
#include <vector>
#include "tier0/valve_minmax_on.h"
#ifdef DEBUG
#include "hl2mp_bot_temp.h"
#endif
// dexter HACK make sure valve minmax gets turned on for both server/client
// for some reason valve minmax on skips POSIX builds. editing valve_minmax_on blows
// stuff up
#if defined(POSIX)
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
#endif
#include "tier0/memdbgon.h"
extern void respawn(CBaseEntity *pEdict, bool fCopyCorpse);
extern bool FindInList( const char **pStrings, const char *pToFind );

View file

@ -2,10 +2,7 @@
#include "cbase.h"
#include "ff_sh_player.h"
// dexter: beware valve min/max messes up stl on gcc 4.2+
#include "tier0/valve_minmax_off.h"
#include <string>
#include "tier0/valve_minmax_on.h"
#include <string.h>
#define FF_COMMAND(cmd, desc) \
void CliCmdFunc_##cmd(const CCommand &args) \

View file

@ -11,6 +11,21 @@
#include "entitylist.h"
#endif
// dexter HACK make sure valve minmax gets turned on for both server/client
// for some reason valve minmax on skips POSIX builds. editing valve_minmax_on blows
// stuff up
#if defined(POSIX)
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
#endif
//#include "boost/assign.hpp"
// memdbgon must be the last include file in a .cpp file!!!