#include "hud/all.qh"
#include "mapvoting.qh"
#include "mutators/events.qh"
-#include "quickmenu.qh"
+#include "hud/panel/quickmenu.qh"
#include "scoreboard.qh"
#include "shownames.qh"
#include <common/t_items.qh>
}
deactivate_minigame();
- HUD_MinigameMenu_Close();
+ HUD_MinigameMenu_Close(NULL, NULL, NULL);
}
.float has_team;
float SetTeam(entity o, int Team)
{
+ TC(int, Team);
devassert_once(Team);
entity tm;
if(teamplay)
return false;
}
-void Playerchecker_Think()
+void Playerchecker_Think(entity this)
{
- SELFPARAM();
int i;
entity e;
for(i = 0; i < maxclients; ++i)
this.nextthink = time + 0.2;
}
-void Porto_Init();
void TrueAim_Init();
void PostInit()
{
entity playerchecker = new_pure(playerchecker);
- playerchecker.think = Playerchecker_Think;
+ setthink(playerchecker, Playerchecker_Think);
playerchecker.nextthink = time + 0.2;
- Porto_Init();
TrueAim_Init();
postinit = true;
// In the case of keyboard input, nPrimary is the ascii code, and nSecondary is 0.
// In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
// In the case of mouse input after a setcursormode(1) call, nPrimary is xpos, nSecondary is ypos.
-float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
+float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary)
{
+ TC(int, bInputType);
if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
return true;
// --------------------------------------------------------------------------
// BEGIN OPTIONAL CSQC FUNCTIONS
-.void(entity) predraw_qc;
-void PreDraw_self()
-{
- SELFPARAM();
- if (this.predraw_qc) this.predraw_qc(this);
-}
-
-void setpredraw(entity this, void(entity) pdfunc)
-{
- this.predraw = PreDraw_self;
- this.predraw_qc = pdfunc;
-}
-
void Ent_Remove(entity this);
void Ent_RemovePlayerScore(entity this)
#endif
this.enttype = t;
bool done = false;
- FOREACH(LinkedEntities, it.m_id == t, LAMBDA(
+ FOREACH(LinkedEntities, it.m_id == t, {
if (isnew) this.classname = it.netname;
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Ent_Update(%d) at %f with this=%i {.entnum=%d, .enttype=%d} t=%s (%d)\n", isnew, savetime, this, this.entnum, this.enttype, this.classname, t);
done = it.m_read(this, NULL, isnew);
break;
- ));
+ });
time = savetime;
if (!done)
{
// Acquire TE ID
int nTEID = ReadByte();
- FOREACH(TempEntities, it.m_id == nTEID, LAMBDA(
+ FOREACH(TempEntities, it.m_id == nTEID, {
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Parse_TempEntity() nTEID=%s (%d)\n", it.netname, nTEID);
return it.m_read(NULL, NULL, true);
- ));
+ });
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
keys = db_get(binddb, command);
if (keys == "")
{
+ bool joy_detected = cvar("joy_detected");
n = tokenize(findkeysforcommand(command, 0)); // uses '...' strings
for(j = 0; j < n; ++j)
{
k = stof(argv(j));
if(k != -1)
{
- if ("" == keys)
- keys = keynumtostring(k);
+ string key = keynumtostring(k);
+ if(!joy_detected && substring(key, 0, 3) == "JOY")
+ continue;
+
+ if (keys == "")
+ keys = key;
else
- keys = strcat(keys, ", ", keynumtostring(k));
+ keys = strcat(keys, ", ", key);
++l;
if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit <= l)