-DVEHICLES_USE_ODE=0 \
-DBUILD_MOD=$(BUILD_MOD)
+# -Ooverlap-locals is required
+
QCCFLAGS ?= \
-std=gmqcc \
+ -Ooverlap-locals \
-O3 \
-Werror -Wall -Wcpp \
$(QCCFLAGS_WTFS) \
float f; // every function should have that
int redflag, blueflag, yellowflag, pinkflag, neutralflag; // current status
- float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime, yellowflag_statuschange_elapsedtime, pinkflag_statuschange_elapsedtime, neutralflag_statuschange_elapsedtime; // time since the status changed
+ float redflag_statuschange_elapsedtime = 0, blueflag_statuschange_elapsedtime = 0, yellowflag_statuschange_elapsedtime = 0, pinkflag_statuschange_elapsedtime = 0, neutralflag_statuschange_elapsedtime = 0; // time since the status changed
bool ctf_oneflag; // one-flag CTF mode enabled/disabled
int stat_items = STAT(CTF_FLAGSTATUS);
float fs, fs2, fs3, size1, size2;
const float BLINK_FREQ = 5; // circle frequency, = 2*pi*frequency in hertz
#define X(team, cond) \
- string team##_icon, team##_icon_prevstatus; \
+ string team##_icon = string_null, team##_icon_prevstatus = string_null; \
int team##_alpha, team##_alpha_prevstatus; \
team##_alpha = team##_alpha_prevstatus = 1; \
MACRO_BEGIN { \
#define highpass(value, frac, ref_store, ret) MACRO_BEGIN \
{ \
- float __f; lowpass(value, frac, ref_store, __f); \
+ float __f = 0; lowpass(value, frac, ref_store, __f); \
ret = (value) - __f; \
} MACRO_END
#define highpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \
{ \
- float __f; lowpass_limited(value, frac, limit, ref_store, __f); \
+ float __f = 0; lowpass_limited(value, frac, limit, ref_store, __f); \
ret = (value) - __f; \
} MACRO_END
// Sajt: I tried to smooth out the transitions between bob and no bob, which works
// for the most part, but for some reason when you go through a message trigger or
// pick up an item or anything like that it will momentarily jolt the gun.
- vector forward, right, up;
+ vector forward, right = '0 0 0', up = '0 0 0';
float bspeed;
float t = 1;
float s = time * autocvar_cl_bobmodel_speed;
.entity death_msgmurder;
.string death_msgextra;
+int dt_identity(int i) { return i; }
+
#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, extra) \
REGISTER(Deathtypes, DEATH, id, m_id, new(deathtype)) { \
make_pure(this); \
this.m_id += DT_FIRST; \
this.nent_name = #id; \
this.death_msgextra = extra; \
- if (msg_death != NO_MSG) this.death_msgself = msg_multi_notifs[msg_death - 1]; \
- if (msg_death_by != NO_MSG) this.death_msgmurder = msg_multi_notifs[msg_death_by - 1]; \
+ if (msg_death != NO_MSG) this.death_msgself = msg_multi_notifs[dt_identity(msg_death - 1)]; \
+ if (msg_death_by != NO_MSG) this.death_msgmurder = msg_multi_notifs[dt_identity(msg_death_by - 1)]; \
}
const int DEATH_WEAPONMASK = BITS(8);
// try moving the contacted entity
this.solid = SOLID_NOT;
- bool flag;
+ bool flag = false;
WITH(entity, this, check, {
flag = _Movetype_PushEntity(this, move, true);
});
void WriteByte(int to, int b)
{
assert(to == MSG_C2S);
- string s;
+ string s = string_null;
yenc_single(b, s);
string tmp = strcat(g_buf, s);
if (g_buf) strunzone(g_buf);
#elif defined(SVQC)
int ReadByte()
{
- ydec_single(g_buf, return);
+ int ret = -1;
+ ydec_single(g_buf, ret);
+ return ret;
}
void WriteByte(int to, int b);
#endif
{
int expect = i;
- string fragment;
+ string fragment = string_null;
yenc_single(expect, fragment);
- int encdec;
+ int encdec = 0;
STRING_ITERATOR(fragmentiterator, fragment, 0);
ydec_single(fragmentiterator, encdec);
bool client_hasweapon(entity cl, Weapon wpn, float andammo, bool complain)
{
- float f;
+ float f = 0;
if (time < cl.hasweapon_complain_spam)
complain = 0;