prog
This commit is contained in:
@@ -24,6 +24,7 @@ void entityInit(entity_t *entity, const entitytype_t type) {
|
||||
);
|
||||
|
||||
memoryZero(entity, sizeof(entity_t));
|
||||
entity->id = (uint8_t)(entity - ENTITIES);
|
||||
entity->type = type;
|
||||
|
||||
// Init. I did use a callback struct but it was not flexible enough.
|
||||
@@ -54,7 +55,7 @@ void entityUpdate(entity_t *entity) {
|
||||
for(uint8_t i = 0; i < WORLD_DIMENSIONS; i++) {
|
||||
if(entity->velocity[i] == 0) continue;
|
||||
|
||||
worldChunkPosAdd(&entity->position[i], entity->velocity[i]);
|
||||
worldPosAddSubtile(&entity->position[i], entity->velocity[i]);
|
||||
|
||||
// Friction
|
||||
worldsubtile_t v = entity->velocity[i];
|
||||
|
||||
Reference in New Issue
Block a user