- Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some changes that won't work with only a seg list being maintained. SVN r1016 (trunk)
This commit is contained in:
parent
165875c7df
commit
8a3edf9716
9 changed files with 123 additions and 53 deletions
|
|
@ -4827,6 +4827,8 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_CHECKWEAPON:
|
||||
if (script == 4)
|
||||
__asm nop
|
||||
if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
|
||||
activator->player->ReadyWeapon == NULL)
|
||||
{
|
||||
|
|
@ -5110,7 +5112,8 @@ int DLevelScript::RunScript ()
|
|||
case PCD_SETACTORANGLE: // [GRB]
|
||||
if (STACK(2) == 0)
|
||||
{
|
||||
activator->angle = STACK(1) << 16;
|
||||
if (activator != NULL)
|
||||
activator->angle = STACK(1) << 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5128,7 +5131,8 @@ int DLevelScript::RunScript ()
|
|||
case PCD_SETACTORPITCH:
|
||||
if (STACK(2) == 0)
|
||||
{
|
||||
activator->pitch = STACK(1) << 16;
|
||||
if (activator != NULL)
|
||||
activator->pitch = STACK(1) << 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5153,15 +5157,18 @@ int DLevelScript::RunScript ()
|
|||
|
||||
if (STACK(3) == 0)
|
||||
{
|
||||
state = activator->GetClass()->ActorInfo->FindState (statelist.Size(), &statelist[0], !!STACK(1));
|
||||
if (state != NULL)
|
||||
if (activator != NULL)
|
||||
{
|
||||
activator->SetState (state);
|
||||
STACK(3) = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(3) = 0;
|
||||
state = activator->GetClass()->ActorInfo->FindState (statelist.Size(), &statelist[0], !!STACK(1));
|
||||
if (state != NULL)
|
||||
{
|
||||
activator->SetState (state);
|
||||
STACK(3) = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(3) = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue