mirror of
https://github.com/nzp-team/glquake.git
synced 2024-11-10 06:31:35 +00:00
nzp_lockviewmodel builtin
This commit is contained in:
parent
81b3eab453
commit
cc6e956dc6
3 changed files with 33 additions and 0 deletions
|
@ -1125,6 +1125,11 @@ void CL_ParseServerMessage (void)
|
|||
doubletap_has_damage_buff = MSG_ReadByte();
|
||||
break;
|
||||
|
||||
case svc_lockviewmodel:
|
||||
// This platform doesn't use this.
|
||||
MSG_ReadByte();
|
||||
break;
|
||||
|
||||
case svc_screenflash:
|
||||
screenflash_color = MSG_ReadByte();
|
||||
screenflash_duration = sv.time + MSG_ReadByte();
|
||||
|
|
|
@ -3318,6 +3318,33 @@ void PF_SetDoubleTapVersion(void)
|
|||
MSG_WriteByte (&client->message, state);
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
PF_LockViewmodel
|
||||
|
||||
Server tells client to lock their
|
||||
viewmodel in place, if applicable.
|
||||
|
||||
nzp_lockviewmodel()
|
||||
=================
|
||||
*/
|
||||
void PF_LockViewmodel(void)
|
||||
{
|
||||
client_t *client;
|
||||
int entnum;
|
||||
int state;
|
||||
|
||||
entnum = G_EDICTNUM(OFS_PARM0);
|
||||
state = G_FLOAT(OFS_PARM1);
|
||||
|
||||
if (entnum < 1 || entnum > svs.maxclients)
|
||||
return;
|
||||
|
||||
client = &svs.clients[entnum-1];
|
||||
MSG_WriteByte (&client->message, svc_lockviewmodel);
|
||||
MSG_WriteByte (&client->message, state);
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
PF_ScreenFlash
|
||||
|
|
|
@ -159,6 +159,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define svc_playername 48
|
||||
#define svc_doubletap 49
|
||||
#define svc_screenflash 50 // [byte] color [byte] duration [byte] type
|
||||
#define svc_lockviewmodel 51
|
||||
|
||||
//
|
||||
// client to server
|
||||
|
|
Loading…
Reference in a new issue