Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea8f64c940 |
No files matched your search
+252
-235
@@ -2,36 +2,25 @@
|
||||
"chatHistory": [
|
||||
[],
|
||||
[],
|
||||
[
|
||||
{
|
||||
"incoming": true,
|
||||
"text": "Bishkek residents are increasingly complaining of depression and apathy. Watch the latest video about this on our channel!"
|
||||
}
|
||||
]
|
||||
[]
|
||||
],
|
||||
"chatPreviewMsg": [
|
||||
"Бекзат, ты где? Я жду....",
|
||||
"",
|
||||
"Bishkek residents are ..."
|
||||
"",
|
||||
""
|
||||
],
|
||||
"chatUnread": [
|
||||
true,
|
||||
true,
|
||||
false
|
||||
true
|
||||
],
|
||||
"currentLocationName": "uni_interior",
|
||||
"currentLocationName": "",
|
||||
"globalFloats": {
|
||||
"player_hp": 200.0
|
||||
},
|
||||
"globalInts": {
|
||||
"lection_is_over": 1,
|
||||
"news_chat_opened": 1
|
||||
},
|
||||
"globalInts": {},
|
||||
"inventory": {
|
||||
"items": [
|
||||
"phone",
|
||||
"journal"
|
||||
]
|
||||
"items": []
|
||||
},
|
||||
"isDarklands": false,
|
||||
"isDawn": false,
|
||||
@@ -39,7 +28,9 @@
|
||||
"locations": {
|
||||
"location_dorm": {
|
||||
"dialogueState": {
|
||||
"active": false
|
||||
"active": true,
|
||||
"currentNodeId": "line_1",
|
||||
"dialogueId": "dialog_start001"
|
||||
},
|
||||
"interactiveObjectStates": [
|
||||
{
|
||||
@@ -274,28 +265,58 @@
|
||||
},
|
||||
{
|
||||
"alpha": 1.0,
|
||||
"animTask": {
|
||||
"durationMs": 10.0,
|
||||
"elapsedMs": 0.0,
|
||||
"startPosX": 1.100000023841858,
|
||||
"startPosY": 0.9695000052452087,
|
||||
"startPosZ": -19.950000762939453,
|
||||
"startRotY": 0.0,
|
||||
"startScale": 1.0,
|
||||
"targetPosX": 1.100000023841858,
|
||||
"targetPosY": 0.9695000052452087,
|
||||
"targetPosZ": -19.950000762939453,
|
||||
"targetRotY": 1.5707963705062866,
|
||||
"targetScale": 1.0,
|
||||
"type": 1
|
||||
},
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"isAnimating": true,
|
||||
"positionX": 1.100000023841858,
|
||||
"positionY": 0.9695000052452087,
|
||||
"positionZ": -19.950000762939453,
|
||||
"rotationY": 1.5707963705062866,
|
||||
"rotationY": 0.0,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 1.0,
|
||||
"animTask": {
|
||||
"durationMs": 10.0,
|
||||
"elapsedMs": 0.0,
|
||||
"startPosX": -1.100000023841858,
|
||||
"startPosY": 0.9695000052452087,
|
||||
"startPosZ": -19.950000762939453,
|
||||
"startRotY": 0.0,
|
||||
"startScale": 1.0,
|
||||
"targetPosX": -1.100000023841858,
|
||||
"targetPosY": 0.9695000052452087,
|
||||
"targetPosZ": -19.950000762939453,
|
||||
"targetRotY": -1.5707963705062866,
|
||||
"targetScale": 1.0,
|
||||
"type": 1
|
||||
},
|
||||
"isActive": true,
|
||||
"isAnimating": true,
|
||||
"positionX": -1.100000023841858,
|
||||
"positionY": 0.9695000052452087,
|
||||
"positionZ": -19.950000762939453,
|
||||
"rotationY": 0.0,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 1.0,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": -1.100000023841858,
|
||||
"positionY": 0.9695000052452087,
|
||||
"positionZ": -19.950000762939453,
|
||||
"rotationY": -1.5707963705062866,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 1.0,
|
||||
"isActive": false,
|
||||
"isAnimating": false,
|
||||
"positionX": 6.664400577545166,
|
||||
"positionY": 0.8999999761581421,
|
||||
"positionZ": -12.526200294494629,
|
||||
@@ -304,7 +325,7 @@
|
||||
},
|
||||
{
|
||||
"alpha": 1.0,
|
||||
"isActive": false,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": 5.842959880828857,
|
||||
"positionY": 0.9284919500350952,
|
||||
@@ -359,7 +380,7 @@
|
||||
"positionX": 1.100000023841858,
|
||||
"positionY": 0.9695000052452087,
|
||||
"positionZ": -15.699999809265137,
|
||||
"rotationY": 1.5707963705062866,
|
||||
"rotationY": 0.0,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
@@ -403,8 +424,8 @@
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 0.0,
|
||||
"isActive": false,
|
||||
"alpha": 1.0,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": 0.0,
|
||||
"positionY": 2.8500001430511475,
|
||||
@@ -423,8 +444,8 @@
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 0.0,
|
||||
"isActive": false,
|
||||
"alpha": 1.0,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": 4.949999809265137,
|
||||
"positionY": 2.8500001430511475,
|
||||
@@ -433,8 +454,8 @@
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 0.0,
|
||||
"isActive": false,
|
||||
"alpha": 1.0,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": -4.949999809265137,
|
||||
"positionY": 2.8500001430511475,
|
||||
@@ -454,9 +475,9 @@
|
||||
}
|
||||
],
|
||||
"locationState": {
|
||||
"activeNavigationIndex": 2,
|
||||
"cameraAzimuth": -2.805004358291626,
|
||||
"cameraInclination": 0.5385987758636475,
|
||||
"activeNavigationIndex": 0,
|
||||
"cameraAzimuth": -2.3499999046325684,
|
||||
"cameraInclination": 1.103600025177002,
|
||||
"isDarklands": false,
|
||||
"isDawn": false,
|
||||
"isNight": false,
|
||||
@@ -464,34 +485,18 @@
|
||||
"targetInteractiveObjectIndex": -1,
|
||||
"targetTeleportZoneIndex": -1,
|
||||
"taxi": {
|
||||
"taxiArrivedCallbackCalled": true,
|
||||
"taxiArrivedCallbackCalled": false,
|
||||
"taxiCar": {
|
||||
"currentWaypoint": 3,
|
||||
"currentWaypoint": 0,
|
||||
"mode": 1,
|
||||
"positionX": -18.432445526123047,
|
||||
"positionX": -20.850000381469727,
|
||||
"positionY": 0.0,
|
||||
"positionZ": -0.437654584646225,
|
||||
"rotation": -0.05602673813700676,
|
||||
"steeringAngle": 3.249874258592911e-10,
|
||||
"velocity": 3.600008487701416,
|
||||
"positionZ": 64.0,
|
||||
"rotation": 0.0,
|
||||
"steeringAngle": 0.0,
|
||||
"velocity": 0.0,
|
||||
"waypointReachRadius": 5.0,
|
||||
"waypoints": [
|
||||
{
|
||||
"x": -20.850000381469727,
|
||||
"y": 0.0,
|
||||
"z": 30.0
|
||||
},
|
||||
{
|
||||
"x": -19.350000381469727,
|
||||
"y": 0.0,
|
||||
"z": 24.0
|
||||
},
|
||||
{
|
||||
"x": -19.350000381469727,
|
||||
"y": 0.0,
|
||||
"z": 14.0
|
||||
}
|
||||
]
|
||||
"waypoints": []
|
||||
},
|
||||
"taxiCarInitialState": {
|
||||
"currentWaypoint": 0,
|
||||
@@ -526,7 +531,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"tutorialInteractiveObjectsLocked": false
|
||||
"tutorialInteractiveObjectsLocked": true
|
||||
},
|
||||
"npcStates": [
|
||||
{
|
||||
@@ -545,7 +550,13 @@
|
||||
-15.038200378417969
|
||||
],
|
||||
"hp": 100.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
-6.296899795532227,
|
||||
0.0,
|
||||
-15.041899681091309
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
-6.334780216217041,
|
||||
0.0,
|
||||
@@ -560,9 +571,9 @@
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
-6.334780216217041,
|
||||
-6.296899795532227,
|
||||
0.0,
|
||||
-15.038200378417969
|
||||
-15.041899681091309
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -570,11 +581,11 @@
|
||||
"attackTargetIndex": -1,
|
||||
"attack_cooldown": 0.0,
|
||||
"battle_state": 0,
|
||||
"currentState": 1,
|
||||
"currentState": 0,
|
||||
"currentWaypointIndex": 0,
|
||||
"enabled": true,
|
||||
"faceTargetIndex": -1,
|
||||
"facingAngle": -1.6831790208816528,
|
||||
"facingAngle": 0.0,
|
||||
"homeDriftCheckTimer": 5.0,
|
||||
"homePosition": [
|
||||
0.0,
|
||||
@@ -584,40 +595,40 @@
|
||||
"hp": 200.0,
|
||||
"pathWaypoints": [
|
||||
[
|
||||
-11.399999618530273,
|
||||
6.8031005859375,
|
||||
0.0,
|
||||
0.0
|
||||
-14.641900062561035
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
-10.641555786132813,
|
||||
6.7634501457214355,
|
||||
0.0,
|
||||
0.3920173943042755
|
||||
-14.60219955444336
|
||||
],
|
||||
"requestedWalkTarget": [
|
||||
-11.399999618530273,
|
||||
6.7634501457214355,
|
||||
0.0,
|
||||
0.0
|
||||
-14.60219955444336
|
||||
],
|
||||
"showWeapon": false,
|
||||
"targetFacingAngle": -1.0937435626983643,
|
||||
"showWeapon": true,
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
-11.399999618530273,
|
||||
6.8031005859375,
|
||||
0.0,
|
||||
0.0
|
||||
-14.641900062561035
|
||||
]
|
||||
},
|
||||
"scriptGlobals": {
|
||||
"alik_door_opened": false,
|
||||
"bathroom_door_opened": false,
|
||||
"journal_picked_up": true,
|
||||
"phone_picked_up": true,
|
||||
"player_door_opened": true
|
||||
"journal_picked_up": false,
|
||||
"phone_picked_up": false,
|
||||
"player_door_opened": false
|
||||
},
|
||||
"teleportZoneState": {
|
||||
"tp_dorm_to_2floor": false,
|
||||
"tp_dorm_to_loc2": true
|
||||
"tp_dorm_to_loc2": false
|
||||
},
|
||||
"triggerZoneState": {
|
||||
"ladder_zone001": {
|
||||
@@ -629,7 +640,7 @@
|
||||
"playerInside": false
|
||||
},
|
||||
"taxi_zone001": {
|
||||
"enabled": false,
|
||||
"enabled": true,
|
||||
"playerInside": false
|
||||
}
|
||||
}
|
||||
@@ -672,8 +683,8 @@
|
||||
],
|
||||
"locationState": {
|
||||
"activeNavigationIndex": 0,
|
||||
"cameraAzimuth": -0.06499999761581421,
|
||||
"cameraInclination": 1.1135984659194946,
|
||||
"cameraAzimuth": -2.3499999046325684,
|
||||
"cameraInclination": 1.103600025177002,
|
||||
"isDarklands": false,
|
||||
"isDawn": false,
|
||||
"isNight": false,
|
||||
@@ -734,11 +745,11 @@
|
||||
"attackTargetIndex": -1,
|
||||
"attack_cooldown": 0.0,
|
||||
"battle_state": 0,
|
||||
"currentState": 1,
|
||||
"currentState": 0,
|
||||
"currentWaypointIndex": 0,
|
||||
"enabled": true,
|
||||
"faceTargetIndex": -1,
|
||||
"facingAngle": -1.5379809141159058,
|
||||
"facingAngle": 0.0,
|
||||
"homeDriftCheckTimer": 5.0,
|
||||
"homePosition": [
|
||||
0.0,
|
||||
@@ -746,30 +757,24 @@
|
||||
0.0
|
||||
],
|
||||
"hp": 200.0,
|
||||
"pathWaypoints": [
|
||||
[
|
||||
6.633500099182129,
|
||||
0.0,
|
||||
-9.649999618530273
|
||||
]
|
||||
],
|
||||
"pathWaypoints": [],
|
||||
"position": [
|
||||
8.072282791137695,
|
||||
5.0,
|
||||
0.0,
|
||||
-9.602767944335938
|
||||
-18.399999618530273
|
||||
],
|
||||
"requestedWalkTarget": [
|
||||
6.633500099182129,
|
||||
5.0,
|
||||
0.0,
|
||||
-9.649999618530273
|
||||
-18.399999618530273
|
||||
],
|
||||
"showWeapon": false,
|
||||
"targetFacingAngle": -1.5379809141159058,
|
||||
"showWeapon": true,
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
6.633500099182129,
|
||||
5.0,
|
||||
0.0,
|
||||
-9.649999618530273
|
||||
-18.399999618530273
|
||||
]
|
||||
},
|
||||
"scriptGlobals": null,
|
||||
@@ -942,17 +947,32 @@
|
||||
"positionX": 1.5,
|
||||
"positionY": 0.9750000238418579,
|
||||
"positionZ": 6.400000095367432,
|
||||
"rotationY": -1.5707963705062866,
|
||||
"rotationY": 0.0,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 1.0,
|
||||
"animTask": {
|
||||
"durationMs": 10.0,
|
||||
"elapsedMs": 0.0,
|
||||
"startPosX": 1.5,
|
||||
"startPosY": 0.9750000238418579,
|
||||
"startPosZ": -1.5999999046325684,
|
||||
"startRotY": 0.0,
|
||||
"startScale": 1.0,
|
||||
"targetPosX": 1.5,
|
||||
"targetPosY": 0.9750000238418579,
|
||||
"targetPosZ": -1.5999999046325684,
|
||||
"targetRotY": -1.5707963705062866,
|
||||
"targetScale": 1.0,
|
||||
"type": 1
|
||||
},
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"isAnimating": true,
|
||||
"positionX": 1.5,
|
||||
"positionY": 0.9750000238418579,
|
||||
"positionZ": -1.5999999046325684,
|
||||
"rotationY": -1.5707963705062866,
|
||||
"rotationY": 0.0,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
@@ -982,7 +1002,7 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": 0.9750000238418579,
|
||||
"positionZ": 8.000000953674316,
|
||||
"rotationY": 1.5707963705062866,
|
||||
"rotationY": 0.0,
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
@@ -1006,8 +1026,8 @@
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 0.0,
|
||||
"isActive": false,
|
||||
"alpha": 1.0,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": 0.0,
|
||||
"positionY": 2.4499998092651367,
|
||||
@@ -1046,8 +1066,8 @@
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"alpha": 0.0,
|
||||
"isActive": false,
|
||||
"alpha": 1.0,
|
||||
"isActive": true,
|
||||
"isAnimating": false,
|
||||
"positionX": 3.75,
|
||||
"positionY": 2.4499998092651367,
|
||||
@@ -1067,9 +1087,9 @@
|
||||
}
|
||||
],
|
||||
"locationState": {
|
||||
"activeNavigationIndex": 2,
|
||||
"cameraAzimuth": 0.7391971945762634,
|
||||
"cameraInclination": 0.9035983681678772,
|
||||
"activeNavigationIndex": 0,
|
||||
"cameraAzimuth": -2.3499999046325684,
|
||||
"cameraInclination": 1.103600025177002,
|
||||
"isDarklands": false,
|
||||
"isDawn": false,
|
||||
"isNight": false,
|
||||
@@ -1116,34 +1136,40 @@
|
||||
"battle_state": 0,
|
||||
"currentState": 0,
|
||||
"currentWaypointIndex": 0,
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"faceTargetIndex": -1,
|
||||
"facingAngle": 3.1415927410125732,
|
||||
"homeDriftCheckTimer": 4.749999046325684,
|
||||
"facingAngle": 0.0,
|
||||
"homeDriftCheckTimer": 5.0,
|
||||
"homePosition": [
|
||||
4.941939830780029,
|
||||
-0.2859399914741516,
|
||||
0.0,
|
||||
6.641109943389893
|
||||
13.964099884033203
|
||||
],
|
||||
"hp": 100.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
-0.31001949310302734,
|
||||
0.0,
|
||||
13.974998474121094
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
4.911655902862549,
|
||||
-0.2859399914741516,
|
||||
0.0,
|
||||
6.640154838562012
|
||||
13.964099884033203
|
||||
],
|
||||
"requestedWalkTarget": [
|
||||
4.941939830780029,
|
||||
-0.2859399914741516,
|
||||
0.0,
|
||||
6.641109943389893
|
||||
13.964099884033203
|
||||
],
|
||||
"showWeapon": false,
|
||||
"targetFacingAngle": 3.1415927410125732,
|
||||
"showWeapon": true,
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
4.941939830780029,
|
||||
-0.31001949310302734,
|
||||
0.0,
|
||||
6.641109943389893
|
||||
13.974998474121094
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1152,17 +1178,23 @@
|
||||
"battle_state": 0,
|
||||
"currentState": 0,
|
||||
"currentWaypointIndex": 0,
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"faceTargetIndex": -1,
|
||||
"facingAngle": 3.1415927410125732,
|
||||
"homeDriftCheckTimer": 2.8999974727630615,
|
||||
"homeDriftCheckTimer": 5.0,
|
||||
"homePosition": [
|
||||
0.7996190190315247,
|
||||
0.0,
|
||||
-9.556790351867676
|
||||
],
|
||||
"hp": 100.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
0.7899808883666992,
|
||||
0.0,
|
||||
-9.52500057220459
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
0.7996190190315247,
|
||||
0.0,
|
||||
@@ -1173,8 +1205,8 @@
|
||||
0.0,
|
||||
-9.556790351867676
|
||||
],
|
||||
"showWeapon": false,
|
||||
"targetFacingAngle": 3.1415927410125732,
|
||||
"showWeapon": true,
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
0.7899808883666992,
|
||||
@@ -1198,7 +1230,13 @@
|
||||
13.964099884033203
|
||||
],
|
||||
"hp": 35.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
-0.010019302368164063,
|
||||
0.0,
|
||||
13.974998474121094
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
0.0,
|
||||
0.0,
|
||||
@@ -1213,9 +1251,9 @@
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 5.5,
|
||||
"walkTarget": [
|
||||
-0.010019302368164063,
|
||||
0.0,
|
||||
0.0,
|
||||
13.964099884033203
|
||||
13.974998474121094
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1234,7 +1272,13 @@
|
||||
-6.400000095367432
|
||||
],
|
||||
"hp": 35.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
-0.010019302368164063,
|
||||
0.0,
|
||||
-6.425000190734863
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
0.0,
|
||||
0.0,
|
||||
@@ -1249,9 +1293,9 @@
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.5,
|
||||
"walkTarget": [
|
||||
-0.010019302368164063,
|
||||
0.0,
|
||||
0.0,
|
||||
-6.400000095367432
|
||||
-6.425000190734863
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1270,7 +1314,13 @@
|
||||
12.0
|
||||
],
|
||||
"hp": 35.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
-5.010019302368164,
|
||||
0.0,
|
||||
11.974998474121094
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
-5.0,
|
||||
0.0,
|
||||
@@ -1285,9 +1335,9 @@
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
-5.0,
|
||||
-5.010019302368164,
|
||||
0.0,
|
||||
12.0
|
||||
11.974998474121094
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1306,7 +1356,13 @@
|
||||
12.0
|
||||
],
|
||||
"hp": 35.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
4.889980316162109,
|
||||
0.0,
|
||||
11.875
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
5.0,
|
||||
0.0,
|
||||
@@ -1321,96 +1377,51 @@
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 4.800000190734863,
|
||||
"walkTarget": [
|
||||
5.0,
|
||||
4.889980316162109,
|
||||
0.0,
|
||||
12.0
|
||||
11.875
|
||||
]
|
||||
},
|
||||
{
|
||||
"attackTargetIndex": -1,
|
||||
"attack_cooldown": 0.0,
|
||||
"battle_state": 0,
|
||||
"currentState": 1,
|
||||
"currentWaypointIndex": 4,
|
||||
"enabled": true,
|
||||
"currentState": 0,
|
||||
"currentWaypointIndex": 0,
|
||||
"enabled": false,
|
||||
"faceTargetIndex": -1,
|
||||
"facingAngle": -0.2980719804763794,
|
||||
"homeDriftCheckTimer": 4.749999046325684,
|
||||
"facingAngle": 3.1415927410125732,
|
||||
"homeDriftCheckTimer": 5.0,
|
||||
"homePosition": [
|
||||
5.289979934692383,
|
||||
3.9899799823760986,
|
||||
0.0,
|
||||
-5.525000095367432
|
||||
10.375
|
||||
],
|
||||
"hp": 100.0,
|
||||
"pathWaypoints": [
|
||||
[
|
||||
3.489980697631836,
|
||||
3.989980697631836,
|
||||
0.0,
|
||||
13.674999237060547
|
||||
],
|
||||
[
|
||||
2.789980888366699,
|
||||
0.0,
|
||||
13.775001525878906
|
||||
],
|
||||
[
|
||||
1.489980697631836,
|
||||
0.0,
|
||||
13.674999237060547
|
||||
],
|
||||
[
|
||||
1.2899808883666992,
|
||||
0.0,
|
||||
13.275001525878906
|
||||
],
|
||||
[
|
||||
-0.21001911163330078,
|
||||
0.0,
|
||||
8.375
|
||||
],
|
||||
[
|
||||
0.0899801254272461,
|
||||
0.0,
|
||||
7.274999618530273
|
||||
],
|
||||
[
|
||||
0.9899806976318359,
|
||||
0.0,
|
||||
-1.625
|
||||
],
|
||||
[
|
||||
1.989980697631836,
|
||||
0.0,
|
||||
-1.8250007629394531
|
||||
],
|
||||
[
|
||||
4.489980697631836,
|
||||
0.0,
|
||||
-5.325000762939453
|
||||
],
|
||||
[
|
||||
5.289979934692383,
|
||||
0.0,
|
||||
-5.525000095367432
|
||||
10.375
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
0.7987902164459229,
|
||||
3.9899799823760986,
|
||||
0.0,
|
||||
11.658617973327637
|
||||
10.375
|
||||
],
|
||||
"requestedWalkTarget": [
|
||||
5.289979934692383,
|
||||
3.9899799823760986,
|
||||
0.0,
|
||||
-5.525000095367432
|
||||
10.375
|
||||
],
|
||||
"showWeapon": false,
|
||||
"targetFacingAngle": -0.2980719804763794,
|
||||
"showWeapon": true,
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
5.289979934692383,
|
||||
3.989980697631836,
|
||||
0.0,
|
||||
-5.525000095367432
|
||||
10.375
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1422,32 +1433,38 @@
|
||||
"currentWaypointIndex": 0,
|
||||
"enabled": true,
|
||||
"faceTargetIndex": -1,
|
||||
"facingAngle": 1.3097667694091797,
|
||||
"facingAngle": 0.0,
|
||||
"homeDriftCheckTimer": 5.0,
|
||||
"homePosition": [
|
||||
-4.909999847412109,
|
||||
0.0,
|
||||
10.375
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"hp": 200.0,
|
||||
"pathWaypoints": [],
|
||||
"pathWaypoints": [
|
||||
[
|
||||
0.9899806976318359,
|
||||
0.0,
|
||||
-9.625000953674316
|
||||
]
|
||||
],
|
||||
"position": [
|
||||
3.073923349380493,
|
||||
0.9426940083503723,
|
||||
0.0,
|
||||
6.071750164031982
|
||||
-9.6310396194458
|
||||
],
|
||||
"requestedWalkTarget": [
|
||||
3.1117358207702637,
|
||||
0.9426940083503723,
|
||||
0.0,
|
||||
6.061649322509766
|
||||
-9.6310396194458
|
||||
],
|
||||
"showWeapon": false,
|
||||
"targetFacingAngle": 1.3097667694091797,
|
||||
"showWeapon": true,
|
||||
"targetFacingAngle": 0.0,
|
||||
"visibleRange": 6.0,
|
||||
"walkTarget": [
|
||||
3.1117358207702637,
|
||||
0.9899806976318359,
|
||||
0.0,
|
||||
6.061649322509766
|
||||
-9.625000953674316
|
||||
]
|
||||
},
|
||||
"scriptGlobals": {
|
||||
@@ -1455,11 +1472,11 @@
|
||||
"CONST_MSG_WHERE": "Бекзат, ты где? Я жду...",
|
||||
"first_time_darklands": true,
|
||||
"ghost_gone": false,
|
||||
"hall_door_opened": true,
|
||||
"hall_door_opened": false,
|
||||
"morning_can_open_door_index": 0,
|
||||
"morning_did_open_door_index": 0,
|
||||
"player_hold_book": false,
|
||||
"teacher_arrived_to_library": true,
|
||||
"teacher_arrived_to_library": false,
|
||||
"teacher_door_opened": false,
|
||||
"teacher_told_about_book": false,
|
||||
"was_day_when_player_left": 0,
|
||||
@@ -1488,7 +1505,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"money": 5000,
|
||||
"money": 5500,
|
||||
"playerHp": 200.0,
|
||||
"playerMaxHp": 200.0,
|
||||
"questJournal": {
|
||||
@@ -1498,17 +1515,17 @@
|
||||
"id": "tutorial_take_items",
|
||||
"objectives": [
|
||||
{
|
||||
"completed": true,
|
||||
"completed": false,
|
||||
"id": "take_phone",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"completed": true,
|
||||
"completed": false,
|
||||
"id": "take_journal",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"status": 2
|
||||
"status": 1
|
||||
},
|
||||
{
|
||||
"activeObjectiveIndex": 0,
|
||||
@@ -1576,7 +1593,7 @@
|
||||
"id": "study_beginning",
|
||||
"objectives": [
|
||||
{
|
||||
"completed": true,
|
||||
"completed": false,
|
||||
"id": "study_beginning_lecture",
|
||||
"visible": true
|
||||
},
|
||||
@@ -1634,13 +1651,13 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"savedAt": "2026-09-29 23:22",
|
||||
"savedAt": "2026-07-24 23:40",
|
||||
"taxiIsCalled": false,
|
||||
"tutorialJournalPickedUp": true,
|
||||
"tutorialJournalScreenOpened": true,
|
||||
"tutorialJournalPickedUp": false,
|
||||
"tutorialJournalScreenOpened": false,
|
||||
"tutorialNeedOpenTaxiScreen": false,
|
||||
"tutorialPhoneChatScreenOpened": true,
|
||||
"tutorialPhonePickedUp": true,
|
||||
"tutorialStep": 5,
|
||||
"tutorialPhoneChatScreenOpened": false,
|
||||
"tutorialPhonePickedUp": false,
|
||||
"tutorialStep": 0,
|
||||
"uniIntTutorialState": 0
|
||||
}
|
||||
@@ -56,7 +56,7 @@
|
||||
"pressed": "resources/w/ui/img/Journal001_State=Tap.png"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "location",
|
||||
"width": 380,
|
||||
@@ -65,6 +65,32 @@
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "bottom",
|
||||
"texture": "resources/w/ui/img/Location_uni_int.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands003_arrow",
|
||||
"width": 24,
|
||||
"height": 118,
|
||||
"x": 210,
|
||||
"y": 110,
|
||||
"texture": "resources/w/ui/img/hint_arrow_up.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands003",
|
||||
"width": 470,
|
||||
"height": 202,
|
||||
"x": 130,
|
||||
"y": 200,
|
||||
"texture": "resources/w/ui/img/Hint_darklands003_hp.png",
|
||||
"pulse": {
|
||||
"minScale": 0.92,
|
||||
"maxScale": 1.08,
|
||||
"periodMs": 1500
|
||||
},
|
||||
"fadeIn": {
|
||||
"durationMs": 600
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
|
||||
@@ -65,6 +65,25 @@
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "bottom",
|
||||
"texture": "resources/w/ui/img/Location_uni_int.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands002",
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "top",
|
||||
"width": 470,
|
||||
"height": 178,
|
||||
"x": 0,
|
||||
"y": 80,
|
||||
"texture": "resources/w/ui/img/Hint_darklands002_attack.png",
|
||||
"pulse": {
|
||||
"minScale": 0.92,
|
||||
"maxScale": 1.08,
|
||||
"periodMs": 1500
|
||||
},
|
||||
"fadeIn": {
|
||||
"durationMs": 600
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
|
||||
@@ -65,6 +65,25 @@
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "bottom",
|
||||
"texture": "resources/w/ui/img/Location_uni_int.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands002",
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "top",
|
||||
"width": 470,
|
||||
"height": 178,
|
||||
"x": 0,
|
||||
"y": 80,
|
||||
"texture": "resources/w/ui/img/Hint_darklands002_attack.png",
|
||||
"pulse": {
|
||||
"minScale": 0.92,
|
||||
"maxScale": 1.08,
|
||||
"periodMs": 1500
|
||||
},
|
||||
"fadeIn": {
|
||||
"durationMs": 600
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -56,7 +56,7 @@
|
||||
"pressed": "resources/w/ui/img/Journal001_State=Tap.png"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "location",
|
||||
"width": 380,
|
||||
@@ -65,6 +65,32 @@
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "bottom",
|
||||
"texture": "resources/w/ui_en/img/Location_uni_int.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands003_arrow",
|
||||
"width": 24,
|
||||
"height": 118,
|
||||
"x": 210,
|
||||
"y": 110,
|
||||
"texture": "resources/w/ui/img/hint_arrow_up.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands003",
|
||||
"width": 442,
|
||||
"height": 188,
|
||||
"x": 130,
|
||||
"y": 200,
|
||||
"texture": "resources/w/ui_en/img/Hint_darklands003_hp.png",
|
||||
"pulse": {
|
||||
"minScale": 0.92,
|
||||
"maxScale": 1.08,
|
||||
"periodMs": 1500
|
||||
},
|
||||
"fadeIn": {
|
||||
"durationMs": 600
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
|
||||
@@ -65,6 +65,25 @@
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "bottom",
|
||||
"texture": "resources/w/ui_en/img/Location_uni_int.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands002",
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "top",
|
||||
"width": 446,
|
||||
"height": 158,
|
||||
"x": 0,
|
||||
"y": 80,
|
||||
"texture": "resources/w/ui_en/img/Hint_darklands002_attack.png",
|
||||
"pulse": {
|
||||
"minScale": 0.92,
|
||||
"maxScale": 1.08,
|
||||
"periodMs": 1500
|
||||
},
|
||||
"fadeIn": {
|
||||
"durationMs": 600
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
|
||||
@@ -65,6 +65,25 @@
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "bottom",
|
||||
"texture": "resources/w/ui_en/img/Location_uni_int.png"
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
"name": "hint_darklands002",
|
||||
"horizontal_gravity": "center",
|
||||
"vertical_gravity": "top",
|
||||
"width": 446,
|
||||
"height": 158,
|
||||
"x": 0,
|
||||
"y": 80,
|
||||
"texture": "resources/w/ui_en/img/Hint_darklands002_attackandroid.png",
|
||||
"pulse": {
|
||||
"minScale": 0.92,
|
||||
"maxScale": 1.08,
|
||||
"periodMs": 1500
|
||||
},
|
||||
"fadeIn": {
|
||||
"durationMs": 600
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StaticImage",
|
||||
|
||||
+3
-4
@@ -173,8 +173,8 @@ void Character::resetPlayerAfterDeath() {
|
||||
state.attack = 0;
|
||||
}
|
||||
|
||||
bool Character::forceReplan() {
|
||||
if (!pathPlanner) return false;
|
||||
void Character::forceReplan() {
|
||||
if (!pathPlanner) return;
|
||||
|
||||
const Eigen::Vector3f normalizedTarget(state.requestedWalkTarget.x(), 0.f, state.requestedWalkTarget.z());
|
||||
state.pathWaypoints = pathPlanner(state.position, normalizedTarget);
|
||||
@@ -185,13 +185,12 @@ bool Character::forceReplan() {
|
||||
waypoint.y() = 0.f;
|
||||
}
|
||||
state.walkTarget = state.pathWaypoints.back();
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
state.walkTarget = Eigen::Vector3f(state.position.x(), 0.f, state.position.z());
|
||||
state.onArrivedCallback = nullptr;
|
||||
state.onArrivedCallbackName.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
void Character::setTexture(std::shared_ptr<FRG::Texture> texture) {
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public:
|
||||
void setTarget(const Eigen::Vector3f& target, std::function<void()> onArrived = nullptr, std::string callbackName = "");
|
||||
void stopAndRotateToTarget(int npcId);
|
||||
|
||||
bool forceReplan();
|
||||
void forceReplan();
|
||||
void stopInPlace() { state.stopInPlace(); }
|
||||
|
||||
// ---- Reset ----
|
||||
|
||||
@@ -103,8 +103,7 @@ public:
|
||||
float modelScale = 0.12f;
|
||||
Eigen::Quaternionf modelCorrectionRotation = Eigen::Quaternionf::Identity();
|
||||
bool useGpuSkinning = true;
|
||||
//float collisionRadius = 0.45f;
|
||||
float collisionRadius = 0.65f;
|
||||
float collisionRadius = 0.45f;
|
||||
float interactionRadius = 0.0f;
|
||||
|
||||
// --- Pathfinding data (serializable parts) ---
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ int Environment::width = CONST_DEFAULT_WIDTH;
|
||||
int Environment::height = CONST_DEFAULT_HEIGHT;
|
||||
float Environment::zoom = DEFAULT_ZOOM;
|
||||
|
||||
//bool Environment::enableLogging = false;
|
||||
bool Environment::enableLogging = true;
|
||||
bool Environment::enableLogging = false;
|
||||
//bool Environment::enableLogging = true;
|
||||
|
||||
SDL_Window* Environment::window = nullptr;
|
||||
|
||||
|
||||
+4
-6
@@ -394,8 +394,7 @@ namespace FRG
|
||||
menuManager.startGameFunc = [this]() {
|
||||
mainThreadHandler.EnqueueMainThreadTask([this]() {
|
||||
performResetToInitialState();
|
||||
//gameState.currentLocationName = "location_dorm";
|
||||
gameState.currentLocationName = "uni_interior";
|
||||
gameState.currentLocationName = "location_dorm";
|
||||
currentLocation()->scriptEngine.callLocationEnterCallback();
|
||||
this->audioPlayer->crossFadeMusicAsync("music/obshaga.ogg");
|
||||
menuManager.lastMusicTrack = "music/obshaga.ogg";
|
||||
@@ -1459,7 +1458,7 @@ namespace FRG
|
||||
}
|
||||
if (event.key.keysym.sym == SDLK_2)
|
||||
{
|
||||
startDarklandsTransition(true);
|
||||
startDarklandsTransition();
|
||||
}
|
||||
if (event.key.keysym.sym == SDLK_3)
|
||||
{
|
||||
@@ -1511,7 +1510,6 @@ namespace FRG
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
void Game::activateSlowMoEffect() {
|
||||
if (!currentLocation()) return;
|
||||
|
||||
@@ -1755,9 +1753,9 @@ namespace FRG
|
||||
}
|
||||
}
|
||||
|
||||
bool Game::startDarklandsTransition(bool force)
|
||||
bool Game::startDarklandsTransition()
|
||||
{
|
||||
if (!force && !gameState.isNight)
|
||||
if (!gameState.isNight)
|
||||
{
|
||||
currentLocation()->dialogueSystem.startDialogue("darklands_day_dialog001");
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ namespace FRG {
|
||||
EditorMode editorMode = EditorMode::None;
|
||||
|
||||
// Returns false if a transition is already in progress.
|
||||
bool startDarklandsTransition(bool force = false);
|
||||
bool startDarklandsTransition();
|
||||
bool startNightTransition();
|
||||
|
||||
std::unique_ptr<AudioPlayerAsync> audioPlayer;
|
||||
|
||||
+37
-78
@@ -450,16 +450,7 @@ namespace FRG
|
||||
const auto addCharacter = [&](const Character* other) {
|
||||
if (!other || other == self) return;
|
||||
if (other->getHp() <= 0.f || !other->state.enabled) return;
|
||||
|
||||
// Проверяем, находятся ли персонажи в состоянии фактического столкновения
|
||||
const float dist = (other->state.position - self->state.position).norm();
|
||||
const float collisionDist = self->state.collisionRadius + other->state.collisionRadius;
|
||||
|
||||
// Добавляем epsilon (0.1f) для учета погрешностей при входе в зону коллизии
|
||||
const bool isColliding = dist <= (collisionDist + 0.1f);
|
||||
|
||||
// Игнорируем движущегося персонажа, только если мы с ним НЕ сталкиваемся в данный момент
|
||||
if (other->isMoving() && !isColliding) return;
|
||||
if (other->isMoving()) return;
|
||||
|
||||
if (distancePointToSegmentXZ(other->state.position, start, end) > kDynamicObstacleInfluenceDist) {
|
||||
return;
|
||||
@@ -469,7 +460,7 @@ namespace FRG
|
||||
obs.position = Eigen::Vector3f(other->state.position.x(), navigation->getFloorY(), other->state.position.z());
|
||||
obs.radius = (std::max)(0.0f, other->state.collisionRadius * 0.6f);
|
||||
dynamicObstacles.push_back(obs);
|
||||
};
|
||||
};
|
||||
|
||||
addCharacter(player.get());
|
||||
for (const auto& npc : npcs) {
|
||||
@@ -477,8 +468,8 @@ namespace FRG
|
||||
}
|
||||
|
||||
return navigation->findPathToNearest(start, end, dynamicObstacles);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (player) {
|
||||
player->setPathPlanner(makePlanner(player.get()));
|
||||
@@ -600,9 +591,6 @@ namespace FRG
|
||||
}
|
||||
|
||||
Character* Location::raycastNpcs(const Eigen::Vector3f& rayOrigin, const Eigen::Vector3f& rayDir, float maxDistance) {
|
||||
|
||||
//return nullptr;
|
||||
|
||||
// Every NPC is treated as a vertical cylinder: radius 1.0m, height 1.85m,
|
||||
// base at npc->position (the model's foot). Intersection = circle hit in the
|
||||
// XZ plane, then clip the entry/exit t against the [yFoot, yFoot+height] slab.
|
||||
@@ -666,6 +654,7 @@ namespace FRG
|
||||
else {
|
||||
//logger() << "[RAYCAST_NPC] No NPC hit" << std::endl;
|
||||
}
|
||||
|
||||
return closestNpc;
|
||||
}
|
||||
|
||||
@@ -1412,7 +1401,7 @@ namespace FRG
|
||||
if (!a || !b) continue;
|
||||
if (a->getHp() <= 0.f || b->getHp() <= 0.f || !a->state.enabled || !b->state.enabled) continue;
|
||||
|
||||
const float minDist = (a->state.collisionRadius + b->state.collisionRadius) * 0.3;
|
||||
const float minDist = a->state.collisionRadius + b->state.collisionRadius;
|
||||
if (minDist <= 0.f) continue;
|
||||
|
||||
const Eigen::Vector2f pa(a->state.position.x(), a->state.position.z());
|
||||
@@ -1424,83 +1413,53 @@ namespace FRG
|
||||
continue;
|
||||
}
|
||||
|
||||
// 1. ПЕРЕСТРОЕНИЕ ПУТИ (выполняется при пересечении обычного радиуса коллизии)
|
||||
Eigen::Vector2f normal(1.f, 0.f);
|
||||
if (dist > kMinSeparationEps) {
|
||||
normal = delta / dist;
|
||||
}
|
||||
|
||||
const float penetration = (minDist - dist);
|
||||
const float push = penetration * 0.5f;
|
||||
|
||||
Eigen::Vector3f newA = a->state.position;
|
||||
Eigen::Vector3f newB = b->state.position;
|
||||
newA.x() -= normal.x() * push;
|
||||
newA.z() -= normal.y() * push;
|
||||
newA.y() = 0.f;
|
||||
newB.x() += normal.x() * push;
|
||||
newB.z() += normal.y() * push;
|
||||
newB.y() = 0.f;
|
||||
|
||||
const bool aWasMoving = a->isMoving();
|
||||
const bool bWasMoving = b->isMoving();
|
||||
|
||||
auto tryReplan = [&](Character* c) {
|
||||
if (replanCooldownRemainingMs.find(c) != replanCooldownRemainingMs.end()) {
|
||||
return; // Уже находится в откате
|
||||
}
|
||||
if (c->forceReplan()) {
|
||||
replanCooldownRemainingMs[c] = 500; // таймаут на спам
|
||||
}
|
||||
};
|
||||
if (navigation && navigation->isReady()) {
|
||||
const bool aOk = navigation->isWalkable(newA);
|
||||
const bool bOk = navigation->isWalkable(newB);
|
||||
|
||||
if (aWasMoving || bWasMoving) {
|
||||
if (aWasMoving && bWasMoving) {
|
||||
tryReplan(a);
|
||||
tryReplan(b);
|
||||
}
|
||||
else if (aWasMoving) {
|
||||
tryReplan(a);
|
||||
}
|
||||
else if (bWasMoving) {
|
||||
tryReplan(b);
|
||||
}
|
||||
}
|
||||
|
||||
// 2. ФИЗИЧЕСКОЕ ВЫТАЛКИВАНИЕ (только если дистанция меньше 0.5 * minDist)
|
||||
const float hardMinDist = minDist * 0.5f;
|
||||
if (dist < hardMinDist) {
|
||||
Eigen::Vector2f normal(1.f, 0.f);
|
||||
if (dist > kMinSeparationEps) {
|
||||
normal = delta / dist;
|
||||
}
|
||||
|
||||
// Вычисляем выталкивание относительно hardMinDist, а не minDist
|
||||
const float penetration = (hardMinDist - dist);
|
||||
const float push = penetration * 0.5f;
|
||||
|
||||
Eigen::Vector3f newA = a->state.position;
|
||||
Eigen::Vector3f newB = b->state.position;
|
||||
newA.x() -= normal.x() * push;
|
||||
newA.z() -= normal.y() * push;
|
||||
newA.y() = 0.f;
|
||||
newB.x() += normal.x() * push;
|
||||
newB.z() += normal.y() * push;
|
||||
newB.y() = 0.f;
|
||||
|
||||
if (navigation && navigation->isReady()) {
|
||||
const bool aOk = navigation->isWalkable(newA);
|
||||
const bool bOk = navigation->isWalkable(newB);
|
||||
|
||||
if (aOk && bOk) {
|
||||
a->state.position = newA;
|
||||
b->state.position = newB;
|
||||
}
|
||||
else if (aOk && !bOk) {
|
||||
a->state.position = newA;
|
||||
}
|
||||
else if (!aOk && bOk) {
|
||||
b->state.position = newB;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (aOk && bOk) {
|
||||
a->state.position = newA;
|
||||
b->state.position = newB;
|
||||
}
|
||||
else if (aOk && !bOk) {
|
||||
a->state.position = newA;
|
||||
}
|
||||
else if (!aOk && bOk) {
|
||||
b->state.position = newB;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a->state.position = newA;
|
||||
b->state.position = newB;
|
||||
}
|
||||
|
||||
// 3. ОСТАНОВКА И КОЛЛБЭКИ
|
||||
if (a->state.isPlayer && !aWasMoving) a->stopInPlace();
|
||||
if (b->state.isPlayer && !bWasMoving) b->stopInPlace();
|
||||
|
||||
if (aWasMoving && !bWasMoving) {
|
||||
nudgeCharacterAside(b, a->state.position);
|
||||
fireBumpCallbacks(a, b);
|
||||
}
|
||||
else if (bWasMoving && !aWasMoving) {
|
||||
} else if (bWasMoving && !aWasMoving) {
|
||||
nudgeCharacterAside(a, b->state.position);
|
||||
fireBumpCallbacks(b, a);
|
||||
}
|
||||
|
||||
+5
-9
@@ -419,13 +419,12 @@ namespace FRG {
|
||||
void MenuManager::enterGameplay(bool isFromLoad) {
|
||||
if (!isFromLoad && uiState_ == GameUiState::MainMenu && startGameFunc) startGameFunc();
|
||||
uiState_ = GameUiState::Gameplay;
|
||||
//uiManager.replaceRoot(hudRoot);
|
||||
//uiManager.replaceRoot(hudStep5abRoot);
|
||||
//topUiManager.replaceRoot(hudTopHintRoot_);
|
||||
//if (isFromLoad) {
|
||||
uiManager.replaceRoot(hudRoot);
|
||||
topUiManager.replaceRoot(hudTopHintRoot_);
|
||||
if (isFromLoad) {
|
||||
uiManager.clearMenuStack();
|
||||
topUiManager.clearMenuStack();
|
||||
//}
|
||||
}
|
||||
|
||||
applyCurrentHealthBar();
|
||||
|
||||
@@ -438,12 +437,8 @@ namespace FRG {
|
||||
});
|
||||
}
|
||||
|
||||
//onLocationChanged(gameState_.currentLocationName);
|
||||
if (isFromLoad)
|
||||
applyHudForCurrentState();
|
||||
//applyHudForCurrentState();
|
||||
|
||||
applyUniIntHud();
|
||||
}
|
||||
|
||||
void MenuManager::applyHudForCurrentState() {
|
||||
@@ -561,6 +556,7 @@ namespace FRG {
|
||||
uiManager.setTextButtonCallback("menuStartButton", [this](const std::string&) {
|
||||
audioPlayer_.playSoundAsync("resources/audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
|
||||
enterGameplay();
|
||||
|
||||
});
|
||||
uiManager.setTextButtonCallback("menuAboutButton", [this](const std::string&) {
|
||||
showAboutScreen();
|
||||
|
||||
@@ -124,68 +124,6 @@ void PathFinder::build(const std::string& configPath,
|
||||
<< ", cell=" << cellSize << ", areas=" << areas.size() << "\n";
|
||||
}
|
||||
|
||||
|
||||
std::vector<Eigen::Vector3f> PathFinder::findPath(const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end) const
|
||||
{
|
||||
return runAStar(start, end, walkable, false);
|
||||
}
|
||||
|
||||
std::vector<Eigen::Vector3f> PathFinder::findPath(const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end,
|
||||
const std::vector<DynamicObstacle>& dynamicObstacles) const
|
||||
{
|
||||
if (!ready || walkable.empty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<unsigned char> walkableGrid = walkable;
|
||||
// --- Логика внесения dynamicObstacles остается здесь ---
|
||||
if (!dynamicObstacles.empty()) {
|
||||
for (const DynamicObstacle& obstacle : dynamicObstacles) {
|
||||
const float radius = obstacle.radius + agentRadius;
|
||||
if (radius <= 0.0f) continue;
|
||||
|
||||
const float minWorldX = obstacle.position.x() - radius;
|
||||
const float maxWorldX = obstacle.position.x() + radius;
|
||||
const float minWorldZ = obstacle.position.z() - radius;
|
||||
const float maxWorldZ = obstacle.position.z() + radius;
|
||||
|
||||
const int minCellX = (std::max)(0, static_cast<int>(std::floor((minWorldX - minX) / cellSize)));
|
||||
const int maxCellX = (std::min)(gridWidth - 1, static_cast<int>(std::floor((maxWorldX - minX) / cellSize)));
|
||||
const int minCellZ = (std::max)(0, static_cast<int>(std::floor((minWorldZ - minZ) / cellSize)));
|
||||
const int maxCellZ = (std::min)(gridDepth - 1, static_cast<int>(std::floor((maxWorldZ - minZ) / cellSize)));
|
||||
|
||||
const float radiusSq = radius * radius;
|
||||
for (int z = minCellZ; z <= maxCellZ; ++z) {
|
||||
for (int x = minCellX; x <= maxCellX; ++x) {
|
||||
const Cell cell{ x, z };
|
||||
const Eigen::Vector3f center = cellCenter(cell);
|
||||
const float dx = center.x() - obstacle.position.x();
|
||||
const float dz = center.z() - obstacle.position.z();
|
||||
if (dx * dx + dz * dz <= radiusSq) {
|
||||
const int idx = indexOf(cell);
|
||||
if (idx >= 0 && idx < static_cast<int>(walkableGrid.size())) {
|
||||
walkableGrid[static_cast<size_t>(idx)] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return runAStar(start, end, walkableGrid, false);
|
||||
}
|
||||
|
||||
std::vector<Eigen::Vector3f> PathFinder::findNearestReachableImpl(
|
||||
const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end,
|
||||
const std::vector<unsigned char>& walkableGrid) const
|
||||
{
|
||||
return runAStar(start, end, walkableGrid, true);
|
||||
}
|
||||
/*
|
||||
|
||||
std::vector<Eigen::Vector3f> PathFinder::findPath(const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end) const
|
||||
{
|
||||
@@ -556,7 +494,7 @@ std::vector<Eigen::Vector3f> PathFinder::findNearestReachableImpl(
|
||||
path.erase(path.begin());
|
||||
|
||||
return path;
|
||||
}*/
|
||||
}
|
||||
|
||||
std::vector<Eigen::Vector3f> PathFinder::findPathToNearest(
|
||||
const Eigen::Vector3f& start, const Eigen::Vector3f& end) const
|
||||
@@ -1137,125 +1075,4 @@ bool PathFinder::pointInPolygon(float x, float z, const std::vector<Eigen::Vecto
|
||||
return inside;
|
||||
}
|
||||
|
||||
std::vector<Eigen::Vector3f> PathFinder::runAStar(
|
||||
const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end,
|
||||
const std::vector<unsigned char>& grid,
|
||||
bool returnNearestOnFail) const
|
||||
{
|
||||
if (!ready || grid.empty()) return {};
|
||||
|
||||
Cell startCell, endCell;
|
||||
if (!findNearestWalkableCell(start, startCell, grid) ||
|
||||
!findNearestWalkableCell(end, endCell, grid)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (startCell.x == endCell.x && startCell.z == endCell.z) {
|
||||
return { cellCenter(endCell) };
|
||||
}
|
||||
|
||||
struct QueueNode {
|
||||
int index = 0;
|
||||
float priority = 0.0f;
|
||||
bool operator<(const QueueNode& other) const { return priority > other.priority; }
|
||||
};
|
||||
|
||||
const int cellCount = gridWidth * gridDepth;
|
||||
std::vector<float> cost(static_cast<size_t>(cellCount), (std::numeric_limits<float>::max)());
|
||||
std::vector<int> cameFrom(static_cast<size_t>(cellCount), -1);
|
||||
std::priority_queue<QueueNode> open;
|
||||
|
||||
const int startIndex = indexOf(startCell);
|
||||
const int endIndex = indexOf(endCell);
|
||||
|
||||
cost[static_cast<size_t>(startIndex)] = 0.0f;
|
||||
open.push({ startIndex, 0.0f });
|
||||
|
||||
int bestIndex = startIndex;
|
||||
float bestDist = distanceCells(startCell, endCell);
|
||||
|
||||
static const int offsets[8][2] = {
|
||||
{ 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 },
|
||||
{ 1, 1 }, { 1, -1 }, { -1, 1 }, { -1, -1 }
|
||||
};
|
||||
|
||||
bool reached = false;
|
||||
|
||||
while (!open.empty()) {
|
||||
const QueueNode current = open.top();
|
||||
open.pop();
|
||||
|
||||
if (current.index == endIndex) {
|
||||
bestIndex = endIndex;
|
||||
reached = true;
|
||||
break;
|
||||
}
|
||||
|
||||
const Cell currentCell{ current.index % gridWidth, current.index / gridWidth };
|
||||
|
||||
if (cost[static_cast<size_t>(current.index)] < current.priority - distanceCells(currentCell, endCell)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (returnNearestOnFail) {
|
||||
const float d = distanceCells(currentCell, endCell);
|
||||
if (d < bestDist) {
|
||||
bestDist = d;
|
||||
bestIndex = current.index;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& offset : offsets) {
|
||||
Cell next{ currentCell.x + offset[0], currentCell.z + offset[1] };
|
||||
if (!isCellWalkable(next, grid)) continue;
|
||||
|
||||
const bool diagonal = offset[0] != 0 && offset[1] != 0;
|
||||
if (diagonal) {
|
||||
Cell h{ currentCell.x + offset[0], currentCell.z };
|
||||
Cell v{ currentCell.x, currentCell.z + offset[1] };
|
||||
if (!isCellWalkable(h, grid) || !isCellWalkable(v, grid)) continue;
|
||||
}
|
||||
|
||||
const int nextIndex = indexOf(next);
|
||||
const float stepCost = diagonal ? 1.41421356f : 1.0f;
|
||||
const float newCost = cost[static_cast<size_t>(current.index)] + stepCost;
|
||||
|
||||
if (newCost >= cost[static_cast<size_t>(nextIndex)]) continue;
|
||||
|
||||
cost[static_cast<size_t>(nextIndex)] = newCost;
|
||||
cameFrom[static_cast<size_t>(nextIndex)] = current.index;
|
||||
open.push({ nextIndex, newCost + distanceCells(next, endCell) });
|
||||
}
|
||||
}
|
||||
|
||||
if (!reached && !returnNearestOnFail) return {};
|
||||
if (bestIndex == startIndex) return {};
|
||||
|
||||
std::vector<Cell> cells;
|
||||
for (int cur = bestIndex; cur != -1; cur = cameFrom[static_cast<size_t>(cur)]) {
|
||||
cells.push_back({ cur % gridWidth, cur / gridWidth });
|
||||
if (cur == startIndex) break;
|
||||
}
|
||||
std::reverse(cells.begin(), cells.end());
|
||||
cells = smoothCells(cells, grid);
|
||||
|
||||
std::vector<Eigen::Vector3f> path;
|
||||
path.reserve(cells.size());
|
||||
for (const Cell& cell : cells) path.push_back(cellCenter(cell));
|
||||
|
||||
if (!path.empty() && (path.front() - Eigen::Vector3f(start.x(), floorY, start.z())).norm() < cellSize * 0.75f) {
|
||||
path.erase(path.begin());
|
||||
}
|
||||
|
||||
if (reached && !path.empty()) {
|
||||
Cell requestedEndCell;
|
||||
if (worldToCell(end, requestedEndCell) && requestedEndCell.x == endCell.x && requestedEndCell.z == endCell.z) {
|
||||
path.back() = Eigen::Vector3f(end.x(), floorY, end.z());
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
} // namespace FRG
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
private:
|
||||
|
||||
float cellSize = 0.4f;
|
||||
float agentRadius = 0.15f;
|
||||
float agentRadius = 0.45f;
|
||||
float floorY = 0.0f;
|
||||
float objectPadding = 0.25f;
|
||||
float boundaryPadding = 0.0f;
|
||||
@@ -109,11 +109,6 @@ private:
|
||||
std::vector<Eigen::Vector3f> findNearestReachableImpl(const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end,
|
||||
const std::vector<unsigned char>& walkableGrid) const;
|
||||
|
||||
std::vector<Eigen::Vector3f> runAStar(const Eigen::Vector3f& start,
|
||||
const Eigen::Vector3f& end,
|
||||
const std::vector<unsigned char>& grid,
|
||||
bool returnNearestOnFail) const;
|
||||
};
|
||||
|
||||
} // namespace FRG
|
||||
Reference in new issue
Block a user