Commit Graph

38 Commits

Author SHA1 Message Date
Regalis
043c2fbc5e Moved TotalElapsedTime from GameMain to the Timing class 2017-05-03 19:15:43 +03:00
Regalis
ba49f59204 Some cleanup (mostly removing redundancies from the GameMain class) 2017-05-03 00:27:13 +03:00
Regalis
7cb88e39e9 Attempt to fix ThrowOrIgnoreBadComparer exception in LightSource.FindRaycastHits.
Couldn't reproduce the crash, but I'm guessing it could be caused by CompareCCW not returning 0 if comparing a position to itself. (and if not, at least the exception is caught now)
2017-04-05 21:36:31 +03:00
Regalis
7c6ea5b1c0 LightSource vertices are recalculated if another submarine within the range of the light has moved relative to the sub the light is in 2017-03-20 17:15:12 +02:00
Regalis
e059a08688 Optimized lightsource raycasts 2017-03-03 00:02:43 +02:00
juanjp600
84a8232c1a Fixed override sprite scaling
Now it looks right.
2017-02-28 19:38:25 -03:00
juanjp600
4568f34f39 Rotating lights and overridden textures
The flashlight has the correct texture now, but something still seems off about the UV coordinates. Scaling is probably incorrect.
2017-02-28 19:19:02 -03:00
Regalis
22d40077fa Fixed exception in LightSource if ConvexHullList for hulls outside the sub hasn't been generated (i.e. if switching to game mode using console commands), removed some debug code 2017-02-27 18:53:34 +02:00
Regalis
68a0320935 LightSources cache the light vertices in vertex buffers and only recalculate if needed 2017-02-27 00:41:50 +02:00
Regalis
f3f875e641 Calculating light volumes works now. Very poorly optimized at the moment, todo: cache volumes and only recalculate when needed 2017-02-26 21:33:32 +02:00
Regalis
abfe2261d2 - ConvexHulls consist of Segments and SegmentPoints which keep references to each other
- LightSources fetch a list of non-backfacing ConvexHull segments within their range, and sort the points counter-clockwise (TODO: calculate triangles from the points)
- fixed incorrectly working CircleIntersectsRectangle method
2017-02-26 01:17:22 +02:00
Regalis
844097b132 Initial steps in making the light rendering use light volumes instead of shadow volumes to allow rendering the lights in one batch.
So far just disabled shadow rendering and cleaned up some unnecessary stuff
2017-02-25 21:24:38 +02:00
Regalis
311f388358 Limbs with no sprite don't cause the game to crash anymore, lightsources attached to a limb are drawn at the interpolated position (= DrawPosition) of the limb, lightTexture origin is flipped on the X-axis when parent limb flips 2016-12-17 14:24:54 +02:00
juanjp600
7a3bce3973 Hull volume helper in editor + Character name matches client name + Better-looking Watcher light source
Also '' is a thing of the past, use \" instead
2016-11-20 18:47:22 -03:00
Regalis
f7a9a77721 Some debug assertions to help figure out the cause for the body.FixtureList==null & GetHullsInRange crash reports 2016-11-15 19:53:25 +02:00
Regalis
eb2c51c2f1 Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method) 2016-10-31 20:50:20 +02:00
Regalis
7e20d7a17a Timing.Alpha isn't updated if accumulator < step, using interpolated positions to draw lightsources & ragdoll/ai debug info (-> no twitching when the sub is moving) 2016-10-11 16:34:59 +03:00
Regalis
d8476d9371 Hull-specific ambient lighting: light sources increase the amount of ambient light in rooms and the light can spread to adjacent rooms through gaps. Allows making the default ambient light much darker without making shadows look too dark in fully lit subs. 2016-10-10 21:13:22 +03:00
Regalis
c8dae18135 - syncing docking ports
- linkedsubmarine saving fixes, path can be changed and sub reloaded in editinghub
- lightsources don't constantly recheck convex hulls of another sub if subs are docked
- position update networkevents arent sent for subs that are docked to the main sub
2016-07-06 23:01:51 +03:00
Regalis
aae24b2b2c Better logic for determining which convex hulls are in the range of a lightsource (separate convexhull lists for each sub) 2016-06-30 17:50:02 +03:00
Regalis
38c5251005 Vertical docking port, docking sounds, water flows properly between horizontally docked hulls, falseoutput of signal check components can be changed, lighting and FOW works between hulls (todo: some logic for determining when to update light.HullsInRange when two subs are moving relative to each other) 2016-06-27 17:48:20 +03:00
Regalis
5301a57108 Updating lightSource.hullsInRange when a convex hull is removed, some cleanup 2016-05-11 20:20:11 +03:00
Regalis
03626c997b - Fixed shadows not being cast if the lightsource is outside the sub and the convexhull is not
- Option to change the texture of the "light sphere"
- Added "headlights" to the scooters
2016-05-03 00:27:48 +03:00
Regalis
4cda429ab0 LightSources can be assigned to limbs, glowing watcher 2016-05-01 18:47:44 +03:00
Regalis
9cfbbb44ed Fixed a bunch of sprites not being removed 2016-02-19 15:58:43 +02:00
Regalis
8cc12b6988 Moving camera with sub even if typing, server doesn't do impact damage to client characters, server sends cause of death in importantentityupdate if health<=0, fire sync fixes, lerping water surface in update instead of render, 2016-01-27 20:38:24 +02:00
Regalis
ca7febfcab Option to hide waypoints and spawnpoints in editor, fixed cam "twitching" in multiplayer, additional light sprites for lightcomponents, wire bugfixes, fixed excessive camera shake when firing the railgun 2016-01-04 22:36:39 +02:00
Regalis
8717a2259f Fixed LobbyScreen item grouping & light.hullsInRange updating 2016-01-02 16:40:24 +02:00
Regalis
8c032d8368 Lighting bugfixes, setting camera position to character on shift start 2015-12-26 22:35:28 +02:00
Regalis11
2ff8643c02 Optimization: FindHull spatial hashing, itemcomponent sounds in a dictionary, got rid of Item.Updated, rendering fixes, disposing shadow vertex buffers 2015-12-21 11:01:35 +02:00
Regalis
17e8a2171f Progress + prettier ice walls 2015-12-12 13:44:05 +02:00
Regalis11
40fb8d803d Lighting fixes & teleporting characters to sub 2015-12-06 16:07:25 +02:00
Regalis11
73bde75c2e Obstructing vision when wearing a diving suit or mask 2015-11-01 17:47:59 +02:00
Regalis
838022fcd5 Switch to Barotrauma & too many misc changes to remember 2015-10-16 18:11:58 +03:00
Regalis11
2bb5d41836 Further lighting optimization, fixed (railgun) controller movement, physicsbody collisioncategory changes, command room reactor controls in Vellamo 2015-10-14 22:10:37 +03:00
Regalis11
8df9133e84 Lighting optimization (caching shadow vertices & only checking hulls in range if the position or range of the light changes), ragdoll optimization, itemcomponent optimization, dragging stunned/dead characters 2015-10-11 21:04:42 +03:00
Regalis
f6966f06c3 WIP CrashReporter, misc refactoring 2015-09-19 15:14:47 +03:00
Regalis
16bf562837 improved humanoid animations, some map stats in map editor, gap connections visible in editor, editing wire nodes in editor, pumps don't have to be manually linked, coroutine exception handling 2015-09-15 17:24:52 +03:00