- Fixed: There was no working means to pass 'no state' to A_Chase.
Now 0 or an empty string will do that. - Copied the empty string fix for SC_CheckNumber to SC_CheckFloat. SVN r591 (trunk)
This commit is contained in:
parent
6a00173a12
commit
b8827b1b86
5 changed files with 27 additions and 7 deletions
|
|
@ -398,7 +398,11 @@ void A_BulletAttack (AActor *self)
|
|||
|
||||
FState *P_GetState(AActor *self, FState *CallingState, int offset)
|
||||
{
|
||||
if (offset>=0)
|
||||
if (offset == 0)
|
||||
{
|
||||
return NULL; // 0 means 'no state'
|
||||
}
|
||||
else if (offset>0)
|
||||
{
|
||||
return CallingState + offset;
|
||||
}
|
||||
|
|
@ -410,7 +414,7 @@ FState *P_GetState(AActor *self, FState *CallingState, int offset)
|
|||
const PClass *cls;
|
||||
cls = classname==NAME_None? RUNTIME_TYPE(self) : PClass::FindClass(classname);
|
||||
if (cls==NULL || cls->ActorInfo==NULL) return NULL; // shouldn't happen
|
||||
|
||||
|
||||
int numnames = (int)JumpParameters[offset+1];
|
||||
FState *jumpto = cls->ActorInfo->FindState(numnames, &JumpParameters[offset+2]);
|
||||
if (jumpto == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue