void HUD_Reset()
{
// reset gametype specific icons
- if(gametype == MAPINFO_TYPE_CTF)
- HUD_Mod_CTF_Reset();
+ if(gametype.m_modicons_reset)
+ gametype.m_modicons_reset();
}
float autocvar_hud_dynamic_shake = 1;
ATTRIB(Gametype, gametype_description, string);
#ifdef CSQC
ATTRIB(Gametype, m_modicons, void(vector pos, vector mySize));
+ ATTRIB(Gametype, m_modicons_reset, void());
#endif
ATTRIB(Gametype, m_mutators, string);
#ifdef CSQC
void HUD_Mod_CTF(vector pos, vector mySize);
+void HUD_Mod_CTF_Reset();
#endif
CLASS(CaptureTheFlag, Gametype)
INIT(CaptureTheFlag)
}
#ifdef CSQC
ATTRIB(CaptureTheFlag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CTF);
+ ATTRIB(CaptureTheFlag, m_modicons_reset, void(), HUD_Mod_CTF_Reset);
#endif
ENDCLASS(CaptureTheFlag)
REGISTER_GAMETYPE(CTF, NEW(CaptureTheFlag));