-#ifndef MISCFUNCTIONS_H
-#define MISCFUNCTIONS_H
+#pragma once
-#include "t_items.qh"
+#include <common/t_items.qh>
#include "mutators/events.qh"
-#include "../common/constants.qh"
-#include "../common/mapinfo.qh"
-#include "../common/turrets/all.qh"
+#include <common/constants.qh>
+#include <common/mapinfo.qh>
+#include <common/turrets/all.qh>
#ifdef RELEASE
#define cvar_string_normal builtin_cvar_string
void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
+#define IS_DEAD(s) ((s).deadflag != DEAD_NO)
+
#define ITEM_TOUCH_NEEDKILL() (((trace_dpstartcontents | trace_dphitcontents) & DPCONTENTS_NODROP) || (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY))
#define ITEM_DAMAGE_NEEDKILL(dt) (((dt) == DEATH_HURTTRIGGER.m_id) || ((dt) == DEATH_SLIME.m_id) || ((dt) == DEATH_LAVA.m_id) || ((dt) == DEATH_SWAMP.m_id))
float logfile_open;
float logfile;
-#define strstr strstrofs
/*
// NOTE: DO NOT USE THIS FUNCTION TOO OFTEN.
// IT WILL MOST PROBABLY DESTROY _ALL_ OTHER TEMP
// STRINGS AND TAKE QUITE LONG. haystack and needle MUST
// BE CONSTANT OR strzoneD!
-float strstr(string haystack, string needle, float offset)
+float strstrofs(string haystack, string needle, float offset)
{
float len, endpos;
string found;
if (!warmup_stage)
game_starttime = time + cvar("g_start_delay");
- for(int i = WEP_FIRST; i <= WEP_LAST; ++i) {
- Weapon w = Weapons_from(i);
- w.wr_init(w);
- }
+ FOREACH(Weapons, it != WEP_Null, LAMBDA(it.wr_init(it)));
readplayerstartcvars();
}
float sound_allowed(float dest, entity e);
void InitializeEntity(entity e, void() func, float order);
void SetCustomizer(entity e, float() customizer, void() uncustomizer);
-
-#endif