MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / VFXCycleLights

Method VFXCycleLights

src/SB/Game/zNPCTypeDuplotron.cpp:533–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533void zNPCDuplotron::VFXCycleLights(F32 dt, S32 fastpace)
534{
535 S32 amPaused;
536
537 if (this->tmr_blink < 0.0f)
538 {
539 this->idx_blink = this->idx_blink + 1;
540 if (this->idx_blink >= 5)
541 {
542 this->idx_blink = 0;
543 }
544 this->tmr_blink = 0.5f;
545 }
546
547 this->tmr_blink = MAX(-1.0f, this->tmr_blink - dt);
548
549 if (fastpace != 0)
550 {
551 this->tmr_blink = MAX(-1.0f, this->tmr_blink - dt);
552 }
553
554 if (1 < fastpace)
555 {
556 this->tmr_blink = MAX(-1.0f, this->tmr_blink - dt);
557 }
558
559 if ((this->spawner != NULL) && ((this->spawner->flg_spawner & 4) != 0))
560 {
561 amPaused = true;
562 }
563 else
564 {
565 if (this->spawner == NULL)
566 {
567 amPaused = true;
568 }
569 else
570 {
571 amPaused = false;
572 }
573 }
574
575 for (S32 i = 1; i <= 5; i++)
576
577 {
578 if (amPaused)
579 {
580 this->ModelAtomicHide(i, NULL);
581 }
582 else if (fastpace > 0)
583 {
584 if ((xrand() & 0x800000) != 0)
585 {
586 this->ModelAtomicShow(i, NULL);
587 }
588 else
589 {
590 this->ModelAtomicHide(i, NULL);

Callers 2

ProcessMethod · 0.80
SDS_CountdownMethod · 0.80

Calls 3

xrandFunction · 0.85
ModelAtomicHideMethod · 0.80
ModelAtomicShowMethod · 0.80

Tested by

no test coverage detected