Jump to content

Photo

ghost.zh


  • Please log in to reply
615 replies to this topic

#616 Saffith

Saffith

    IPv7 user

  • ZC Developers
  • Gender:Male

Posted 23 June 2017 - 03:03 PM

What is the reason for this?

I didn't see a reasonable way to handle it at the time, and I'm not entirely certain I do even now. The script data becomes invalid, so it should quit running immediately. It can't be handled like Quit, because that would clear the script you just set. It can't be handled like Waitframe, because then it would try to resume from the same point next frame. It would have to be a new special case.
 

I was not aware that this does not work, and I've been doing this->Script = 0 for years.

Calling Quit() sets the script to 0, so that might at least appear to work.
 

FFSCRIPT in ZASM does not seem to preclude setting the script on a this pointer.

This does it:
void do_set(const bool v, byte whichFFC)
{
    // Trying to change the current script?
    if(sarg1==FFSCRIPT && ri->ffcref==whichFFC)
        return;
        
    long temp = SH::get_arg(sarg2, v);
    set_register(sarg1, temp);
}



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users