mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- Fixed: If there are not enough states for a spawned debris chunk, A_SpawnDebris should still
fling it somewhere. SVN r3963 (trunk)
This commit is contained in:
parent
f4e108552e
commit
a71736b598
1 changed files with 11 additions and 8 deletions
|
@ -2299,15 +2299,18 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnDebris)
|
|||
for (i = 0; i < GetDefaultByType(debris)->health; i++)
|
||||
{
|
||||
mo = Spawn(debris, self->x+((pr_spawndebris()-128)<<12),
|
||||
self->y+((pr_spawndebris()-128)<<12),
|
||||
self->z+(pr_spawndebris()*self->height/256+self->GetBobOffset()), ALLOW_REPLACE);
|
||||
if (mo && transfer_translation)
|
||||
self->y + ((pr_spawndebris()-128)<<12),
|
||||
self->z + (pr_spawndebris()*self->height/256+self->GetBobOffset()), ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->Translation = self->Translation;
|
||||
}
|
||||
if (mo && i < mo->GetClass()->ActorInfo->NumOwnedStates)
|
||||
{
|
||||
mo->SetState (mo->GetClass()->ActorInfo->OwnedStates + i);
|
||||
if (transfer_translation)
|
||||
{
|
||||
mo->Translation = self->Translation;
|
||||
}
|
||||
if (i < mo->GetClass()->ActorInfo->NumOwnedStates)
|
||||
{
|
||||
mo->SetState(mo->GetClass()->ActorInfo->OwnedStates + i);
|
||||
}
|
||||
mo->velz = FixedMul(mult_v, ((pr_spawndebris()&7)+5)*FRACUNIT);
|
||||
mo->velx = FixedMul(mult_h, pr_spawndebris.Random2()<<(FRACBITS-6));
|
||||
mo->vely = FixedMul(mult_h, pr_spawndebris.Random2()<<(FRACBITS-6));
|
||||
|
|
Loading…
Reference in a new issue