}
void CSQCPlayer_Unpredict()
-{
+{SELFPARAM();
if(csqcplayer_status == CSQCPLAYERSTATUS_UNPREDICTED)
return;
if(csqcplayer_status != CSQCPLAYERSTATUS_PREDICTED)
}
void CSQCPlayer_SetMinsMaxs()
-{
+{SELFPARAM();
if(self.flags & FL_DUCKED)
{
self.mins = PL_CROUCH_MIN;
}
void CSQCPlayer_SavePrediction()
-{
+{SELFPARAM();
player_pmflags = self.flags;
csqcplayer_origin = self.origin;
csqcplayer_velocity = self.velocity;
void CSQC_ClientMovement_PlayerMove_Frame();
void PM_Movement_Move()
-{
+{SELFPARAM();
runstandardplayerphysics(self);
#ifdef CSQC
self.flags =
}
void CSQCPlayer_PredictTo(float endframe, float apply_error)
-{
+{SELFPARAM();
CSQCPlayer_Unpredict();
if(apply_error)
{
}
bool CSQCPlayer_IsLocalPlayer()
-{
+{SELFPARAM();
return (self == csqcplayer);
}
}
void CSQCPlayer_SetCamera()
-{
+{SELFPARAM();
vector v0;
v0 = pmove_vel; // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity
if(csqcplayer)
{
- entity oldself;
- oldself = self;
- self = csqcplayer;
+ setself(csqcplayer);
if(servercommandframe == 0 || clientcommandframe == 0)
{
// relink
setorigin(self, self.origin);
- self = oldself;
+ setself(this);
}
- entity view;
- view = CSQCModel_server2csqc(player_localentnum);
+ entity view = CSQCModel_server2csqc(player_localentnum);
if(view && view != csqcplayer)
{
- entity oldself = self;
- self = view;
- InterpolateOrigin_Do();
- self.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT);
- self = oldself;
+ WITH(entity, self, view, InterpolateOrigin_Do());
+ view.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT);
}
if(view)
}
float CSQCPlayer_PreUpdate()
-{
+{SELFPARAM();
if(self != csqcplayer)
return 0;
if(csqcplayer_status != CSQCPLAYERSTATUS_FROMSERVER)
}
float CSQCPlayer_PostUpdate()
-{
+{SELFPARAM();
if(self.entnum != player_localnum + 1)
return 0;
csqcplayer = self;