nav: allow to disable player avoidance via yb_has_team_semiclip cvar (ref #478)

This commit is contained in:
jeefo 2023-09-10 11:10:31 +03:00
commit e753efd678
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
2 changed files with 9 additions and 3 deletions

View file

@ -602,7 +602,7 @@ public:
public:
template <typename T> T read () {
T result {};
auto size = sizeof (T);
constexpr auto size = sizeof (T);
if (m_cursor + size > m_buffer.length ()) {
return 0;
@ -616,12 +616,12 @@ public:
// must be called right after read
template <typename T> void write (T value) {
auto size = sizeof (value);
constexpr auto size = sizeof (value);
memcpy (m_buffer.data () + m_cursor - size, &value, size);
}
template <typename T> void skip () {
auto size = sizeof (T);
constexpr auto size = sizeof (T);
if (m_cursor + size > m_buffer.length ()) {
return;