Skip to content

Commit b2f93a7

Browse files
authored
Add files via upload
1 parent 286debd commit b2f93a7

File tree

4 files changed

+11
-39
lines changed

4 files changed

+11
-39
lines changed

include/core.h

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@
3434
#ifndef EBOT_INCLUDED
3535
#define EBOT_INCLUDED
3636

37-
#ifdef _WIN32
38-
#define cpuid(info, x) __cpuidex(info, x, 0)
39-
#else
40-
#include <cpuid.h>
41-
void cpuid(int info[4], int InfoType) {
42-
__cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]);
43-
}
44-
#endif
45-
4637
#include <stdio.h>
4738
#include <memory.h>
4839
#include <xmmintrin.h>
@@ -763,7 +754,6 @@ class Bot
763754

764755
PathNode* m_navNode; // pointer to current node from path
765756
PathNode* m_navNodeStart; // pointer to start of path finding nodes
766-
uint8_t m_pathType; // which pathfinder to use
767757
uint8_t m_visibility; // visibility flags
768758

769759
int m_currentWaypointIndex; // current waypoint index
@@ -850,14 +840,6 @@ class Bot
850840

851841
Vector m_moveAngles; // bot move angles
852842
bool m_moveToGoal; // bot currently moving to goal??
853-
854-
Vector m_idealAngles; // angle wanted
855-
Vector m_randomizedIdealAngles; // angle wanted with noise
856-
Vector m_angularDeviation; // angular deviation from current to ideal angles
857-
Vector m_aimSpeed; // aim speed calculated
858-
Vector m_targetOriginAngularSpeed; // target/enemy angular speed
859-
860-
float m_randomizeAnglesTime; // time last randomized location
861843
float m_playerTargetTime; // time last targeting
862844

863845
float m_checkCampPointTime; // zombie stuff
@@ -926,7 +908,6 @@ class Bot
926908

927909
void GetCampDirection(Vector* dest);
928910
int GetMessageQueue(void);
929-
int FindGoalPost(int tactic, Array <int> defensive, Array <int> offsensive);
930911
void FilterGoals(const Array <int>& goals, int* result);
931912
bool GoalIsValid(void);
932913
bool HeadTowardWaypoint(void);
@@ -1013,7 +994,7 @@ class Bot
1013994
int GetCampAimingWaypoint(void);
1014995
int GetAimingWaypoint(Vector targetOriginPos);
1015996
void FindShortestPath(int srcIndex, int destIndex);
1016-
void FindPath(int srcIndex, int destIndex, uint8_t pathType = 0);
997+
void FindPath(int srcIndex, int destIndex);
1017998
void SecondThink(void);
1018999

10191000
public:
@@ -1132,8 +1113,6 @@ class Bot
11321113
int m_checkEnemyNum;
11331114
float m_lookYawVel;
11341115
float m_lookPitchVel;
1135-
float m_aimstoptime;
1136-
float m_aimstopdelay;
11371116

11381117
int m_numFriendsLeft;
11391118
int m_numEnemiesLeft;
@@ -1487,15 +1466,14 @@ extern void SubtractVectors(Vector first, Vector second, Vector output);
14871466
extern float GetVectorDotProduct(Vector first, Vector second);
14881467
extern float Sine(float X);
14891468
extern float AngleDiff(float destAngle, float srcAngle);
1490-
extern float Clamp(float a, float b, float c);
14911469

14921470
extern void SetGameMod(int gamemode);
14931471
extern bool IsZombieMode(void);
14941472
extern bool IsDeathmatchMode(void);
14951473
extern bool IsValidWaypoint(int index);
14961474
extern bool ChanceOf(int number);
14971475
extern float Q_rsqrt(float number);
1498-
extern float sse_rsqrt(float number);
1476+
extern float Clamp(float a, float b, float c);
14991477

15001478
extern int GetEntityWaypoint(edict_t* ent);
15011479
extern int SetEntityWaypoint(edict_t* ent, int mode = -1);
@@ -1537,7 +1515,6 @@ extern void FakeClientCommand(edict_t* fakeClient, const char* format, ...);
15371515
extern void strtrim(char* string);
15381516
extern void CreatePath(char* path);
15391517
extern void ServerCommand(const char* format, ...);
1540-
extern void RegisterBotVariable(int variableID, const char* initialValue, int flags = FCVAR_EXTDLL | FCVAR_SERVER);
15411518
extern void RegisterCommand(char* command, void funcPtr(void));
15421519
extern void CheckWelcomeMessage(void);
15431520
extern void DetectCSVersion(void);

include/engine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3384,7 +3384,7 @@ class Engine : public Singleton <Engine>
33843384

33853385
float Sine(float X);
33863386

3387-
float Clamp(float a, float b, float c);
3387+
float DoClamp(float a, float b, float c);
33883388

33893389
// sends bot command
33903390
void IssueBotCommand(edict_t* ent, const char* fmt, ...);

include/globals.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#ifndef GLOBALS_INCLUDED
2626
#define GLOBALS_INCLUDED
2727

28+
extern bool cpuSSESuport;
29+
2830
extern float API_Version;
2931
extern float amxxDLL_Version;
3032
extern uint16 amxxDLL_bV16[4];
@@ -70,7 +72,6 @@ extern unsigned short g_killHistory;
7072
extern int g_normalWeaponPrefs[Const_NumWeapons];
7173
extern int g_rusherWeaponPrefs[Const_NumWeapons];
7274
extern int g_carefulWeaponPrefs[Const_NumWeapons];
73-
extern int g_grenadeBuyPrecent[Const_NumWeapons - 23];
7475
extern int g_grenadeBuyMoney[Const_NumWeapons - 23];
7576
extern int g_radioSelect[32];
7677
extern int g_lastRadio[2];

include/runtime.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -560,20 +560,17 @@ class Vector
560560
//
561561
inline float GetLength(void) const
562562
{
563-
float pOut;
564563
float number = x * x + y * y + z * z;
565-
__m128 in = _mm_load_ss(&number);
566-
_mm_store_ss(&pOut, _mm_rsqrt_ss(in));
567-
/*long i;
564+
long i;
568565
float x2, y;
569566
const float threehalfs = 1.5F;
570567
x2 = number * 0.5F;
571568
y = number;
572569
i = *(long*)&y;
573570
i = 0x5f3759df - (i >> 1);
574571
y = *(float*)&i;
575-
y = y * (threehalfs - (x2 * y * y));*/
576-
return pOut * number;
572+
y = y * (threehalfs - (x2 * y * y));
573+
return y * number;
577574
}
578575

579576
//
@@ -590,19 +587,16 @@ class Vector
590587
inline float GetLength2D(void) const
591588
{
592589
float number = x * x + y * y;
593-
float pOut;
594-
__m128 in = _mm_load_ss(&number);
595-
_mm_store_ss(&pOut, _mm_rsqrt_ss(in));
596-
/*long i;
590+
long i;
597591
float x2, y;
598592
const float threehalfs = 1.5F;
599593
x2 = number * 0.5F;
600594
y = number;
601595
i = *(long*)&y;
602596
i = 0x5f3759df - (i >> 1);
603597
y = *(float*)&i;
604-
y = y * (threehalfs - (x2 * y * y));*/
605-
return pOut * number;
598+
y = y * (threehalfs - (x2 * y * y));
599+
return y * number;
606600
}
607601

608602
//

0 commit comments

Comments
 (0)