FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
GetCvars_handleFloat(
this,
+ CS(this),
get_cvars_s,
get_cvars_f,
msg_choice_choices[it.nent_choice_idx],
#define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN { \
if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) { \
- switch (ent.msg_choice_choices[net_name.nent_choice_idx]) \
+ switch (CS(ent).msg_choice_choices[net_name.nent_choice_idx]) \
{ \
case 1: found_choice = notif.nent_optiona; break; \
case 2: found_choice = notif.nent_optionb; break; \
ATTRIB(Client, zoomstate, bool, this.zoomstate);
ATTRIB(Client, just_joined, bool, this.just_joined);
ATTRIB(Client, race_completed, bool, this.race_completed);
+ ATTRIBARRAY(Client, msg_choice_choices, int, 50); // TODO: actually NOTIF_CHOICE_MAX
METHOD(Client, m_unwind, bool(Client this));
}
}
}
-void GetCvars_handleFloat(entity this, string thisname, float f, .float field, string name)
+void GetCvars_handleFloat(entity this, entity store, string thisname, float f, .float field, string name)
{
if (f < 0)
{
else if (f > 0)
{
if (thisname == name)
- this.(field) = stof(argv(f + 1));
+ store.(field) = stof(argv(f + 1));
}
else
stuffcmd(this, strcat("cl_cmd sendcvar ", name, "\n"));
GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
- GetCvars_handleFloat(this, s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
+ GetCvars_handleFloat(this, this, s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
// fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
if (f > 0)
void play2team(float t, string filename);
-void GetCvars_handleFloat(entity this, string thisname, float f, .float field, string name);
+void GetCvars_handleFloat(entity this, entity store, string thisname, float f, .float field, string name);
float spamsound(entity e, float chan, Sound samp, float vol, float _atten);