From: Mario Date: Sun, 14 Aug 2016 08:27:02 +0000 (+1000) Subject: Registrize modicons_reset X-Git-Tag: xonotic-v0.8.2~718^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9472351c47a99b2137881a45f1f86054c2a64920;p=xonotic%2Fxonotic-data.pk3dir.git Registrize modicons_reset --- diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index c5a3f7950..a0417f326 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -383,8 +383,8 @@ void HUD_Panel_Draw(entity panent) 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; diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 28e0cfe23..d84d86cad 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -42,6 +42,7 @@ CLASS(Gametype, Object) 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); @@ -205,6 +206,7 @@ REGISTER_GAMETYPE(TEAM_DEATHMATCH, NEW(TeamDeathmatch)); #ifdef CSQC void HUD_Mod_CTF(vector pos, vector mySize); +void HUD_Mod_CTF_Reset(); #endif CLASS(CaptureTheFlag, Gametype) INIT(CaptureTheFlag) @@ -222,6 +224,7 @@ CLASS(CaptureTheFlag, Gametype) } #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));