#include <client/miscfunctions.qh>
#include <common/ent_cs.qh>
-#include <common/gamemodes/_mod.qh>
// Info messages (#14)
InfoMessage(s);
}
- MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize);
+ bool mutator_returnvalue = MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize, img_curr_group);
+ pos = M_ARGV(0, vector);
+ img_curr_group = M_ARGV(2, int);
- if(!warmup_stage && ISGAMETYPE(LMS))
+ if(!mutator_returnvalue)
{
- entity sk;
- sk = playerslots[player_localnum];
- if(sk.(scores(ps_primary)) >= 666)
- s = _("^1Match has already begun");
- else if(sk.(scores(ps_primary)) > 0)
- s = _("^1You have no more lives left");
- else
- s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump"));
- }
- else
s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump"));
- InfoMessage(s);
+ InfoMessage(s);
+ }
}
if (time < STAT(GAMESTARTTIME))
/** Return true to not draw scoreboard */
MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);
-/** Called when drawing info messages, allows adding new info messages */
+/** Called when drawing info messages, allows adding new info messages. Return true to hide the standard join message */
#define EV_DrawInfoMessages(i, o) \
/** pos */ i(vector, MUTATOR_ARGV_0_vector) \
+ /***/ o(vector, MUTATOR_ARGV_0_vector) \
/** mySize */ i(vector, MUTATOR_ARGV_1_vector) \
+ /** img_curr_group */ i(int, MUTATOR_ARGV_2_int) \
+ /***/ o(int, MUTATOR_ARGV_2_int) \
/**/
MUTATOR_HOOKABLE(DrawInfoMessages, EV_DrawInfoMessages);
// generated file; do not modify
#include <common/gamemodes/gamemode/lms/lms.qc>
+#ifdef CSQC
+ #include <common/gamemodes/gamemode/lms/cl_lms.qc>
+#endif
#ifdef SVQC
#include <common/gamemodes/gamemode/lms/sv_lms.qc>
#endif
// generated file; do not modify
#include <common/gamemodes/gamemode/lms/lms.qh>
+#ifdef CSQC
+ #include <common/gamemodes/gamemode/lms/cl_lms.qh>
+#endif
#ifdef SVQC
#include <common/gamemodes/gamemode/lms/sv_lms.qh>
#endif
--- /dev/null
+#include "cl_lms.qh"
+
+REGISTER_MUTATOR(cl_lms, true);
+
+MUTATOR_HOOKFUNCTION(cl_lms, DrawInfoMessages)
+{
+ if(!warmup_stage && ISGAMETYPE(LMS))
+ {
+ entity sk = playerslots[player_localnum];
+ vector pos = M_ARGV(0, vector);
+ vector mySize = M_ARGV(1, vector);
+ vector fontsize = '0.2 0.2 0' * mySize.y;
+ int img_curr_group = M_ARGV(2, int);
+ if(sk.(scores(ps_primary)) >= 666)
+ {
+ InfoMessage(_("^1Match has already begun"));
+ M_ARGV(0, vector) = pos;
+ M_ARGV(2, int) = img_curr_group;
+ return true;
+ }
+ else if(sk.(scores(ps_primary)) > 0)
+ {
+ InfoMessage(_("^1You have no more lives left"));
+ M_ARGV(0, vector) = pos;
+ M_ARGV(2, int) = img_curr_group;
+ return true;
+ }
+ }
+ return false;
+}
--- /dev/null
+#pragma once