X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fminigames%2Fcl_minigames.qh;h=602c7973585c1510e3903b4d6fe1d5d6d696ebaa;hb=a8e9c14803c6ee158f8183701f8e9c8601da9983;hp=4359dba22630ae9e5ec93236ace5a31645962401;hpb=35528e99ccad9a20fbd6eed640a5bc1bda884acd;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/minigames/cl_minigames.qh b/qcsrc/common/minigames/cl_minigames.qh index 4359dba22..602c79735 100644 --- a/qcsrc/common/minigames/cl_minigames.qh +++ b/qcsrc/common/minigames/cl_minigames.qh @@ -1,5 +1,4 @@ -#ifndef CL_MINIGAMES_H -#define CL_MINIGAMES_H +#pragma once // Get a square in the center of the avaliable area // \note macro to pass by reference pos and mySize @@ -88,7 +87,7 @@ entity minigame_self; // Whethere there's an active minigame float minigame_isactive() { - return active_minigame != world; + return active_minigame != NULL; } // Execute a minigame command @@ -107,7 +106,7 @@ void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_ar #define FOREACH_MINIGAME_ENTITY(entityvar) \ - entityvar=world; \ + entityvar=NULL; \ while( (entityvar = findentity(entityvar,owner,active_minigame)) ) @@ -128,5 +127,3 @@ REGISTRY_CHECK(Minigames) this.minigame_event = name##_client_event; \ } \ REGISTER_INIT(MINIGAME_##name) - -#endif