| 435 | } |
| 436 | |
| 437 | void 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 | |
| 492 | void zNPCCommon::Destroy() |
| 493 | { |
no test coverage detected