#define MUTATOR_DAMAGETEXT_H
#ifdef MENUQC
-#include "../../../../menu/xonotic/tab.qc"
+#include <menu/xonotic/tab.qc>
#endif
#endif
const int armor = MUTATOR_ARGV(1, int);
const int deathtype = MUTATOR_ARGV(2, int);
const vector location = hit.origin;
- entity e;
- FOR_EACH_REALCLIENT(e) if (
- (SV_DAMAGETEXT_ALL()) ||
- (SV_DAMAGETEXT_PLAYERS() && e == attacker) ||
- (SV_DAMAGETEXT_SPECTATORS_ONLY() && IS_SPEC(e) && e.enemy == attacker) ||
- (SV_DAMAGETEXT_SPECTATORS_ONLY() && IS_OBSERVER(e))
- ) {
- msg_entity = e;
- WriteHeader(MSG_ONE, damagetext);
- WriteShort(MSG_ONE, health);
- WriteShort(MSG_ONE, armor);
- WriteEntity(MSG_ONE, hit);
- WriteCoord(MSG_ONE, location.x);
- WriteCoord(MSG_ONE, location.y);
- WriteCoord(MSG_ONE, location.z);
- WriteInt24_t(MSG_ONE, deathtype);
- }
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
+ if (
+ (SV_DAMAGETEXT_ALL()) ||
+ (SV_DAMAGETEXT_PLAYERS() && it == attacker) ||
+ (SV_DAMAGETEXT_SPECTATORS_ONLY() && IS_SPEC(it) && it.enemy == attacker) ||
+ (SV_DAMAGETEXT_SPECTATORS_ONLY() && IS_OBSERVER(it))
+ ) {
+ msg_entity = it;
+ WriteHeader(MSG_ONE, damagetext);
+ WriteShort(MSG_ONE, health);
+ WriteShort(MSG_ONE, armor);
+ WriteEntity(MSG_ONE, hit);
+ WriteCoord(MSG_ONE, location.x);
+ WriteCoord(MSG_ONE, location.y);
+ WriteCoord(MSG_ONE, location.z);
+ WriteInt24_t(MSG_ONE, deathtype);
+ }
+ ));
}
#endif
#ifdef MENUQC
CLASS(XonoticDamageTextSettings, XonoticTab)
- #include "../../../../menu/gamesettings.qh"
+ #include <menu/gamesettings.qh>
REGISTER_SETTINGS(damagetext, NEW(XonoticDamageTextSettings));
ATTRIB(XonoticDamageTextSettings, title, string, _("Damage text"))
ATTRIB(XonoticDamageTextSettings, intendedWidth, float, 0.9)
- ATTRIB(XonoticDamageTextSettings, rows, float, 13)
+ ATTRIB(XonoticDamageTextSettings, rows, float, 15.5)
ATTRIB(XonoticDamageTextSettings, columns, float, 5)
INIT(XonoticDamageTextSettings) { this.configureDialog(this); }
METHOD(XonoticDamageTextSettings, showNotify, void(entity this)) { loadAllCvars(this); }
#define DIALOG_TEAMSELECT_H
#include "rootdialog.qc"
CLASS(XonoticTeamSelectDialog, XonoticRootDialog)
- METHOD(XonoticTeamSelectDialog, fill, void(entity)); // to be overridden by user to fill the dialog with controls
+ METHOD(XonoticTeamSelectDialog, fill, void(entity));
METHOD(XonoticTeamSelectDialog, showNotify, void(entity));
- ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection")) // ;)
+ ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection"))
ATTRIB(XonoticTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticTeamSelectDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticTeamSelectDialog, rows, float, 5)
void XonoticTeamSelectDialog_showNotify(entity me)
{
+ SUPER(XonoticTeamSelectDialog).showNotify(me);
float teams, nTeams;
teams = cvar("_teams_available");
nTeams = 0;