this.m_id += DT_FIRST; \
this.nent_name = #id; \
this.death_msgextra = extra; \
- 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)]; \
+ if (msg_death != NO_MSG) this.death_msgself = msg_death; \
+ if (msg_death_by != NO_MSG) this.death_msgmurder = msg_death_by; \
}
const int DEATH_WEAPONMASK = BITS(8);
{
W_Reload(self, WEP_CVAR(hmg, ammo), SND(RELOAD));
}
- METHOD(HeavyMachineGun, wr_suicidemessage, int(entity thiswep))
+ METHOD(HeavyMachineGun, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(HeavyMachineGun, wr_killmessage, int(entity thiswep))
+ METHOD(HeavyMachineGun, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_HMG_MURDER_SNIPE;
{
W_Reload(self, WEP_CVAR(rpc, ammo), SND(RELOAD));
}
- METHOD(RocketPropelledChainsaw, wr_suicidemessage, int(entity thiswep))
+ METHOD(RocketPropelledChainsaw, wr_suicidemessage, Notification(entity thiswep))
{
if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
return WEAPON_RPC_SUICIDE_SPLASH;
else
return WEAPON_RPC_SUICIDE_DIRECT;
}
- METHOD(RocketPropelledChainsaw, wr_killmessage, int(entity thiswep))
+ METHOD(RocketPropelledChainsaw, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_BLASTER_MURDER;
notif.nent_durcnt = strzone(
Process_Notif_Args(3, durcnt, typestring, namestring));
- if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
+ if(cpid != NO_MSG_) { notif.nent_cpid = cpid; }
else
{
LOG_INFOF(
notif_error = true;
}
}
- else if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
+ else if(cpid != NO_MSG_) { notif.nent_cpid = cpid; }
#endif
float var_cvar,
string namestring,
/* MSG_MULTI */
- int anncename,
- int infoname,
- int centername)
+ Notification anncename,
+ Notification infoname,
+ Notification centername)
{
int typeId = MSG_MULTI;
// Set MSG_MULTI string/float counts
else
{
// announcements don't actually need any arguments, so lets not even count them.
- if(anncename != NO_MSG) { notif.nent_msgannce = msg_annce_notifs[anncename - 1]; }
+ if(anncename != NO_MSG) { notif.nent_msgannce = anncename; }
float infoname_stringcount = 0, infoname_floatcount = 0;
float centername_stringcount = 0, centername_floatcount = 0;
if(infoname != NO_MSG)
{
- notif.nent_msginfo = msg_info_notifs[infoname - 1];
+ notif.nent_msginfo = infoname;
infoname_stringcount = notif.nent_msginfo.nent_stringcount;
infoname_floatcount = notif.nent_msginfo.nent_floatcount;
}
if(centername != NO_MSG)
{
- notif.nent_msgcenter = msg_center_notifs[centername - 1];
+ notif.nent_msgcenter = centername;
centername_stringcount = notif.nent_msgcenter.nent_stringcount;
centername_floatcount = notif.nent_msgcenter.nent_floatcount;
}
float challow_def,
float challow_var,
int chtype,
- int optiona,
- int optionb)
+ Notification optiona,
+ Notification optionb)
{
int typeId = MSG_CHOICE;
- if((chtype == NO_MSG) || (optiona == NO_MSG) || (optionb == NO_MSG))
+ if((chtype == NO_MSG_) || (optiona == NO_MSG) || (optionb == NO_MSG))
{
string typestring = Get_Notif_TypeName(typeId);
LOG_INFOF(
}
else
{
- switch(chtype)
- {
- case MSG_ANNCE:
- {
- notif.nent_optiona = msg_annce_notifs[optiona - 1];
- notif.nent_optionb = msg_annce_notifs[optionb - 1];
- break;
- }
- case MSG_INFO:
- {
- notif.nent_optiona = msg_info_notifs[optiona - 1];
- notif.nent_optionb = msg_info_notifs[optionb - 1];
- break;
- }
- case MSG_CENTER:
- {
- notif.nent_optiona = msg_center_notifs[optiona - 1];
- notif.nent_optionb = msg_center_notifs[optionb - 1];
- break;
- }
- case MSG_MULTI:
- {
- notif.nent_optiona = msg_multi_notifs[optiona - 1];
- notif.nent_optionb = msg_multi_notifs[optionb - 1];
- break;
- }
- case MSG_CHOICE: // should we REALLY allow nested options?...
- {
- notif.nent_optiona = msg_choice_notifs[optiona - 1];
- notif.nent_optionb = msg_choice_notifs[optionb - 1];
- break;
- }
-
- default:
- {
- LOG_INFOF(
- strcat(
- "^1NOTIFICATION WITH IMPROPER TYPE: ",
- "^7net_type = %d, net_name = %s.\n"
- ),
- typeId,
- namestring
- );
- notif_error = true;
- break;
- }
- }
+ notif.nent_optiona = optiona;
+ notif.nent_optionb = optionb;
notif.nent_challow_def = challow_def; // 0: never allowed, 1: allowed in warmup, 2: always allowed
notif.nent_challow_var = challow_var; // 0: never allowed, 1: allowed in warmup, 2: always allowed
notif.nent_stringcount = max(notif.nent_optiona.nent_stringcount, notif.nent_optionb.nent_stringcount);
}
#endif
-void Local_Notification(int net_type, int net_name, ...count)
+void Local_Notification(int net_type, Notification net_name, ...count)
{
// check if this should be aborted
if(net_name == NOTIF_ABORT)
}
// check supplied type and name for errors
- string checkargs = Notification_CheckArgs_TypeName(net_type, net_name);
+ string checkargs = Notification_CheckArgs_TypeName(net_type, net_name.nent_id);
if(checkargs != "")
{
#ifdef NOTIFICATIONS_DEBUG
}
// retreive entity of this notification
- entity notif = Get_Notif_Ent(net_type, net_name);
+ entity notif = net_name;
if (!notif)
{
#ifdef NOTIFICATIONS_DEBUG
{
Local_Notification_WOVA(
MSG_INFO,
- notif.nent_msginfo.nent_id,
+ notif.nent_msginfo,
notif.nent_msginfo.nent_stringcount,
notif.nent_msginfo.nent_floatcount,
s1, s2, s3, s4,
{
Local_Notification_WOVA(
MSG_ANNCE,
- notif.nent_msgannce.nent_id,
+ notif.nent_msgannce,
0, 0,
"", "", "", "",
0, 0, 0, 0);
{
Local_Notification_WOVA(
MSG_CENTER,
- notif.nent_msgcenter.nent_id,
+ notif.nent_msgcenter,
notif.nent_msgcenter.nent_stringcount,
notif.nent_msgcenter.nent_floatcount,
s1, s2, s3, s4,
Local_Notification_WOVA(
found_choice.nent_type,
- found_choice.nent_id,
+ found_choice,
found_choice.nent_stringcount,
found_choice.nent_floatcount,
s1, s2, s3, s4,
// WOVA = Without Variable Arguments
void Local_Notification_WOVA(
- int net_type, float net_name,
+ int net_type, Notification net_name,
float stringcount, float floatcount,
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4)
if(is_new)
{
Local_Notification_WOVA(
- net_type, net_name,
+ net_type, notif,
notif.nent_stringcount,
notif.nent_floatcount,
s1, s2, s3, s4,
void Send_Notification(
NOTIF broadcast, entity client,
- float net_type, float net_name,
+ float net_type, Notification net_name,
...count)
{
// check if this should be aborted
}
// check supplied broadcast, target, type, and name for errors
- string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name);
+ string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name.nent_id);
if(checkargs != "")
{
#ifdef NOTIFICATIONS_DEBUG
}
// retreive entity of this notification
- entity notif = Get_Notif_Ent(net_type, net_name);
+ entity notif = net_name;
if (!notif)
{
#ifdef NOTIFICATIONS_DEBUG
#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 - 1]) \
+ switch(ent.msg_choice_choices[net_name.nent_id - 1]) \
{ \
case 1: found_choice = notif.nent_optiona; break; \
case 2: found_choice = notif.nent_optionb; break; \
NOTIF_ONE_ONLY, \
ent, \
found_choice.nent_type, \
- found_choice.nent_id, \
+ found_choice, \
found_choice.nent_stringcount, \
found_choice.nent_floatcount, \
s1, s2, s3, s4, \
net_notif.nent_broadcast = broadcast;
net_notif.nent_client = client;
net_notif.nent_net_type = net_type;
- net_notif.nent_net_name = net_name;
+ net_notif.nent_net_name = net_name.nent_id;
net_notif.nent_stringcount = notif.nent_stringcount;
net_notif.nent_floatcount = notif.nent_floatcount;
// WOVA = Without Variable Arguments
void Send_Notification_WOVA(
NOTIF broadcast, entity client,
- float net_type, float net_name,
+ float net_type, Notification net_name,
float stringcount, float floatcount,
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4)
// WOCOVA = Without Counts Or Variable Arguments
void Send_Notification_WOCOVA(
NOTIF broadcast, entity client,
- float net_type, float net_name,
+ float net_type, Notification net_name,
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4)
{
- entity notif = Get_Notif_Ent(net_type, net_name);
+ entity notif = net_name;
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
const int MSG_MULTI = 5; // Subcall MSG_INFO and/or MSG_CENTER notifications
const int MSG_CHOICE = 6; // Choose which subcall wrapper to activate
+typedef entity Notification;
+
// negative confirmations
-const int NO_MSG = -12345; // allows various things to know when no information is added
-const int NOTIF_ABORT = -1234; // allows Send_Notification to safely abort sending
+/** allows various things to know when no information is added */
+Notification NO_MSG;
+STATIC_INIT(NO_MSG) { NO_MSG = new(Notification); }
+const int NO_MSG_ = -12345;
+/** allows Send_Notification to safely abort sending */
+Notification NOTIF_ABORT;
+STATIC_INIT(NOTIF_ABORT) { NOTIF_ABORT = new(Notification); }
#define EIGHT_VARS_TO_VARARGS_VARLIST \
VARITEM(1, 0, s1) \
float var_cvar,
string namestring,
/* MSG_MULTI */
- int anncename,
- int infoname,
- int centername);
+ Notification anncename,
+ Notification infoname,
+ Notification centername);
void Create_Notification_Entity_Choice(entity notif,
float var_cvar,
float challow_def,
float challow_var,
int chtype,
- int optiona,
- int optionb);
+ Notification optiona,
+ Notification optionb);
void Dump_Notifications(float fh, float alsoprint);
void Debug_Notification(string input);
#endif
-void Local_Notification(int net_type, int net_name, ...count);
+void Local_Notification(int net_type, Notification net_name, ...count);
void Local_Notification_WOVA(
- float net_type, float net_name,
+ float net_type, Notification net_name,
float stringcount, float floatcount,
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4);
float net_type, float net_name);
void Send_Notification(
NOTIF broadcast, entity client,
- float net_type, float net_name,
+ float net_type, Notification net_name,
...count);
void Send_Notification_WOVA(
NOTIF broadcast, entity client,
- float net_type, float net_name,
+ float net_type, Notification net_name,
float stringcount, float floatcount,
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4);
void Send_Notification_WOCOVA(
NOTIF broadcast, entity client,
- float net_type, float net_name,
+ float net_type, Notification net_name,
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4);
#endif
#ifdef CSQC
string notif_arg_frag_ping(float newline, float fping)
{
- if(fping == NO_MSG)
+ if(fping == NO_MSG_)
return sprintf(CCR(_("%s(^F1Bot^BG)")), (newline ? "\n" : " "));
else
return sprintf(CCR(_("%s(Ping ^F1%d^BG)")), (newline ? "\n" : " "), fping);
MSG_ANNCE_NOTIF_(ANNCE_##name, default, sound, channel, volume, position)
#define MSG_ANNCE_NOTIF_(name, default, sound, channel, volume, position) \
NOTIF_ADD_AUTOCVAR(name, default) \
- float name; \
+ Notification name; \
void RegisterNotification_##name() \
{ \
- SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_ANNCE_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_ANNCE_MAX, NOTIF_ANNCE_COUNT, "MSG_ANNCE") \
- entity this = msg_annce_notifs[name - 1] = new_pure(msg_annce_notification); \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_ANNCE, name, strtoupper(#name)); \
+ int name##_ = 0; \
+ SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_ANNCE_COUNT) \
+ CHECK_MAX_COUNT(name##_, NOTIF_ANNCE_MAX, NOTIF_ANNCE_COUNT, "MSG_ANNCE") \
+ entity this = name = msg_annce_notifs[name##_ - 1] = new_pure(msg_annce_notification); \
+ Create_Notification_Entity (this, default, ACVNN(name), MSG_ANNCE, name##_, strtoupper(#name)); \
Create_Notification_Entity_Annce(this, ACVNN(name), strtoupper(#name), \
channel, /* channel */ \
sound, /* snd */ \
MSG_INFO_NOTIF_(INFO_##name, default, strnum, flnum, args, hudargs, icon, normal, gentle)
#define MSG_INFO_NOTIF_(name, default, strnum, flnum, args, hudargs, icon, normal, gentle) \
NOTIF_ADD_AUTOCVAR(name, default) \
- int name; \
+ Notification name; \
void RegisterNotification_##name() \
{ \
- SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
- entity this = msg_info_notifs[name - 1] = new_pure(msg_info_notification); \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_INFO, name, strtoupper(#name)); \
+ int name##_ = 0; \
+ SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_INFO_COUNT) \
+ CHECK_MAX_COUNT(name##_, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
+ entity this = name = msg_info_notifs[name##_ - 1] = new_pure(msg_info_notification); \
+ Create_Notification_Entity (this, default, ACVNN(name), MSG_INFO, name##_, strtoupper(#name)); \
Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
args, /* args */ \
hudargs, /* hudargs */ \
icon, /* icon */ \
- NO_MSG, /* cpid */ \
+ NO_MSG_, /* cpid */ \
"", /* durcnt */ \
normal, /* normal */ \
gentle); /* gentle */ \
MULTIICON_INFO_(INFO_##name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)
#define MULTIICON_INFO_(name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) \
NOTIF_ADD_AUTOCVAR(name, default) \
- int name; \
+ Notification name; \
void RegisterNotification_##name() \
{ \
- SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
- entity this = msg_info_notifs[name - 1] = new_pure(msg_info_notification); \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_INFO, name, strtoupper(#name)); \
+ int name##_ = 0; \
+ SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_INFO_COUNT) \
+ CHECK_MAX_COUNT(name##_, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
+ entity this = name = msg_info_notifs[name##_ - 1] = new_pure(msg_info_notification); \
+ Create_Notification_Entity (this, default, ACVNN(name), MSG_INFO, name##_, strtoupper(#name)); \
Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
args, /* args */ \
hudargs, /* hudargs */ \
icon, /* icon */ \
- NO_MSG, /* cpid */ \
+ NO_MSG_, /* cpid */ \
"", /* durcnt */ \
normal, /* normal */ \
gentle); /* gentle */ \
- msg_info_notifs[name - 1].nent_iconargs = iconargs; \
+ this.nent_iconargs = iconargs; \
} \
ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
MSG_CENTER_NOTIF_(CENTER_##name, default, strnum, flnum, args, cpid, durcnt, normal, gentle)
#define MSG_CENTER_NOTIF_(name, default, strnum, flnum, args, cpid, durcnt, normal, gentle) \
NOTIF_ADD_AUTOCVAR(name, default) \
- float name; \
+ Notification name; \
void RegisterNotification_##name() \
{ \
- SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CENTER_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_CENTER_MAX, NOTIF_CENTER_COUNT, "MSG_CENTER") \
- entity this = msg_center_notifs[name - 1] = new_pure(msg_center_notification); \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_CENTER, name, strtoupper(#name)); \
+ int name##_ = 0; \
+ SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_CENTER_COUNT) \
+ CHECK_MAX_COUNT(name##_, NOTIF_CENTER_MAX, NOTIF_CENTER_COUNT, "MSG_CENTER") \
+ entity this = name = msg_center_notifs[name##_ - 1] = new_pure(msg_center_notification); \
+ Create_Notification_Entity (this, default, ACVNN(name), MSG_CENTER, name##_, strtoupper(#name)); \
Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
args, /* args */ \
"", /* hudargs */ \
#define MSG_MULTI_NOTIF(name, default, anncename, infoname, centername) \
NOTIF_ADD_AUTOCVAR(name, default) \
- int name; \
+ Notification name; \
void RegisterNotification_##name() \
{ \
- SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_MULTI_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_MULTI_MAX, NOTIF_MULTI_COUNT, "MSG_MULTI") \
- entity this = msg_multi_notifs[name - 1] = new_pure(msg_multi_notification); \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_MULTI, name, strtoupper(#name)); \
+ int name##_ = 0; \
+ SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_MULTI_COUNT) \
+ CHECK_MAX_COUNT(name##_, NOTIF_MULTI_MAX, NOTIF_MULTI_COUNT, "MSG_MULTI") \
+ entity this = name = msg_multi_notifs[name##_ - 1] = new_pure(msg_multi_notification); \
+ Create_Notification_Entity (this, default, ACVNN(name), MSG_MULTI, name##_, strtoupper(#name)); \
Create_Notification_Entity_Multi(this, ACVNN(name), strtoupper(#name), \
anncename, /* anncename */ \
infoname, /* infoname */ \
#define MSG_CHOICE_NOTIF_(name, default, challow, chtype, optiona, optionb) \
NOTIF_ADD_AUTOCVAR(name, default) \
NOTIF_ADD_AUTOCVAR(name##_ALLOWED, challow) \
- float name; \
+ Notification name; \
void RegisterNotification_##name() \
{ \
- SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CHOICE_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_CHOICE_MAX, NOTIF_CHOICE_COUNT, "MSG_CHOICE") \
- entity this = msg_choice_notifs[name - 1] = new_pure(msg_choice_notification); \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_CHOICE, name, strtoupper(#name)); \
+ int name##_ = 0; \
+ SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_CHOICE_COUNT) \
+ CHECK_MAX_COUNT(name##_, NOTIF_CHOICE_MAX, NOTIF_CHOICE_COUNT, "MSG_CHOICE") \
+ entity this = name = msg_choice_notifs[name##_ - 1] = new_pure(msg_choice_notification); \
+ Create_Notification_Entity (this, default, ACVNN(name), MSG_CHOICE, name##_, strtoupper(#name)); \
Create_Notification_Entity_Choice(this, ACVNN(name), strtoupper(#name), \
challow, /* challow_def */ \
autocvar_notification_##name##_ALLOWED, /* challow_var */ \
#endif
#ifndef MENUQC
-float Announcer_PickNumber(float type, float num)
+Notification Announcer_PickNumber(float type, float num)
{
switch(type)
{
const float CNT_KILL = 4;
const float CNT_RESPAWN = 5;
const float CNT_ROUNDSTART = 6;
-float Announcer_PickNumber(float type, float num);
+entity Announcer_PickNumber(float type, float num);
#endif
#ifndef MENUQC
/** (BOTH) precaches models/sounds used by this weapon, also sets up weapon properties */
METHOD(Weapon, wr_init, void(Weapon this)) {}
/** (SERVER) notification number for suicide message (may inspect w_deathtype for details) */
- METHOD(Weapon, wr_suicidemessage, int(Weapon this)) {return 0;}
+ METHOD(Weapon, wr_suicidemessage, entity(Weapon this)) {return NULL;}
/** (SERVER) notification number for kill message (may inspect w_deathtype for details) */
- METHOD(Weapon, wr_killmessage, int(Weapon this)) {return 0;}
+ METHOD(Weapon, wr_killmessage, entity(Weapon this)) {return NULL;}
/** (SERVER) handles reloading for weapon */
METHOD(Weapon, wr_reload, void(Weapon this, entity actor, .entity weaponentity)) {}
/** (SERVER) clears fields that the weapon may use */
return WEP_CVAR(arc, overheat_max) > 0 &&
((!WEP_CVAR(arc, burst_ammo)) || (self.(thiswep.ammo_field) > 0));
}
- METHOD(Arc, wr_killmessage, int(entity thiswep))
+ METHOD(Arc, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_ARC_MURDER_SPRAY;
return true; // blaster has infinite ammo
}
- METHOD(Blaster, wr_suicidemessage, int(entity thiswep))
+ METHOD(Blaster, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_BLASTER_SUICIDE;
}
- METHOD(Blaster, wr_killmessage, int(entity thiswep))
+ METHOD(Blaster, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_BLASTER_MURDER;
}
{
W_Reload(self, min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), SND(RELOAD));
}
- METHOD(Crylink, wr_suicidemessage, int(entity thiswep))
+ METHOD(Crylink, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_CRYLINK_SUICIDE;
}
- METHOD(Crylink, wr_killmessage, int(entity thiswep))
+ METHOD(Crylink, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_CRYLINK_MURDER;
}
{
W_Reload(self, WEP_CVAR(devastator, ammo), SND(RELOAD));
}
- METHOD(Devastator, wr_suicidemessage, int(entity thiswep))
+ METHOD(Devastator, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_DEVASTATOR_SUICIDE;
}
- METHOD(Devastator, wr_killmessage, int(entity thiswep))
+ METHOD(Devastator, wr_killmessage, Notification(entity thiswep))
{
if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
return WEAPON_DEVASTATOR_MURDER_SPLASH;
{
W_Reload(self, min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND(RELOAD));
}
- METHOD(Electro, wr_suicidemessage, int(entity thiswep))
+ METHOD(Electro, wr_suicidemessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_ELECTRO_SUICIDE_ORBS;
else
return WEAPON_ELECTRO_SUICIDE_BOLT;
}
- METHOD(Electro, wr_killmessage, int(entity thiswep))
+ METHOD(Electro, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
{
{
self.fireball_primarytime = time;
}
- METHOD(Fireball, wr_suicidemessage, int(entity thiswep))
+ METHOD(Fireball, wr_suicidemessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_FIREBALL_SUICIDE_FIREMINE;
else
return WEAPON_FIREBALL_SUICIDE_BLAST;
}
- METHOD(Fireball, wr_killmessage, int(entity thiswep))
+ METHOD(Fireball, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_FIREBALL_MURDER_FIREMINE;
if(!self.hagar_load) // require releasing loaded rockets first
W_Reload(self, min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), SND(RELOAD));
}
- METHOD(Hagar, wr_suicidemessage, int(entity thiswep))
+ METHOD(Hagar, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_HAGAR_SUICIDE;
}
- METHOD(Hagar, wr_killmessage, int(entity thiswep))
+ METHOD(Hagar, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_HAGAR_MURDER_BURST;
{
W_Reload(self, min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo)), SND(RELOAD));
}
- METHOD(HLAC, wr_suicidemessage, int(entity thiswep))
+ METHOD(HLAC, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_HLAC_SUICIDE;
}
- METHOD(HLAC, wr_killmessage, int(entity thiswep))
+ METHOD(HLAC, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_HLAC_MURDER;
}
self.hook_time = 0;
self.hook_refire = time;
}
- METHOD(Hook, wr_suicidemessage, int(entity thiswep))
+ METHOD(Hook, wr_suicidemessage, Notification(entity thiswep))
{
- return false;
+ return NULL;
}
- METHOD(Hook, wr_killmessage, int(entity thiswep))
+ METHOD(Hook, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_HOOK_MURDER;
}
{
W_Reload(self, min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), SND(RELOAD));
}
- METHOD(MachineGun, wr_suicidemessage, int(entity thiswep))
+ METHOD(MachineGun, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(MachineGun, wr_killmessage, int(entity thiswep))
+ METHOD(MachineGun, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_MACHINEGUN_MURDER_SNIPE;
{
W_Reload(self, WEP_CVAR(minelayer, ammo), SND(RELOAD));
}
- METHOD(MineLayer, wr_suicidemessage, int(entity thiswep))
+ METHOD(MineLayer, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_MINELAYER_SUICIDE;
}
- METHOD(MineLayer, wr_killmessage, int(entity thiswep))
+ METHOD(MineLayer, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_MINELAYER_MURDER;
}
{
W_Reload(self, min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo)), SND(RELOAD)); // WEAPONTODO
}
- METHOD(Mortar, wr_suicidemessage, int(entity thiswep))
+ METHOD(Mortar, wr_suicidemessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_MORTAR_SUICIDE_BOUNCE;
else
return WEAPON_MORTAR_SUICIDE_EXPLODE;
}
- METHOD(Mortar, wr_killmessage, int(entity thiswep))
+ METHOD(Mortar, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_MORTAR_MURDER_BOUNCE;
{
W_Reload(self, min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), SND(RELOAD));
}
- METHOD(Rifle, wr_suicidemessage, int(entity thiswep))
+ METHOD(Rifle, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(Rifle, wr_killmessage, int(entity thiswep))
+ METHOD(Rifle, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
{
{
W_Reload(self, min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND(RELOAD));
}
- METHOD(Seeker, wr_suicidemessage, int(entity thiswep))
+ METHOD(Seeker, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_SEEKER_SUICIDE;
}
- METHOD(Seeker, wr_killmessage, int(entity thiswep))
+ METHOD(Seeker, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_SEEKER_MURDER_TAG;
// shockwave has infinite ammo
return true;
}
- METHOD(Shockwave, wr_suicidemessage, int(entity thiswep))
+ METHOD(Shockwave, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(Shockwave, wr_killmessage, int(entity thiswep))
+ METHOD(Shockwave, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_SHOCKWAVE_MURDER_SLAP;
{
W_Reload(self, WEP_CVAR_PRI(shotgun, ammo), SND(RELOAD)); // WEAPONTODO
}
- METHOD(Shotgun, wr_suicidemessage, int(entity thiswep))
+ METHOD(Shotgun, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(Shotgun, wr_killmessage, int(entity thiswep))
+ METHOD(Shotgun, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_SHOTGUN_MURDER_SLAP;
METHOD(Tuba, wr_checkammo1, bool(Tuba this)) { return true; }
METHOD(Tuba, wr_checkammo2, bool(Tuba this)) { return true; }
-METHOD(Tuba, wr_suicidemessage, int(Tuba this))
+METHOD(Tuba, wr_suicidemessage, Notification(Tuba this))
{
if (w_deathtype & HITTYPE_BOUNCE)
return WEAPON_KLEINBOTTLE_SUICIDE;
else
return WEAPON_TUBA_SUICIDE;
}
-METHOD(Tuba, wr_killmessage, int(Tuba this))
+METHOD(Tuba, wr_killmessage, Notification(Tuba this))
{
if (w_deathtype & HITTYPE_BOUNCE)
return WEAPON_KLEINBOTTLE_MURDER;
W_Reload(self, used_ammo, SND(RELOAD));
}
- METHOD(Vaporizer, wr_suicidemessage, int(entity thiswep))
+ METHOD(Vaporizer, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(Vaporizer, wr_killmessage, int(entity thiswep))
+ METHOD(Vaporizer, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_VAPORIZER_MURDER;
}
{
W_Reload(self, min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), SND(RELOAD));
}
- METHOD(Vortex, wr_suicidemessage, int(entity thiswep))
+ METHOD(Vortex, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- METHOD(Vortex, wr_killmessage, int(entity thiswep))
+ METHOD(Vortex, wr_killmessage, Notification(entity thiswep))
{
return WEAPON_VORTEX_MURDER;
}
NOTIF_ONE,
notif_target,
MSG_MULTI,
- deathent.death_msgmurder.nent_id,
+ deathent.death_msgmurder,
s1, s2, s3, "",
f1, f2, f3, 0
);
NOTIF_ALL_EXCEPT,
notif_target,
MSG_INFO,
- deathent.death_msgmurder.nent_msginfo.nent_id,
+ deathent.death_msgmurder.nent_msginfo,
s1, s2, s3, "",
f1, f2, f3, 0
);
NOTIF_ONE,
notif_target,
MSG_MULTI,
- deathent.death_msgself.nent_id,
+ deathent.death_msgself,
s1, s2, s3, "",
f1, f2, f3, 0
);
NOTIF_ALL_EXCEPT,
notif_target,
MSG_INFO,
- deathent.death_msgself.nent_msginfo.nent_id,
+ deathent.death_msgself.nent_msginfo,
s1, s2, s3, "",
f1, f2, f3, 0
);
if (death_weapon != WEP_Null)
{
w_deathtype = deathtype;
- int death_message = ((murder) ? death_weapon.wr_killmessage(death_weapon) : death_weapon.wr_suicidemessage(death_weapon));
+ Notification death_message = ((murder) ? death_weapon.wr_killmessage(death_weapon) : death_weapon.wr_suicidemessage(death_weapon));
w_deathtype = false;
if (death_message)
NOTIF_ALL_EXCEPT,
notif_target,
MSG_INFO,
- msg_multi_notifs[death_message - 1].nent_msginfo.nent_id,
+ msg_multi_notifs[death_message.nent_id - 1].nent_msginfo,
s1, s2, s3, "",
f1, f2, 0, 0
);
CHOICE_TYPEFRAG,
targ.netname,
kill_count_to_attacker,
- (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping)
+ (IS_BOT_CLIENT(targ) ? NO_MSG_ : targ.ping)
);
Send_Notification(
NOTIF_ONE,
kill_count_to_target,
attacker.health,
attacker.armorvalue,
- (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping)
+ (IS_BOT_CLIENT(attacker) ? NO_MSG_ : attacker.ping)
);
}
else
CHOICE_FRAG,
targ.netname,
kill_count_to_attacker,
- (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping)
+ (IS_BOT_CLIENT(targ) ? NO_MSG_ : targ.ping)
);
Send_Notification(
NOTIF_ONE,
kill_count_to_target,
attacker.health,
attacker.armorvalue,
- (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping)
+ (IS_BOT_CLIENT(attacker) ? NO_MSG_ : attacker.ping)
);
}