Refactoring (#246)

add: yb_chat_percent, yb_camping_time_[min/max], yb_danger_factor[min/max], yb_chat_percent cvars
fix: possible crash with difficulty 0
fix: debug_goal should not be used as last history
fix:  startup on old hlds, because of missing pfnGetFileSize
fix: crash with out-bounds read
change: again tweaked some aiming code
change: player avoidance code so bots will jump less when stuck
change: max followers is just /4 of max players
refactor: redone distance between vectors
refactor: remove magic numbers in graph.add function
This commit is contained in:
jeefo 2021-09-20 13:50:00 +03:00 committed by GitHub
commit 6f912eb056
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 214 additions and 177 deletions

View file

@ -43,11 +43,6 @@ CR_DECLARE_SCOPED_ENUM (PathConnection,
Bidirectional
)
// defines node add commands
CR_DECLARE_SCOPED_ENUM (GraphAdd,
Normal = 0,
)
// a* route state
CR_DECLARE_SCOPED_ENUM (RouteState,
Open = 0,
@ -94,6 +89,20 @@ CR_DECLARE_SCOPED_ENUM (LiftState,
Leaving
)
// node add flags
CR_DECLARE_SCOPED_ENUM (NodeAddFlag,
Normal = 0,
TOnly = 1,
CTOnly = 2,
NoHostage = 3,
Rescue = 4,
Camp = 5,
CampEnd = 6,
JumpStart = 9,
JumpEnd = 10,
Goal = 100
)
// a* route
struct Route {
float g, f;
@ -312,6 +321,7 @@ public:
int getDangerDamage (int team, int start, int goal);
int getPathDist (int srcIndex, int destIndex);
int clearConnections (int index);
int getBspSize ();
float calculateTravelTime (float maxSpeed, const Vector &src, const Vector &origin);