Restored cutscene code

This commit is contained in:
2026-07-23 09:15:47 -05:00
parent 0852b8463b
commit 0667a44e14
55 changed files with 3066 additions and 24 deletions
@@ -10,6 +10,7 @@
#include "entity/component/display/entityposition.h"
#include "entity/component/display/entityrenderable.h"
#include "entity/component/physics/entityphysics.h"
#include "entity/component/trigger/entitytrigger.h"
#include "display/color.h"
errorret_t entityPrefabPlayerApply(
@@ -37,5 +38,17 @@ errorret_t entityPrefabPlayerApply(
entityPhysicsSetBodyType(mgr, entityId, physComp, PHYSICS_BODY_DYNAMIC);
entityPhysicsSetCollideMask(mgr, entityId, physComp, 0x3);
// Interact box: a little larger than the player's own body, so nearby
// interactable entities overlap it without needing to touch the player
// exactly (see entityPlayerTryInteract()).
componentid_t interactComp = entityAddComponent(
mgr, entityId, COMPONENT_TYPE_TRIGGER
);
physicsshape_t interactShape = {
.type = PHYSICS_SHAPE_CUBE,
.data.cube.halfExtents = { 1.0f, 1.0f, 1.0f }
};
entityTriggerSetShape(mgr, entityId, interactComp, interactShape);
errorOk();
}