X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fminigames%2Fcl_minigames.qh;h=415984a2a8a914b17822a98a69a861d927315c2d;hb=789afd3e473029d1ceaecbd04c1032b1ed5bae35;hp=596d9204c96c30aad48b72101421584aed9464a9;hpb=e0e847a336cdb7ab1fcb93d3cf3e1402b761a726;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/minigames/cl_minigames.qh b/qcsrc/common/minigames/cl_minigames.qh index 596d9204c..415984a2a 100644 --- a/qcsrc/common/minigames/cl_minigames.qh +++ b/qcsrc/common/minigames/cl_minigames.qh @@ -1,5 +1,6 @@ -#ifndef CL_MINIGAMES_H -#define CL_MINIGAMES_H +#pragma once + +#include "cl_minigames_hud.qh" // Get a square in the center of the avaliable area // \note macro to pass by reference pos and mySize @@ -85,12 +86,6 @@ entity active_minigame; // minigame_player representing this client entity minigame_self; -// Whethere there's an active minigame -float minigame_isactive() -{ - return active_minigame != world; -} - // Execute a minigame command #define minigame_cmd(...) minigame_cmd_workaround(0,__VA_ARGS__) void minigame_cmd_workaround(float dummy, string...cmdargc); @@ -99,15 +94,9 @@ void minigame_cmd_workaround(float dummy, string...cmdargc); // (ie: it's their turn and they should get back to the minigame) void minigame_prompt(); -float HUD_MinigameMenu_IsOpened(); -void HUD_MinigameMenu_Close(); -float HUD_Minigame_Showpanels(); -// Adds a game-specific entry to the menu -void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_arg); - #define FOREACH_MINIGAME_ENTITY(entityvar) \ - entityvar=world; \ + entityvar=NULL; \ while( (entityvar = findentity(entityvar,owner,active_minigame)) ) @@ -120,7 +109,7 @@ REGISTRY_CHECK(Minigames) void name##_hud_board(vector, vector); \ void name##_hud_status(vector, vector); \ int name##_client_event(entity, string, ...); \ - REGISTER_INIT_POST(MINIGAME_##name) { \ + REGISTER_INIT(MINIGAME_##name) { \ this.netname = strzone(strtolower(#name)); \ this.message = nicename; \ this.minigame_hud_board = name##_hud_board; \ @@ -128,5 +117,3 @@ REGISTRY_CHECK(Minigames) this.minigame_event = name##_client_event; \ } \ REGISTER_INIT(MINIGAME_##name) - -#endif