From 4a064da5b561b5aaca174d57adc32810101d625d Mon Sep 17 00:00:00 2001 From: drian Date: Wed, 10 Feb 2021 21:10:15 +0100 Subject: [PATCH] mergefix --- source/src/tools.h | 1 + source/src/weapon.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/source/src/tools.h b/source/src/tools.h index ba038057..5bfc7a09 100644 --- a/source/src/tools.h +++ b/source/src/tools.h @@ -118,6 +118,7 @@ inline int iabs(int n) { return labs(n); } typedef char string[MAXSTRLEN]; #define vformatstring(d,last,fmt) { va_list ap; va_start(ap, last); vformatstring_(d, fmt, ap); va_end(ap); } +inline void vformatstring_(char* d, const char* fmt, va_list v, int len = MAXSTRLEN) { _vsnprintf(d, len, fmt, v); d[len - 1] = 0; } inline char *copystring(char *d, const char *s, size_t len = MAXSTRLEN) { size_t slen = min(strlen(s), len-1); diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 2065c3b5..3c992e74 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -5,6 +5,7 @@ #include "hudgun.h" VARP(autoreload, 0, 1, 1); +VARP(akimboautoswitch, 0, 1, 1); VARP(akimboendaction, 0, 3, 3); // 0: switch to knife, 1: stay with pistol (if has ammo), 2: switch to grenade (if possible), 3: switch to primary (if has ammo) - all fallback to previous one w/o ammo for target struct sgray {