m_return_reason[0] = 0;
cls.demonum = -1;
+ // stop demo loop in case this fails
+ CL_Disconnect();
+ NetConn_ClientFrame();
+ NetConn_ServerFrame();
+
if (LHNETADDRESS_FromString(&cls.connect_address, host, 26000) && (cls.connect_mysocket = NetConn_ChooseClientSocketForAddress(&cls.connect_address)))
{
- // stop demo loop in case this fails
- CL_Disconnect();
-
cls.connect_trying = true;
cls.connect_remainingtries = 3;
cls.connect_nextsendtime = 0;
e->render.frame = e->render.frame2 = e->state_current.frame;
e->render.frame2time = cl.time;
e->render.framelerp = 0;
+ // make sure frame lerp won't last longer than 100ms
+ // (this mainly helps with models that use framegroups and
+ // switch between them infrequently)
+ e->render.frame1time = max(e->render.frame1time, e->render.frame2time - 0.1f);
}
}
else
Mod_CheckLoaded(e->render.model);
if (e->render.model->type == mod_alias || e->render.model->type == mod_sprite)
angles[0] = -angles[0];
- if (e->render.model->flags & EF_ROTATE)
+ if ((e->render.model->flags & EF_ROTATE) && (!e->state_current.tagentity && !(e->render.flags & RENDER_VIEWMODEL)))
{
angles[1] = ANGLEMOD(100*cl.time);
if (cl_itembobheight.value)
e->persistent.muzzleflash -= cl.frametime * 1000;
}
// LordHavoc: if the model has no flags, don't check each
- if (e->render.model && e->render.model->flags)
+ if (e->render.model && e->render.model->flags && (!e->state_current.tagentity && !(e->render.flags & RENDER_VIEWMODEL)))
{
if (e->render.model->flags & EF_GIB)
trailtype = 2;
ent->state_current.modelindex = cl.stats[STAT_WEAPON];
ent->state_current.frame = cl.stats[STAT_WEAPONFRAME];
ent->state_current.flags = RENDER_VIEWMODEL;
- if (cl.stats[STAT_HEALTH] <= 0)
+ if (cl.stats[STAT_HEALTH] <= 0 || cl.intermission)
ent->state_current.modelindex = 0;
else if (cl.items & IT_INVISIBILITY)
{
if (gamemode == GAME_TRANSFUSION)
- ent->state_current.alpha = 0.5;
+ ent->state_current.alpha = 128;
else
ent->state_current.modelindex = 0;
}
CL_SendCmd
=================
*/
-void CL_SendCmd(void)
+void CL_SendCmd(usercmd_t *cmd)
{
- usercmd_t cmd;
-
if (cls.signon == SIGNONS)
- {
- // get basic movement from keyboard
- CL_BaseMove(&cmd);
-
- // OS independent code
- IN_PreMove();
-
- // allow mice or other external controllers to add to the move
- IN_Move(&cmd);
-
- // OS independent code
- IN_PostMove();
-
- // send the unreliable message
- CL_SendMove(&cmd);
- }
+ CL_SendMove(cmd);
if (cls.demoplayback)
{