- implemented State as an actual native struct, so that its fields can be accessed from scripts.

- refactored state bitfield members into a flag word because the address of a bitfield cannot be taken, making such variables inaccessible to scripts.
- actually use PNativeStruct for representing native structs defined in a script.
This commit is contained in:
Christoph Oelckers 2016-11-21 21:34:34 +01:00
commit 135cfcf016
12 changed files with 102 additions and 65 deletions

View file

@ -584,11 +584,11 @@ bool AActor::InStateSequence(FState * newstate, FState * basestate)
int AActor::GetTics(FState * newstate)
{
int tics = newstate->GetTics();
if (isFast() && newstate->Fast)
if (isFast() && newstate->GetFast())
{
return tics - (tics>>1);
}
else if (isSlow() && newstate->Slow)
else if (isSlow() && newstate->GetSlow())
{
return tics<<1;
}