mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 19:10:50 +00:00
- fixed crash when actor is destroyed during spawning
This only applies to spawning via summon... CCMDs
Now 'summon decal 0' no longer crashes the game
(cherry picked from commit 43b94d829e
)
This commit is contained in:
parent
e0b5af42f3
commit
99c66e1bcc
1 changed files with 10 additions and 9 deletions
|
@ -2373,16 +2373,17 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
|
||||||
spawned->flags &= ~MF_FRIENDLY;
|
spawned->flags &= ~MF_FRIENDLY;
|
||||||
spawned->health = spawned->SpawnHealth();
|
spawned->health = spawned->SpawnHealth();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
|
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
|
||||||
{
|
{
|
||||||
spawned->Angles.Yaw = source->Angles.Yaw - angle;
|
spawned->Angles.Yaw = source->Angles.Yaw - angle;
|
||||||
spawned->tid = tid;
|
spawned->tid = tid;
|
||||||
spawned->special = special;
|
spawned->special = special;
|
||||||
for(i = 0; i < 5; i++) {
|
for(i = 0; i < 5; i++) {
|
||||||
spawned->args[i] = args[i];
|
spawned->args[i] = args[i];
|
||||||
|
}
|
||||||
|
if(tid) spawned->AddToHash();
|
||||||
}
|
}
|
||||||
if(tid) spawned->AddToHash();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue