mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
- last commit was missing one file.
SVN r1244 (trunk)
This commit is contained in:
parent
954955c5a5
commit
1cbaa24f96
1 changed files with 0 additions and 45 deletions
|
@ -354,51 +354,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_BulletAttack)
|
|||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Resolves a label parameter
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FState *P_GetState(AActor *self, FState *CallingState, int offset)
|
||||
{
|
||||
if (offset == 0 || offset == INT_MIN)
|
||||
{
|
||||
return NULL; // 0 means 'no state'
|
||||
}
|
||||
else if (offset>0)
|
||||
{
|
||||
if (CallingState == NULL) return NULL;
|
||||
return CallingState + offset;
|
||||
}
|
||||
else if (self != NULL)
|
||||
{
|
||||
offset = -offset;
|
||||
|
||||
FName classname = JumpParameters[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)
|
||||
{
|
||||
const char *dot="";
|
||||
Printf("Jump target '");
|
||||
if (classname != NAME_None) Printf("%s::", classname.GetChars());
|
||||
for (int i=0;i<numnames;i++)
|
||||
{
|
||||
Printf("%s%s", dot, JumpParameters[offset+2+i].GetChars());
|
||||
dot = ".";
|
||||
}
|
||||
Printf("' not found in %s\n", self->GetClass()->TypeName.GetChars());
|
||||
}
|
||||
return jumpto;
|
||||
}
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Do the state jump
|
||||
|
|
Loading…
Reference in a new issue