Where it lands
Decode or execute in SQL (sqlcpu)
Native mode's simulation, native/src/sql/sim/, and its live suites. The
form's list has no entry for it.
What you are trying to do, and what stops you
P_DamageMobj's chase block ends with:
if (target->state == &states[target->info->spawnstate]
&& target->info->seestate != S_NULL)
P_SetMobjState (target, target->info->seestate);
Once the player exclusion came out of dm_chases, the player reaches that
too: hit while standing in S_PLAY, it goes to S_PLAY_RUN1. A
statement-level test pins that the SQL has no player term in dm_wakes or
dm_chases and that dm_state prefers the see frame to the pain frame. No
live arm runs the path.
What stops one being written today is the seed. dm_pained is 0 only when the
pain roll misses, MT_PLAYER's painchance is 255, and rndtable holds 255 at
exactly one of its 256 entries, index 158. So an arm has to seed prndindex
such that the pain draw lands on that entry, and the offset it needs depends
on how many numbers the tic drew before the claw. That offset has moved
several times recently, so a seed pinned to it would break for reasons
unrelated to what it tests.
What it might look like
A claw arm in sim_player_damage_live.rs with the player standing in
S_PLAY, prndindex seeded so the pain draw reads rndtable index 158,
asserting the player's mobj ends in S_PLAY_RUN1 with that state's own wait.
The fields that can carry the assertion are the state and the tics, and only
those. S_PLAY and S_PLAY_RUN1 carry the same sprite and the same frame,
28 and 0, so an arm asserting the picture would pass whether or not the wake
happened. The wait is the clearer of the two: S_PLAY waits forever and
S_PLAY_RUN1 waits four tics.
Worth building when the draw accounting settles. A seed that has to name a
draw offset is only as stable as the offset.
Does this touch any of these?
Would you want to implement it?
Yes
Where it lands
Decode or execute in SQL (sqlcpu)
Native mode's simulation,
native/src/sql/sim/, and its live suites. Theform's list has no entry for it.
What you are trying to do, and what stops you
P_DamageMobj's chase block ends with:Once the player exclusion came out of
dm_chases, the player reaches thattoo: hit while standing in
S_PLAY, it goes toS_PLAY_RUN1. Astatement-level test pins that the SQL has no player term in
dm_wakesordm_chasesand thatdm_stateprefers the see frame to the pain frame. Nolive arm runs the path.
What stops one being written today is the seed.
dm_painedis 0 only when thepain roll misses,
MT_PLAYER's painchance is 255, andrndtableholds 255 atexactly one of its 256 entries, index 158. So an arm has to seed
prndindexsuch that the pain draw lands on that entry, and the offset it needs depends
on how many numbers the tic drew before the claw. That offset has moved
several times recently, so a seed pinned to it would break for reasons
unrelated to what it tests.
What it might look like
A claw arm in
sim_player_damage_live.rswith the player standing inS_PLAY,prndindexseeded so the pain draw readsrndtableindex 158,asserting the player's mobj ends in
S_PLAY_RUN1with that state's own wait.The fields that can carry the assertion are the state and the tics, and only
those.
S_PLAYandS_PLAY_RUN1carry the same sprite and the same frame,28 and 0, so an arm asserting the picture would pass whether or not the wake
happened. The wait is the clearer of the two:
S_PLAYwaits forever andS_PLAY_RUN1waits four tics.Worth building when the draw accounting settles. A seed that has to name a
draw offset is only as stable as the offset.
Does this touch any of these?
Would you want to implement it?
Yes