#include "hud/all.qh"
#include "mapvoting.qh"
#include "mutators/events.qh"
-#include "quickmenu.qh"
+#include "hud/panel/quickmenu.qh"
#include "scoreboard.qh"
#include "shownames.qh"
#include <common/t_items.qh>
registercvar("cl_jumpspeedcap_min", "");
registercvar("cl_jumpspeedcap_max", "");
- registercvar("cl_multijump", "0");
+ registercvar("cl_multijump", "1");
registercvar("cl_spawn_near_teammate", "1");
.float has_team;
float SetTeam(entity o, int Team)
{
+ TC(int, Team);
devassert_once(Team);
entity tm;
if(teamplay)
// player connected
if (!e)
{
- playerslots[i] = e = new(playerslot);
- make_pure(e);
+ playerslots[i] = e = new_pure(playerslot);
}
e.sv_entnum = i;
e.ping = 0;
this.nextthink = time + 0.2;
}
-void Porto_Init();
void TrueAim_Init();
void PostInit()
{
- entity playerchecker = new(playerchecker);
- make_pure(playerchecker);
+ entity playerchecker = new_pure(playerchecker);
playerchecker.think = Playerchecker_Think;
playerchecker.nextthink = time + 0.2;
- Porto_Init();
TrueAim_Init();
postinit = true;
// In the case of keyboard input, nPrimary is the ascii code, and nSecondary is 0.
// In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
// In the case of mouse input after a setcursormode(1) call, nPrimary is xpos, nSecondary is ypos.
-float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
+float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary)
{
+ TC(int, bInputType);
if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
return true;
o = playerslots[this.sv_entnum];
if (!o)
{
- o = playerslots[this.sv_entnum] = new(playerslot);
- make_pure(o);
+ o = playerslots[this.sv_entnum] = new_pure(playerslot);
}
this.owner = o;
o.sv_entnum = this.sv_entnum;
// clear race stuff
race_laptime = 0;
race_checkpointtime = 0;
+ hud_dynamic_shake_factor = -1;
}
if (autocvar_hud_panel_healtharmor_progressbar_gfx)
{
__pointparticles(this.cnt, this.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
}
+void Spawn_PreDraw(entity this)
+{
+ float alph;
+ vector org = getpropertyvec(VF_ORIGIN);
+ if(this.fade_start)
+ alph = bound(0, (this.fade_end - vlen(org - this.origin - 0.5 * (this.mins + this.maxs))) / (this.fade_end - this.fade_start), 1);
+ else
+ alph = 1;
+ //printf("%v <-> %v\n", view_origin, this.origin + 0.5 * (this.mins + this.maxs));
+ this.alpha = alph;
+ if(alph <= 0)
+ this.drawmask = 0;
+ else
+ this.drawmask = MASK_NORMAL;
+}
+
NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new)
{
float teamnum = (ReadByte() - 1);
vector spn_origin;
- spn_origin.x = ReadShort();
- spn_origin.y = ReadShort();
- spn_origin.z = ReadShort();
+ spn_origin.x = ReadCoord();
+ spn_origin.y = ReadCoord();
+ spn_origin.z = ReadCoord();
//if(is_new)
//{
else { this.cnt = particleeffectnum(EFFECT_SPAWNPOINT_NEUTRAL); }
this.draw = Spawn_Draw;
+ setpredraw(this, Spawn_PreDraw);
+ this.fade_start = autocvar_cl_spawn_point_dist_min;
+ this.fade_end = autocvar_cl_spawn_point_dist_max;
}
//}
if(entnum)
{
- this.origin_x = ReadShort();
- this.origin_y = ReadShort();
- this.origin_z = ReadShort();
+ this.origin_x = ReadCoord();
+ this.origin_y = ReadCoord();
+ this.origin_z = ReadCoord();
if(is_new)
{
#endif
this.enttype = t;
bool done = false;
- FOREACH(LinkedEntities, it.m_id == t, LAMBDA(
+ FOREACH(LinkedEntities, it.m_id == t, {
if (isnew) this.classname = it.netname;
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Ent_Update(%d) at %f with this=%i {.entnum=%d, .enttype=%d} t=%s (%d)\n", isnew, savetime, this, this.entnum, this.enttype, this.classname, t);
done = it.m_read(this, NULL, isnew);
break;
- ));
+ });
time = savetime;
if (!done)
{
// Acquire TE ID
int nTEID = ReadByte();
- FOREACH(TempEntities, it.m_id == nTEID, LAMBDA(
+ FOREACH(TempEntities, it.m_id == nTEID, {
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Parse_TempEntity() nTEID=%s (%d)\n", it.netname, nTEID);
return it.m_read(NULL, NULL, true);
- ));
+ });
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
return false;
}
-/** TODO somehow thwart prvm_globalset client ... */
string forcefog;
void Fog_Force()
{