-#include "_all.qh"
#include "announcer.qh"
#include "hook.qh"
-#include "hud.qh"
-#include "hud_config.qh"
+#include "hud/all.qh"
#include "mapvoting.qh"
#include "scoreboard.qh"
#include "shownames.qh"
+#include "quickmenu.qh"
#include "mutators/events.qh"
#include "../common/constants.qh"
+#include "../common/debug.qh"
#include "../common/mapinfo.qh"
+#include "../common/gamemodes/all.qh"
#include "../common/nades/all.qh"
#include "../common/stats.qh"
#include "../common/triggers/target/music.qh"
#include "../common/teams.qh"
-#include "../common/util.qh"
+#include "../common/vehicles/all.qh"
#include "../common/weapons/all.qh"
+#include "../common/viewloc.qh"
+#include "../common/minigames/cl_minigames.qh"
+#include "../common/minigames/cl_minigames_hud.qh"
-#include "../csqcmodellib/cl_player.qh"
+#include "../lib/csqcmodel/cl_player.qh"
-#include "../warpzonelib/client.qh"
-#include "../warpzonelib/common.qh"
+#include "../lib/warpzone/client.qh"
+#include "../lib/warpzone/common.qh"
entity porto;
vector polyline[16];
void Porto_Init()
{
- porto = spawn();
- porto.classname = "porto";
+ porto = new(porto);
+ make_pure(porto);
porto.draw = Porto_Draw;
porto.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
}
void TrueAim_Init()
{
- trueaim = spawn();
- trueaim.classname = "trueaim";
+ trueaim = new(trueaim);
+ make_pure(trueaim);
trueaim.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
- trueaim_rifle = spawn();
- trueaim_rifle.classname = "trueaim_rifle";
+ trueaim_rifle = new(trueaim_rifle);
+ make_pure(trueaim_rifle);
trueaim_rifle.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
}
return SHOTTYPE_HITWORLD;
}
-void PostInit(void);
+void PostInit();
void CSQC_Demo_Camera();
float HUD_WouldDrawScoreboard();
float camera_mode;
void HUD_Crosshair()
{SELFPARAM();
static float rainbow_last_flicker;
- static vector rainbow_prev_color;
+ static vector rainbow_prev_color;
entity e = self;
float f, i, j;
vector v;
++framecount;
+ stats_get();
hud = getstati(STAT_HUD);
if(hud != HUD_NORMAL && lasthud == HUD_NORMAL)
ColorTranslateMode = autocvar_cl_stripcolorcodes;
- // next WANTED weapon (for HUD)
- switchweapon = getstati(STAT_SWITCHWEAPON);
-
// currently switching-to weapon (for crosshair)
switchingweapon = getstati(STAT_SWITCHINGWEAPON);
if(!nightvision_noise)
{
- nightvision_noise = spawn();
- nightvision_noise.classname = "nightvision_noise";
+ nightvision_noise = new(nightvision_noise);
}
if(!nightvision_noise2)
{
- nightvision_noise2 = spawn();
- nightvision_noise2.classname = "nightvision_noise2";
+ nightvision_noise2 = new(nightvision_noise2);
}
// color tint in yellow
if(autocvar_cl_gentle_damage == 2)
{
if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
- {
myhealth_gentlergb = eX * random() + eY * random() + eZ * random();
- }
}
else
myhealth_gentlergb = stov(autocvar_hud_damage_gentle_color);
- drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
+ if(myhealth_flash_temp > 0)
+ drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
}
- else
+ else if(myhealth_flash_temp > 0)
drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
if(autocvar_hud_postprocessing) // we still need to set this anyway even when chase_active is set, this way it doesn't get stuck on.
else if(cvar("r_glsl_postprocess") == 2)
cvar_set("r_glsl_postprocess", "0");
- if(menu_visible)
- menu_show();
-
/*if(gametype == MAPINFO_TYPE_CTF)
{
ctf_view();
WITH(entity, self, e, e.draw2d(e));
}
Draw_ShowNames_All();
+ Debug_Draw();
scoreboard_active = HUD_WouldDrawScoreboard();