Bunch of stuff done
This commit is contained in:
@@ -37,6 +37,12 @@ errorret_t rpgInit(void) {
|
||||
entityInit(ent, ENTITY_TYPE_PLAYER);
|
||||
RPG_CAMERA.mode = RPG_CAMERA_MODE_FOLLOW_ENTITY;
|
||||
RPG_CAMERA.followEntity.followEntityId = ent->id;
|
||||
{
|
||||
chunkpos_t cp;
|
||||
worldPosToChunkPos(&ent->position, &cp);
|
||||
chunkindex_t ci = mapGetChunkIndexAt(cp);
|
||||
if(ci != -1) entitySetChunk(ent, (uint8_t)ci);
|
||||
}
|
||||
|
||||
uint8_t npcIndex = entityGetAvailable();
|
||||
entity_t *npc = &ENTITIES[npcIndex];
|
||||
@@ -45,6 +51,12 @@ errorret_t rpgInit(void) {
|
||||
npc->position = (worldpos_t){ 3, 3, 0 };
|
||||
npc->interact.type = ENTITY_INTERACT_PRINT;
|
||||
npc->interact.data.message = "hello world";
|
||||
{
|
||||
chunkpos_t cp;
|
||||
worldPosToChunkPos(&npc->position, &cp);
|
||||
chunkindex_t ci = mapGetChunkIndexAt(cp);
|
||||
if(ci != -1) entitySetChunk(npc, (uint8_t)ci);
|
||||
}
|
||||
|
||||
npcpath_t *path = &npc->data.npc.moveData.path;
|
||||
path->positions[0] = (worldpos_t){ 3, 3, 0 };
|
||||
|
||||
Reference in New Issue
Block a user