bot: benefit from sse4.x intrinsics if cpu capable
bot: speed some string functions if sse 4.x available build: allow to build with native optimizations by settings -Dnative=true
This commit is contained in:
parent
7f07817c52
commit
0b8cd9a01c
18 changed files with 133 additions and 89 deletions
|
|
@ -204,7 +204,7 @@ bool BotSupport::isMonster (edict_t *ent) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (strncmp ("hostage", ent->v.classname.chars (), 7) == 0) {
|
||||
if (cr::strncmp ("hostage", ent->v.classname.chars (), 7) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -538,7 +538,7 @@ int32_t BotSupport::sendTo (int socket, const void *message, size_t length, int
|
|||
constexpr int32_t packetLength = 5;
|
||||
|
||||
// player replies response
|
||||
if (length > packetLength && memcmp (packet, "\xff\xff\xff\xff", packetLength - 1) == 0) {
|
||||
if (length > packetLength && cr::memcmp (packet, "\xff\xff\xff\xff", packetLength - 1) == 0) {
|
||||
if (packet[4] == 'D') {
|
||||
QueryBuffer buffer { packet, length, packetLength };
|
||||
auto count = buffer.read <uint8_t> ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue