[~April 10] glitchy de/select with anon functions

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [~April 10] glitchy de/select with anon functions

Re: [~April 10] glitchy de/select with anon functions

by Graf Zahl » Sun Apr 17, 2016 2:08 am

This cannot be changed.

A_Lower and A_Raise call P_SetPsprite (that's the function that changes weapon states and calls their action functions) when they are done with their job. With a multi-state setup this cleanly aborts the sequence. With a 3x call in the same state it cannot detect this and executes some more calls than are really needed, and those whack your example.

Re: [~April 10] glitchy de/select with anon functions

by Matt » Sat Apr 16, 2016 7:46 pm

Sorry, got distracted and wanted a placeholder before I forgot.
Spoiler:
IDFA. Hit 5 repeatedly.

Expected: choppy raise and lower for both. This still happens with 6.

Actual: if you hit 5 just as a weapon is about to raise again, it will immediately disappear no matter how far up it is and the other weapon will start coming up.

This does not happen if only one A_Raise/Lower is called in the anonymous function, or at least I haven't been able to replicate it that way.

Re: [~April 10] glitchy de/select with anon functions

by Graf Zahl » Sat Apr 16, 2016 2:04 am

Example! Example!!!

[~April 10] glitchy de/select with anon functions

by Matt » Sat Apr 16, 2016 1:17 am

If you set 2 weapons with a 0-length frame in the select and deselect states with an anonymous function with multiple A_Raise/Lower calls, and try to switch between them, some frames get skipped.

Top