Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SetNpcPosYaw.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3API_CALLABLE(N(SetNpcPosYaw)) {
4 Bytecode* args = script->ptrReadPos;
5 s32 npcID = evt_get_variable(script, *args++);
6 f32 x = evt_get_float_variable(script, *args++);
7 f32 y = evt_get_float_variable(script, *args++);
8 f32 z = evt_get_float_variable(script, *args++);
9 f32 yaw = evt_get_float_variable(script, *args++);
10 Npc* npc = get_npc_safe(npcID);
11
12 npc->pos.x = x;
13 npc->pos.y = y;
14 npc->pos.z = z;
15 npc->yaw = yaw;
16 npc->colliderPos.x = npc->pos.x;
17 npc->colliderPos.y = npc->pos.y;
18 npc->colliderPos.z = npc->pos.z;
20 return ApiStatus_DONE2;
21}
@ NPC_FLAG_DIRTY_SHADOW
Definition enums.h:3014
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
f32 evt_get_float_variable(Evt *script, Bytecode var)
Definition evt.c:1930
Npc * get_npc_safe(s32 npcID)
Definition npc.c:1010
s32 flags
Vec3f colliderPos
Vec3f pos