View Single Post
Re: YaPB Developer Preview 1.1
Old
  (#25)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: YaPB Developer Preview 1.1 - 31-03-2004

Terran, I wonder why you're doing this...
Code:
 +#ifdef _WIN32
  #define LINK_ENTITY_TO_GAME(mapClassName) \
 - extern "C" EXPORT void mapClassName( entvars_t *pev ) { \
 -	static LINK_ENTITY_GAME otherClassName = NULL; \
 -	if (otherClassName == NULL) \
 -	   otherClassName = (LINK_ENTITY_GAME)GetProcAddress(h_Library, #mapClassName); \
 -	if (otherClassName == NULL) \
 -	   return; \
 -	(*otherClassName)(pev); }
 +	extern "C" __declspec(dllexport) void mapClassName( entvars_t *pev ) { \
 +	static LINK_ENTITY_GAME otherClassName = NULL; \
 +	if (otherClassName == NULL) \
 +	otherClassName = (LINK_ENTITY_GAME)GetProcAddress(h_Library, #mapClassName); \
 +	if (otherClassName == NULL) \
 +	return; \
 +	(*otherClassName)(pev); }
 +#else
 +#define LINK_ENTITY_TO_GAME(mapClassName) \
 +	extern "C" void mapClassName( entvars_t *pev ) { \
 +	static LINK_ENTITY_GAME otherClassName = NULL; \
 +	if (otherClassName == NULL) \
 +	otherClassName = (LINK_ENTITY_GAME)GetProcAddress(h_Library, #mapClassName); \
 +	if (otherClassName == NULL) \
 +	return; \
 +	(*otherClassName)(pev); }
 +#endif
The EXPORT has already been defined like this in cbase.h...
Code:
 #ifdef _WIN32
 #define EXPORT	_declspec(dllexport)
 #else
 #define EXPORT
 #endif
PS, that 1.2 version has a bug in experience collecting (PODBot 2.6 leftover). Add this in CBaseBot::FindPath() function should fix it...
Code:
    m_iChosenGoalIndex = iSourceIndex;
    m_flGoalValue = 0.0;
  
Reply With Quote