Skip to content

Commit

Permalink
Removed windows.h from botlib
Browse files Browse the repository at this point in the history
  • Loading branch information
darkshade9 committed Sep 30, 2024
1 parent bdf7b99 commit 8eea98d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/action/botlib/botlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ int BOTLIB_GetEquipment(edict_t* self);
//rekkie -- collecting weapons, items, ammo -- e

// ===========================================================================
// botlib_utils.c
// botlib_utils.c and botlib_win.c
// ===========================================================================
void seed_random_number_generator(void);
void BOTLIB_SKILL_Init(edict_t* bot);
Expand Down
9 changes: 1 addition & 8 deletions src/action/botlib/botlib_win.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <time.h>

void seed_random_number_generator(void) {
#if _MSC_VER >= 1920 && !__INTEL_COMPILER
LARGE_INTEGER li;
QueryPerformanceCounter(&li);
srand((unsigned int)(li.QuadPart));
#else
// Fallback for other Windows compilers
srand((unsigned int)time(NULL));
#endif
}
#endif

0 comments on commit 8eea98d

Please sign in to comment.