MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / process_server

Method process_server

Engine/source/afx/afxSelectron.cpp:644–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642// private
643
644void afxSelectron::process_server()
645{
646 if (effect_state != INACTIVE_STATE)
647 effect_elapsed += TickSec;
648
649 U8 pending_state = effect_state;
650
651 // check for state changes
652 switch (effect_state)
653 {
654 case INACTIVE_STATE:
655 if (marks_mask & MARK_ACTIVATE)
656 pending_state = ACTIVE_STATE;
657 break;
658 case ACTIVE_STATE:
659 if (marks_mask & MARK_INTERRUPT)
660 pending_state = CLEANUP_STATE;
661 else if (marks_mask & MARK_SHUTDOWN)
662 pending_state = CLEANUP_STATE;
663 else if (state_expired())
664 pending_state = CLEANUP_STATE;
665 break;
666 case CLEANUP_STATE:
667 if (cleanup_over())
668 pending_state = DONE_STATE;
669 break;
670 }
671
672 if (effect_state != pending_state)
673 change_state_s(pending_state);
674
675 if (effect_state == INACTIVE_STATE)
676 return;
677
678 //--------------------------//
679
680 // sample the constraints
681 constraint_mgr->sample(TickSec, Platform::getVirtualMilliseconds());
682
683 for (S32 i = 0; i < NUM_PHRASES; i++)
684 if (phrases[i])
685 phrases[i]->update(TickSec, effect_elapsed);
686}
687
688void afxSelectron::change_state_s(U8 pending_state)
689{

Callers

nothing calls this directly

Calls 2

sampleMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected