Commit graph

133 commits

Author SHA1 Message Date
in0finite
32c0be1af2
new world loading system (#110)
* wip

* much faster world creation

* add StaticGeometryInspector

* disable child/parent logic and fading

* rename

* (de)activate objects based on parent

* set draw distance based on layers

* ...

* wip

* wip

* wip

* remove unused param

* prevent concurrent modification

* ...

* catch exceptions when notifying

* ...

* notify about area, not objects

* limit public access to Area

* ...

* ...

* allow public access

* add public api

* adapt code

* pass callback to ctor

* adapt focus points

* fix

* fix intersection check

* support rectangles

* adjust parameters in prefab

* this should fix IsInsideOf()

* ...

* ...

* fix getting area by index

* create area if not exists

* ...

* ...

* ...

* wip for distance levels

* remove constraint on generic parameter

* add some validation

* fix

* fix draw distance per level

* change time of day in which lights are visible

* add todos

* don't use id for UnRegisterFocusPoint()

* use hash set for storing focus points

* add 1 more level

* mark area for update only if visibility changes

* profile WorldSystem calls

* add some profiling sections

* limit time per frame for LoadingThread

* switch custom concurrent queue

* copy jobs to buffer

* rename

* change max draw distance setting

* wait one more frame

* try to remove 801 distance level to remove holes

* attempt to hide interiors, but failed

* delete no longer needed script

* optimization

* some error checking

* add camera as focus point

* dont add camera as focus point in headless mode

* working on load priority

* fix bug - load priority finished

* ...

* small optimizations

* ...

* ...

* remove unneeded variable

* add fading

* dont do fading in headless mode

* fadeRate available in inspector

* change fade rate

* take into account if geometry is loaded when checking if object should be visible, and if fading should be done

* small optimization

* cache IsInHeadlessMode

* display Instance info in inspector

* move interiors up in the sky

* rename

* adapt code to different y pos of interiors

* refactor

* fix finding matched enex for enexes that lead to the same interior level

* display new world stats

* rename

* rename class

* ...

* ...

* extract function

* extract parameters into a struct

* add focus point to dead body

* add focus point to vehicle

* add focus point to vehicle detached parts

* remove OutOfRangeDestroyer from vehicle, and destroy vehicle if it falls below the map

* dont use focus points on vehicle and vehicle detached parts, when not on server

* add focus point for npc peds

* add possibility to set timeout during which focus point keeps revealing after it's destroyed

* adapt UnRegisterFocusPoint() to timeout

* rename

* adapt code

* cleanup MapObject class

* ...

* converting to `lock()`

* optimize method: use 1 lock instead of 3

* call OnObjectFinishedLoading() instead of AddToLoadedObjects()

* ...

* make sure it's main thread

* AsyncLoader is no longer thread safe

* convert static members to non-static in LoadingThread

* fix

* ...

* store indexes for each area

* impl GetAreaCenter()

* calculate load priority based on distance to area, not objects ; limit time per frame ; sort area in Cell, not in concurrent SortedSet ;

* add support for changing draw distance at runtime

* delay setting the new value by 0.2 s

* have a separate default max draw distance for mobile platforms

* adjust y axis world params so that number of visible areas is reduced

* remove "camera far clip plane" setting

* rename

* document flags

* rename

* disable shadow casting and receiving for some objects

* allow casting shadows for LODs with large draw distance

* remove "WorldSystem" layer

* revert layer
2021-07-18 06:03:43 +02:00
in0finite
c7a4fc9332 face lights toward camera every frame 2021-06-26 01:47:52 +02:00
in0finite
ab4f1e00d9 change SEO 2021-03-05 21:32:49 +01:00
in0finite
afb443d269 don't update chat UI in headless mode 2021-02-27 23:17:56 +01:00
in0finite
11c0680c09 add some basic commands 2021-02-20 21:55:05 +01:00
in0finite
a729fa7692 add 'attackingPlayer' to DamageInfo 2021-02-19 22:08:37 +01:00
in0finite
ec436c6037 add plugin loading and game modes 2021-02-19 02:22:03 +01:00
in0finite
9f1b01296d ... 2021-02-06 23:30:52 +01:00
in0finite
899711abda add ability to specify gui style for area 2021-02-06 23:20:21 +01:00
in0finite
933c3ed089 improve gui 2021-02-06 23:06:43 +01:00
in0finite
f4173e5164 don't use skin for a gui area 2021-02-06 23:06:30 +01:00
in0finite
f31ba9d81e add support for short names in top panel of file browser ; add some common folders on Windows 2021-02-06 22:36:31 +01:00
in0finite
6f21cc8bf0 destroy all rigid bodies on clients except for the root bone - they work for themselves, and bones look deformed and stretched 2021-02-06 19:20:21 +01:00
in0finite
f6fe21cbdb sync y position of wheel 2021-02-04 22:21:16 +01:00
in0finite
e6c33e14ad some adjustments for StartGame window 2021-01-31 22:44:15 +01:00
in0finite
e6a48d4bf6 load all IMG archives that are found in loose archive 2021-01-31 20:08:48 +01:00
in0finite
715ec36f2f support car colors with duplicate car names 2021-01-31 02:52:04 +01:00
in0finite
29b14442b4 ... 2021-01-26 23:29:34 +01:00
in0finite
df730095f3 use ConfigManager to load config 2021-01-26 23:29:01 +01:00
in0finite
2451514db1 use custom serialization 2021-01-08 02:40:45 +01:00
in0finite
de8439ad31 add extension method 2021-01-07 21:00:02 +01:00
in0finite
75d9ca5f35 when vehicle explodes, all peds inside are killed - this also fixes Unity crash 2021-01-05 05:56:39 +01:00
in0finite
acae61657d cleanup 2021-01-05 04:26:17 +01:00
in0finite
d6d5d660cf wip on ragdoll 2021-01-04 01:28:58 +01:00
in0finite
f04728934e ignore collision between projectiles 2020-12-22 02:24:00 +01:00
in0finite
29d5a04db9 assign SEO for on-screen message scripts 2020-07-11 15:37:17 +02:00
in0finite
8eea97c33d assign SEO to new scripts 2020-07-11 15:08:12 +02:00
in0finite
2e0108d662 cleanup code 2020-07-01 19:25:59 +02:00
in0finite
115821f2da add hit point and hit normal to DamageInfo class 2020-07-01 18:52:35 +02:00
in0finite
99c1cf8ecc ped can not be damaged by explosion while he is in vehicle 2020-06-29 17:50:33 +02:00
in0finite
9734b6f515 damage type can be specified when damaging object 2020-06-29 17:11:29 +02:00
in0finite
363ec0dd0e remove unused variable 2020-06-28 23:57:09 +02:00
in0finite
b8051fe2d9 don't use collider's transform position when checking for distance 2020-06-28 23:56:20 +02:00
in0finite
7da990e105 use bounds center if ClosestPoint() function does not work 2020-06-28 20:38:23 +02:00
in0finite
47c44355ba replace ExplosionPhysicsForce script from Standard Assets with custom script 2020-06-28 20:32:30 +02:00
in0finite
bfdb8a5ba0 use curve for adjusting damage over distance 2020-06-28 16:35:35 +02:00
in0finite
9d18c2ec55 inflict damage based on distance to closest point on all colliders 2020-06-27 21:55:04 +02:00
in0finite
9678faa18a inflict damage to nearby objects 2020-06-21 18:21:15 +02:00
in0finite
aaf9af8c3f destroy explosion when particle systems finish 2020-06-21 14:56:21 +02:00
in0finite
faf96838b9 implement basic vehicle damage logic 2020-06-09 18:34:15 +02:00
in0finite
29b7ae65f0 remove commented code 2020-06-06 20:45:44 +02:00
in0finite
81df1bb651 pool messages 2020-06-06 20:03:26 +02:00
in0finite
7623b3ce29 optimization 2020-06-06 19:02:43 +02:00
in0finite
cf0437e80a properly destroy messages 2020-06-06 18:41:50 +02:00
in0finite
394348745e converting on-screen messages to uGUI 2020-06-06 18:09:26 +02:00
in0finite
2fec510ce3 display inflicted damage as on-screen message 2020-05-31 19:09:58 +02:00
in0finite
2cb2ddf099 implement on-screen messages 2020-05-31 19:09:58 +02:00
in0finite
83659395e1 run exception-safe 2020-05-31 19:09:58 +02:00
in0finite
756f7e8563 move Damageable class to Utilities assembly 2020-05-31 19:09:57 +02:00
in0finite
ea840f8b5e add stats about current vehicle's radio 2020-05-31 19:09:57 +02:00