void CSQCModel_Draw()
{
// some nice flags for CSQCMODEL_IF and the hooks
- float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
- float islocalplayer = (self.entnum == player_localnum + 1);
- float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
+ local noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
+ local noref float islocalplayer = (self.entnum == player_localnum + 1);
+ local noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
// we don't do this for the local player as that one is already handled
// by CSQCPlayer_SetCamera()
if(!CSQCPlayer_IsLocalPlayer())
InterpolateOrigin_Do();
- // TODO csqcplayers: run prediction here too
CSQCModel_InterpolateAnimation_Do();
{ CSQCMODEL_HOOK_PREDRAW }
root = root.tag_entity;
if(self != root)
{
- self.renderflags &~= RF_EXTERNALMODEL | RF_VIEWMODEL;
+ self.renderflags &= ~(RF_EXTERNALMODEL | RF_VIEWMODEL);
self.renderflags |= (root.renderflags & (RF_EXTERNALMODEL | RF_VIEWMODEL));
}
sf = ReadShort();
// some nice flags for CSQCMODEL_IF and the hooks
- float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
- float islocalplayer = (self.entnum == player_localnum + 1);
- float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
+ local noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
+ local noref float islocalplayer = (self.entnum == player_localnum + 1);
+ local noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
self.classname = "csqcmodel";
+ self.iflags |= IFLAG_ORIGIN; // interpolate origin too
self.iflags |= IFLAG_ANGLES; // interpolate angles too
+ self.iflags |= IFLAG_VELOCITY | IFLAG_AUTOVELOCITY; // let's calculate velocity automatically
{ CSQCMODEL_HOOK_PREUPDATE }
#endif
self.renderflags |= RF_EXTERNALMODEL;
else
- self.renderflags &~= RF_EXTERNALMODEL;
+ self.renderflags &= ~RF_EXTERNALMODEL;
// draw it
self.drawmask = MASK_NORMAL;