| 610 | } |
| 611 | |
| 612 | S32 zNPCCommon::Respawn(const xVec3* pos, zMovePoint* mvptFirst, zMovePoint* mvptSpawnRef) |
| 613 | { |
| 614 | static NPCMsg msg; |
| 615 | |
| 616 | memset(&msg, 0, sizeof(msg)); |
| 617 | |
| 618 | msg.msgid = NPC_MID_RESPAWN; |
| 619 | msg.from = this->id; |
| 620 | msg.sendto = this->id; |
| 621 | msg.infotype = NPC_MDAT_SPAWN; |
| 622 | |
| 623 | if (pos) |
| 624 | { |
| 625 | xVec3Copy(&msg.spawning.pos_spawn, pos); |
| 626 | } |
| 627 | else |
| 628 | { |
| 629 | xVec3Copy(&msg.spawning.pos_spawn, &this->entass->pos); |
| 630 | } |
| 631 | |
| 632 | if (mvptFirst) |
| 633 | { |
| 634 | msg.spawning.nav_firstMovepoint = mvptFirst; |
| 635 | } |
| 636 | else |
| 637 | { |
| 638 | msg.spawning.nav_firstMovepoint = NULL; |
| 639 | } |
| 640 | |
| 641 | msg.spawning.nav_spawnReference = mvptSpawnRef; |
| 642 | msg.spawning.spawnSuccess = 0; |
| 643 | |
| 644 | zNPCMsg_SendMsg(&msg, this); |
| 645 | |
| 646 | return msg.spawning.spawnSuccess; |
| 647 | } |
| 648 | |
| 649 | S32 zNPCCommon::NPCMessage(NPCMsg* mail) |
| 650 | { |
no test coverage detected