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

Method Reset

src/SB/Game/zNPCTypeCommon.cpp:437–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437void zNPCCommon::Reset()
438{
439 // non-matching: lis r4, globals@ha scheduled too early, needs to be r3
440 xSceneID2Name(globals.sceneCur, this->id);
441
442 xNPCBasic::Reset();
443
444 this->entShadow->dst_cast = this->cfg_npc->dst_castShadow;
445 this->entShadow->radius[0] = this->cfg_npc->rad_shadowCache;
446 this->entShadow->radius[1] = this->cfg_npc->rad_shadowRaster;
447
448 this->ParseProps();
449
450 this->npcset = *this->npcsetass;
451
452 if (this->entass->flags & XENT_COLLTYPE_TRIG)
453 {
454 xEntShow(this);
455 }
456 else
457 {
458 xEntHide(this);
459 }
460
461 if (this->flg_move & 0x2)
462 {
463 this->pflags |= XENT_COLLTYPE_DYN;
464 }
465 else if (this->flg_move & 0x4)
466 {
467 this->pflags &= (U8)~XENT_COLLTYPE_DYN;
468 }
469 else
470 {
471 this->pflags &= (U8)~XENT_COLLTYPE_DYN;
472 }
473
474 if (this->model->Anim)
475 {
476 xAnimPlaySetState(this->model->Anim->Single, &this->model->Anim->Table->StateList[0], 0.0f);
477 }
478
479 this->drv_data = this->PRIV_GetDriverData();
480 if (this->drv_data)
481 {
482 xEntDriveInit(this->drv_data, this);
483 this->drv_data->flags |= 0x1;
484 }
485
486 if (this->lassdata)
487 {
488 this->lassdata->stage = LASS_STAT_PENDING;
489 }
490}
491
492void zNPCCommon::Destroy()
493{

Callers 2

SetupMethod · 0.95
SysEventMethod · 0.95

Calls 8

ParsePropsMethod · 0.95
PRIV_GetDriverDataMethod · 0.95
xSceneID2NameFunction · 0.85
xEntShowFunction · 0.85
xEntHideFunction · 0.85
xAnimPlaySetStateFunction · 0.85
xEntDriveInitFunction · 0.85
ResetFunction · 0.50

Tested by

no test coverage detected