fix: use clamped health value to avoid overflows.

crlib: do not shutdown wsa, it's cleaned upon server exit anyway.
This commit is contained in:
ds 2020-09-26 18:41:53 +03:00
commit 1263a1a439
11 changed files with 109 additions and 126 deletions

View file

@ -62,7 +62,7 @@ namespace variadic {
vsnprintf (buffer, StringBuffer::StaticBufferSize, format, ap);
va_end (ap);
if (ent && (ent->v.flags & (FL_FAKECLIENT | FL_DORMANT))) {
if (util.isFakeClient (ent)) {
auto bot = bots[ent];
if (bot) {
@ -359,7 +359,7 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
if (game.is (GameFlags::Xash3D)) {
bots.kickEveryone (true, false);
}
graph.initGraph ();
graph.reset ();
// clear all the bots
bots.destroy ();