- Changed parameter storage for states to use a separate member variable
instead of forcing it into misc1/misc2. Although this increases the EXE's size by 30k it has several advantages: * State parameters are no longer limited to 65535 for all states combined. * State parameters can be used with long durations. * Some special handling in the weapon state set functions can be removed. SVN r364 (trunk)
This commit is contained in:
parent
b178bb2612
commit
88ca8e630c
5 changed files with 64 additions and 104 deletions
|
|
@ -156,12 +156,12 @@ bool ACustomInventory::CallStateChain (AActor *actor, FState * State)
|
|||
//==========================================================================
|
||||
int CheckIndex(int paramsize, FState ** pcallstate)
|
||||
{
|
||||
if (!(CallingState->Frame&SF_STATEPARAM)) return -1;
|
||||
if (CallingState->ParameterIndex == 0) return -1;
|
||||
|
||||
unsigned int index = CallingState->GetMisc1_2();
|
||||
if (index > StateParameters.Size()-paramsize-2) return -1;
|
||||
unsigned int index = (unsigned int) CallingState->ParameterIndex-1;
|
||||
if (index > StateParameters.Size()-paramsize) return -1;
|
||||
if (pcallstate) *pcallstate=CallingState;
|
||||
return index+2; // skip the misc parameters
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue