Test players not respecting class settings

Summary

Have a class selector & designer setup to only allow 1 life to force spectate.

Upon switching a test player to said class selector / validating the agent is on the class ( Designer.IsOfClass[TestPlayer] ) / eliminating them, the setting is not respected & they just immediately respawn. The settings are respected by normal players though.

test_case <public> := class:
    @editable Selector <private> : class_and_team_selector_device = class_and_team_selector_device{}
    @editable Designer <private> : class_designer_device = class_designer_device{}

    AttemptClassChange<public>(Agent:agent, ?Timeout:float=5.0)<suspends>:logic=
        race:
            block{ Sleep(Timeout); false }
            block:
                loop:
                    Selector.ChangeClass(Agent)
                    Sleep(0.0)
                    if(Designer.IsOfClass[Agent]):
                        break
                true

test_device <public> := class(creative_device):
    @editable TestCase : test_case = test_case{}
    
    OnBegin<override>()<suspends>:void=
        Players := GetPlayspace().GetPlayers()
        TestPlayers := for(Agent:GetPlayspace().GetParticipants(), not player[Agent]){Agent}

        PlayerTasks := for(Player:Players){ spawn{TestCase.AttemptClassChange(Player)} }

        TestPlayerTasks := for(Agent:TestPlayers){ spawn{TestCase.AttemptClassChange(Agent)} }  

        for(Task:TestPlayerTasks + PlayerTasks){ Task.Await() }

        if:
           FirstPlayerFortCharacter := Players[0].GetFortCharacter[]
           FirstTestPlayerFortCharacter := TestPlayers[0].GetFortCharacter[]
        then:
            FirstPlayerFortCharacter.Damage(Inf) # Will spectate
            FirstTestPlayerFortCharacter.Damage(Inf)  # Will immediately respawn / never spectate

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Other

Steps to Reproduce

  • Add a class selector & designer device
  • Ensure they have the same class number
  • Set max respawns to 1
  • Compile verse
  • Place test_device in the scene
  • Hook references
  • launch session
  • Allow the code in the device to run

Expected Result

Test players are dealt with the same way as players as much as possible

Observed Result

Test players do not move to spectate.

Platform(s)

Windows

FORT-1124757 has been ‘Backlogged’. This is an issue that is in a queue to be addressed.