mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-21 19:32:34 +00:00
nzp_lockviewmodel implementation
This commit is contained in:
parent
8bc298bfb6
commit
b1018b3f64
3 changed files with 35 additions and 1 deletions
|
@ -1244,6 +1244,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();
|
||||
|
|
|
@ -3379,6 +3379,33 @@ void PF_ScreenFlash(void)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
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_BettyPrompt
|
||||
|
@ -3790,7 +3817,8 @@ ebfs_builtin_t pr_ebfs_builtins[] =
|
|||
{ 504, "nzp_bettyprompt", PF_BettyPrompt },
|
||||
{ 505, "nzp_setplayername", PF_SetPlayerName },
|
||||
{ 506, "nzp_setdoubletapver", PF_SetDoubleTapVersion },
|
||||
{ 507, "nzp_screenflash", PF_ScreenFlash }
|
||||
{ 507, "nzp_screenflash", PF_ScreenFlash },
|
||||
{ 508, "nzp_lockviewmodel", PF_LockViewmodel }
|
||||
|
||||
// 2001-11-15 DarkPlaces general builtin functions by Lord Havoc end
|
||||
|
||||
|
|
|
@ -160,6 +160,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