mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-25 05:11:07 +00:00
NX/VITA: nzp_lockviewmodel builtin
This commit is contained in:
parent
4fa92811be
commit
242147e667
3 changed files with 34 additions and 0 deletions
|
@ -1612,6 +1612,11 @@ void CL_ParseServerMessage (void)
|
||||||
doubletap_has_damage_buff = MSG_ReadByte();
|
doubletap_has_damage_buff = MSG_ReadByte();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case svc_lockviewmodel:
|
||||||
|
// This platform doesn't use this.
|
||||||
|
MSG_ReadByte();
|
||||||
|
break;
|
||||||
|
|
||||||
case svc_screenflash:
|
case svc_screenflash:
|
||||||
screenflash_color = MSG_ReadByte();
|
screenflash_color = MSG_ReadByte();
|
||||||
screenflash_duration = sv.time + MSG_ReadByte();
|
screenflash_duration = sv.time + MSG_ReadByte();
|
||||||
|
|
|
@ -1368,6 +1368,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
|
PF_BettyPrompt
|
||||||
|
@ -4005,6 +4032,7 @@ static builtin_t pr_builtin[] =
|
||||||
PF_SetPlayerName, // #505
|
PF_SetPlayerName, // #505
|
||||||
PF_SetDoubleTapVersion, // #506
|
PF_SetDoubleTapVersion, // #506
|
||||||
PF_ScreenFlash, // #507
|
PF_ScreenFlash, // #507
|
||||||
|
PF_LockViewmodel, // #508
|
||||||
};
|
};
|
||||||
|
|
||||||
builtin_t *pr_builtins = pr_builtin;
|
builtin_t *pr_builtins = pr_builtin;
|
||||||
|
|
|
@ -227,6 +227,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define svc_updatekills 53 // [string] to put in center of the screen
|
#define svc_updatekills 53 // [string] to put in center of the screen
|
||||||
|
|
||||||
#define svc_screenflash 54 // [byte] color [byte] duration [byte] type
|
#define svc_screenflash 54 // [byte] color [byte] duration [byte] type
|
||||||
|
#define svc_lockviewmodel 55
|
||||||
|
|
||||||
//
|
//
|
||||||
// client to server
|
// client to server
|
||||||
|
|
Loading…
Reference in a new issue