+#if defined(CSQC)
+ #include "../dpdefs/csprogsdefs.qc"
+ #include "Defs.qc"
+ #include "../common/constants.qh"
+ #include "../warpzonelib/mathlib.qh"
+ #include "../common/teams.qh"
+ #include "../common/util.qh"
+ #include "../common/animdecide.qh"
+ #include "autocvars.qh"
+ #include "../csqcmodellib/interpolate.qh"
+ #include "main.qh"
+ #include "../common/csqcmodel_settings.qh"
+ #include "../csqcmodellib/common.qh"
+ #include "../csqcmodellib/cl_model.qh"
+ #include "../csqcmodellib/cl_player.qh"
+ #include "weapons/projectile.qh"
+ #include "player_skeleton.qh"
+#elif defined(MENUQC)
+#elif defined(SVQC)
+#endif
+
+
void CSQCModel_Hook_PreDraw(bool isplayer);
.bool isplayermodel;
// GLOWMOD AND DEATH FADING
if(self.colormap > 0)
- self.glowmod = colormapPaletteColor(((self.colormap >= 1024) ? self.colormap : stof(getplayerkeyvalue(self.colormap - 1, "colors"))) & 0x0F, TRUE) * 2;
+ self.glowmod = colormapPaletteColor(((self.colormap >= 1024) ? self.colormap : stof(getplayerkeyvalue(self.colormap - 1, "colors"))) & 0x0F, true) * 2;
else
self.glowmod = '1 1 1';
self.colormap = 0;
self.glowmod = self.old_glowmod * bound(0, 1 - (time - self.death_time) / autocvar_cl_deathglow, 1);
- self.glowmod_x = max(self.glowmod_x, 0.0001);
- self.glowmod_y = max(self.glowmod_y, 0.0001);
- self.glowmod_z = max(self.glowmod_z, 0.0001);
+ self.glowmod_x = max(self.glowmod.x, 0.0001);
+ self.glowmod_y = max(self.glowmod.y, 0.0001);
+ self.glowmod_z = max(self.glowmod.z, 0.0001);
}
else if(self.old_glowmod != '0 0 0') { self.old_glowmod = '0 0 0'; }
}
// player "pops in"
if(isnew)
{
-#define FIX_FRAMETIME(f,ft) \
- if(IS_DEAD_FRAME(self.f) && self.ft != 0 && self.death_time != 0) \
- { \
- self.ft = self.death_time; \
- }
- FIX_FRAMETIME(frame, frame1time)
- FIX_FRAMETIME(frame2, frame2time)
+#define FIX_FRAMETIME(f,ft) do { \
+ if(IS_DEAD_FRAME(self.f) && self.ft != 0 && self.death_time != 0) \
+ self.ft = self.death_time; \
+} while(0)
+ FIX_FRAMETIME(frame, frame1time);
+ FIX_FRAMETIME(frame2, frame2time);
#ifdef CSQCMODEL_HAVE_TWO_FRAMES
- FIX_FRAMETIME(frame3, frame3time)
- FIX_FRAMETIME(frame4, frame4time)
+ FIX_FRAMETIME(frame3, frame3time);
+ FIX_FRAMETIME(frame4, frame4time);
#endif
}
self.csqcmodel_isdead = IS_DEAD_FRAME(self.frame);
if(self.csqcmodel_teleported)
Projectile_ResetTrail(self.origin);
}
-.bool snd_looping;
+.int snd_looping;
void CSQCModel_Effects_Apply(void)
{
int eff = self.csqcmodel_effects & ~CSQCMODEL_EF_RESPAWNGHOST;
onground = 1;
self.anim_prev_pmove_flags = self.pmove_flags;
if(self.pmove_flags & PMF_DUCKED)
- animdecide_setstate(self, self.anim_state | ANIMSTATE_DUCK, FALSE);
+ animdecide_setstate(self, self.anim_state | ANIMSTATE_DUCK, false);
else if(self.anim_state & ANIMSTATE_DUCK)
- animdecide_setstate(self, self.anim_state - ANIMSTATE_DUCK, FALSE);
+ animdecide_setstate(self, self.anim_state - ANIMSTATE_DUCK, false);
}
else
{
self.frame1time = self.anim_frame1time;
self.frame2 = self.anim_frame2;
self.frame2time = self.anim_frame2time;
- CSQCModel_InterpolateAnimation_2To4_Note(sf | CSQCMODEL_PROPERTY_LERPFRAC, FALSE);
+ CSQCModel_InterpolateAnimation_2To4_Note(sf | CSQCMODEL_PROPERTY_LERPFRAC, false);
CSQCModel_InterpolateAnimation_2To4_Do();
if(doblend)
{