mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Fixed: CheckPlayerCamera not sync safe
- If a player is spying through another player, CheckPlayerCamera will return the TID of the player you are "spying", but as coopspy isn't a net command, this wont be reflected by all nodes. So to fix this, CheckPlayerCamera now returns -1 if a player's camera is that of any player at all. (thanks edward850)
This commit is contained in:
parent
aac0de3e48
commit
7143ae49e1
2 changed files with 2 additions and 2 deletions
|
@ -8394,7 +8394,7 @@ scriptwait:
|
|||
{
|
||||
int playernum = STACK(1);
|
||||
|
||||
if (playernum < 0 || playernum >= MAXPLAYERS || !playeringame[playernum] || players[playernum].camera == NULL)
|
||||
if (playernum < 0 || playernum >= MAXPLAYERS || !playeringame[playernum] || players[playernum].camera == NULL || players[playernum].camera->player != NULL)
|
||||
{
|
||||
STACK(1) = -1;
|
||||
}
|
||||
|
|
|
@ -4935,7 +4935,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetTics)
|
|||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_INT(tics_to_set, 0);
|
||||
|
||||
if (stateowner != self && self->player != NULL)
|
||||
if (stateowner != self && self->player != NULL && stateowner->IsKindOf(RUNTIME_CLASS(AWeapon)))
|
||||
{ // Is this a weapon? Need to check psp states for a match, then. Blah.
|
||||
for (int i = 0; i < NUMPSPRITES; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue