armor = MSG_ReadByte ();
blood = MSG_ReadByte ();
- MSG_ReadVector(from, cl.protocol);
+ MSG_ReadVector(from, cls.protocol);
count = blood*0.5 + armor*0.5;
if (count < 10)
if(csqc_loaded)
return;
VectorClear(gunorg);
- Matrix4x4_CreateIdentity(&viewmodelmatrix);
- Matrix4x4_CreateIdentity(&r_refdef.viewentitymatrix);
+ viewmodelmatrix = identitymatrix;
+ r_refdef.viewentitymatrix = identitymatrix;
if (cls.state == ca_connected && cls.signon == SIGNONS)
{
// ent is the view entity (visible when out of body)
if (cl.intermission)
{
// entity is a fixed camera, just copy the matrix
- Matrix4x4_Copy(&r_refdef.viewentitymatrix, &ent->render.matrix);
- Matrix4x4_Copy(&viewmodelmatrix, &ent->render.matrix);
- r_refdef.viewentitymatrix.m[2][3] += cl.stats[STAT_VIEWHEIGHT];
- viewmodelmatrix.m[2][3] += cl.stats[STAT_VIEWHEIGHT];
+ if (cls.protocol == PROTOCOL_QUAKEWORLD)
+ Matrix4x4_CreateFromQuakeEntity(&r_refdef.viewentitymatrix, cl.qw_intermission_origin[0], cl.qw_intermission_origin[1], cl.qw_intermission_origin[2], cl.qw_intermission_angles[0], cl.qw_intermission_angles[1], cl.qw_intermission_angles[2], 1);
+ else
+ {
+ r_refdef.viewentitymatrix = ent->render.matrix;
+ r_refdef.viewentitymatrix.m[2][3] += cl.stats[STAT_VIEWHEIGHT];
+ }
+ viewmodelmatrix = r_refdef.viewentitymatrix;
}
else
{
Matrix4x4_OriginFromMatrix(&ent->render.matrix, vieworg);
VectorCopy(cl.viewangles, viewangles);
+ // apply qw weapon recoil effect (this did not work in QW)
+ // TODO: add a cvar to disable this
+ viewangles[PITCH] += cl.qw_weaponkick;
+
if (cl.onground)
{
if (!cl.oldonground)