Fixing bugs, added girl

This commit is contained in:
Vladislav Khorev committed 2026-05-02 20:34:43 +03:00
1 parent d24748df1e
commit 6149182f02
21 files changed
+1255815 -654

No files matched your search

+3 -2
View File
@@ -157,6 +157,7 @@ namespace ZL
teleportSparks->setUseWorldSpace(true);
teleportSparks->markConfigured();
// If the player happens to spawn already inside the zone, treat them
// as in-zone so they don't immediately teleport on the first update.
if (player && (player->position - teleportPosition).norm() <= teleportRadius) {
@@ -957,7 +958,7 @@ namespace ZL
// Check if we clicked on an NPC
Character* clickedNpc = raycastNpcs(camPos, rayDir);
if (clickedNpc && player) {
if (clickedNpc && player && clickedNpc->hp > 0) {
float distance = (player->position - clickedNpc->position).norm();
int npcIndex = -1;
for (size_t i = 0; i < npcs.size(); ++i) {
@@ -966,7 +967,7 @@ namespace ZL
break;
}
}
if (npcIndex != -1 && clickedNpc->hp > 0) {
if (npcIndex != -1) {
targetInteractiveObject = nullptr;
if (clickedNpc->canAttack) {