Working on doors and scripting

This commit is contained in:
Vladislav Khorev committed 2026-05-14 21:28:41 +03:00
1 parent 774397f690
commit 0f2b2e55af
11 files changed
+322 -9

No files matched your search

+7 -3
View File
@@ -515,8 +515,8 @@ namespace ZL
for (auto& intObj : interactiveObjects) {
std::cout << "[RAYCAST] Checking object: " << intObj.loadedObject.name << " (active: " << intObj.isActive << ")" << std::endl;
if (!intObj.isActive) {
std::cout << "[RAYCAST] -> Object inactive, skipping" << std::endl;
if (!intObj.isActive || intObj.isAnimating) {
std::cout << "[RAYCAST] -> Object inactive or animating, skipping" << std::endl;
continue;
}
@@ -1054,6 +1054,10 @@ namespace ZL
void Location::update(int64_t delta)
{
for (auto& intObj : interactiveObjects) {
intObj.update(delta);
}
if (player) {
player->update(delta);
dialogueSystem.update(static_cast<int>(delta));
@@ -1068,7 +1072,7 @@ namespace ZL
updateDynamicReplans(delta);
// Check if player reached target interactive object
if (targetInteractiveObject && player) {
if (targetInteractiveObject && player && !targetInteractiveObject->isAnimating) {
float distToObject = (player->position - targetInteractiveObject->position).norm();
// If player is close enough to pick up the item