Commit Graph

77 Commits

Author SHA1 Message Date
Regalis
347f549ac1 Reactors, sonars, nav terminals, pumps and batteries use similar delayed correction logic as doors and inventories.
I.e. the clients delay correcting the state of the item until the local player stops manipulating the state (atm the delay is 1 sec). Prevents pumping speeds, steering directions and whatnot from switching to an old state and back - now the corrections should not be visible to the players unless the client predicts the state wrong.
2017-04-11 00:48:53 +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
0e5de469d3 Fixed infinite loop in WrapText if the line length is smaller than an individual character, text scale is taken into account in GUITextBlock wrapping 2017-03-27 21:08:14 +03:00
Regalis
885a8c610c Text scale in GUITextBlocks and ItemLabels can be changed, text wrapping fix (words that are too wide for one line shouldn't cause overflows anymore) 2017-03-22 23:22:54 +02:00
Regalis
40f5f352f5 - pasted entities are assigned to the main sub (-> entities copypasted from another sub are saved)
- fixed submarinebody attempting to generate a physics body for a sub with no walls if there are some other walls loaded
- MathUtils.GiftWrap doesn't throw an exception if passed an empty list of points
2017-03-15 23:59:23 +02:00
juanjp600
d6c292a2cc SharpFont + ScalableFont implementation
https://github.com/Robmaister/SharpFont

TODO: replace Code Bold.otf with the full version, fix any bugs, build on Linux, possibly move ToolBox string wrapping and limiting logic to ScalableFont class for better results.
2017-03-07 13:44:42 -03:00
Regalis
e059a08688 Optimized lightsource raycasts 2017-03-03 00:02:43 +02:00
Regalis
f04a00f6e1 Merge branch 'lighting-optimization' 2017-03-02 19:39:55 +02:00
juanjp600
01a543e8b4 Fixed slight mistake in homoglyph list 2017-03-02 13:54:40 -03:00
juanjp600
ac3015f983 Slight homoglyph search optimization
Instead of calling Find twice, it calls it once for the first character and checks if the returned group contains the other character
2017-03-02 12:32:14 -03:00
juanjp600
ba026a8f88 Added list of homoglyphs for name comparison
Unicode is now allowed in player names, but it can't be easily exploited anymore
2017-03-02 12:09:08 -03:00
juanjp600
f2db3c6b20 Merge remote-tracking branch 'barotrauma/master' into lighting-optimization 2017-03-01 15:02:23 -03:00
Regalis
979c82443c Derp: fixed submarine files not being included in saves if the player saves and quits from the single player lobby 2017-02-27 21:33:42 +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
dd46ce1d98 Adjusting submarine spawnposition if the sub (or any docked subs) intersect with walls 2016-12-20 16:11:47 +02:00
Regalis
73eb6a2f1b Pausing all sounds when switching to editor screen, temp save folder is cleared before saving (fixes unnecessary files being included in saves) 2016-12-13 23:10:52 +02:00
Regalis
568c909ff0 Improved wire editing logic:
- wires have to be selected by clicking before any nodes can be moved
- wires can be selected by clicking either the nodes or the sections
- new nodes can be added by clicking a section while holding ctrl
- the selected wire is drawn on top of all other entities
2016-11-30 16:45:21 +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
juanjp600
0e9c20c666 Case-sensitivity checks on Windows
Should prevent "TigerThresher" from happening again.
2016-11-10 21:45:59 -03: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
282611d0cc Limiting too long location names in navigation terminals & end shift button 2016-10-26 19:48:39 +03:00
Regalis
86c50304dd - saving after MainSub has been removed (i.e. saving after returning to map screen) doesn't break save files anymore
- fixed subs getting left behind if the sub moves too far from the start/end position during the ending cinematic
- map shows which LocationConnections have been passed through
2016-09-28 19:16:50 +03:00
Regalis
2bdc7441fc Merge branch 'level-gen-overhaul' 2016-09-27 20:19:29 +03:00
juanjp600
d537e8795a Replace '' (two single quotes) with \" (double quote)
We must correct post-traumatic Blitz disorder
2016-09-24 21:26:08 -03:00
Regalis
c6105afc80 A separate class for parameters used by the level generator, different "level types" with configurable parameters 2016-09-12 20:48:43 +03:00
Regalis
7e644ebb9d Forgot to commit these 2016-08-28 17:05:39 +03:00
Regalis
d5cd6f83ae Shuttle-tag is visible in menus, some menu layout tweaking 2016-08-11 21:54:05 +03:00
Regalis
d4338580c7 updated changelog, transparent debug console frame, stuff 2016-08-08 23:32:32 +03:00
Regalis
09782be231 - sonar shows the outlines of docked subs (instead of normal sonar blips)
- fixed lights not being removed if the same explosion is triggered again before the previous one is finished
- fixed electrical shocks from junction boxes stunning nearby players (and not just the player using the jb)
- showing restart timer as mins + secs
- more server settings
2016-07-25 18:30:13 +03:00
Regalis
f8fec79785 Parts of the submarine that are left behind in the level will stay there, it's possible to leave the level without the main sub (e.g. in an escape shuttle) 2016-07-16 16:14:51 +03:00
Regalis
cafeceb6d2 WIP dockingport/multisub saving in single player mode 2016-07-02 14:59:49 +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
b04e204dc3 - multiple submarines can be "merged" into one file (to be used as escape vessels etc)
- WIP docking ports
2016-06-26 14:31:00 +03:00
Regalis
7349cdd310 Progress (compiles now) 2016-06-09 22:15:50 +03:00
Regalis
26608d3f82 Fixed long level/map seeds always being converted to int.MaxVal 2016-05-03 00:16:43 +03:00
Regalis
d3ab7946a8 Using ToLowerInvariant instead of ToLower (the game works for Turkish players now!)
http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html
2016-04-27 17:14:09 +03:00
Regalis
c1a1990f08 - moving characters out of the way when the sub is teleported to the right position in multiplayer (monsters shouldn't randomly pop up inside the submarine anymore)
- taking sub position into account when snapping cursor position to the grid -> new items/structures are aligned with existing ones if editing the sub while a round is running
2016-03-28 16:11:55 +03:00
Regalis
fc8b30c974 - npcs wont try grab items from other characters' inventories
- fixed lightcomponent LightSprites "twitching" when the sub is moving
- fixed null reference exceptions in Hull.Render if no submarine has been loaded
- submarine descriptions
- emergency sirens in Aegir & Vellamo
- changed the required item for fabricating a wire from "Copper" to "Copper Bar"
2016-03-18 17:48:25 +02:00
Regalis
20d61b0647 - fixed light components throwing errors when receiving an invalid color value to the "set_color" input
- fixed it being possible to connect wires to more than two items by selecting another item while dragging the wire
- relay components break if too much power is directed through them
- relay components are active by default and the can be toggled on/off in the editor
- bool properties show as checkboxes in the editor
2016-03-17 19:16:21 +02:00
Regalis
d1580328ed Some cleanup using ReSharper (mostly removing redundancies) 2016-03-12 15:32:34 +02:00
Regalis
40714c1102 - converting NetworkEvent sending time to local time before doing any comparisons
- using mersenne twister for random number generation due to differences in Mono and .NET implementations of the Random library
- password prompt for password-protected private servers
- fixed deconstructor, fabricator and railgun connection panels closing immediately after opening
- fixed editor saving newly created subs to the root folder instead of the Submarines folder
- keeping items in the same inventory slots between clients instead of just syncing which items are in the inventory
- fixed crashing when swapping items between different limbslots
2016-03-03 21:11:54 +02:00
Regalis
058a269ecb More easily readable netstats (B/kB/MB instead of just B), scrollable netstats client list, possible to wear multiple items in same limb, handcuffs 2016-02-20 13:00:05 +02:00
Regalis
4f54e04c8c Improved level generation algorithm, fixed invisible hulls, turret projectile fix, fabricators work in mp 2016-02-11 21:37:37 +02:00
Regalis
6db3062cc8 dmgn 2016-02-05 19:34:10 +02:00
Regalis
14ee39e59a Endworm & moloch immune to bleeding, showing right sub name in save file info, disable charactermode before saving, option to end round when the end of the level is reached, maintain position option in steering 2016-02-01 22:21:26 +02:00
Regalis
8e491ae855 Bunch of editor improvements/bugfixes: free node positioning when placing wires, options to hide hulls, gaps & links, hidden entities can't be selected, more accurate stair selecting, disabled UImessages, camera position fixes 2016-01-15 23:04:34 +02:00
Regalis
03f569b161 Traitor probability selection instead of separate traitor mode, stopping water ambience on round end, lobby sync after client has verified connection, WIP shiftsummary in multiplayer, "cleanbuild" command in debugconsole 2016-01-07 23:25:42 +02:00
Regalis
bc9ff32023 New pump & railguncont sprites, saving fixes (disappearing items fixed?), moving LightManager.ViewPos to railgun when aiming, generating waypoints outside sub, easier wire node editing, characters stand when using a controller, shiftsummary crew status scrolling, stuff 2016-01-04 01:03:37 +02:00
Regalis
af470eab2e more accurate submarine body generation, multiplayer fixes, saving takes HiddenSubPosition into account, fire coordinate fixes, editscreen fixes, checking item triggers in AIObjectiveGoto, netlobbyscreen sync fixes, re-enabled level start/end positions, water edit fixed 2015-12-17 18:26:40 +02:00