Mircea Kitsune [Fri, 28 Oct 2011 15:01:59 +0000 (18:01 +0300)]
Remove debug code. Saving and loading from text files should be fully functional now. When starting the same map, you will find your objects just as you left them :)
Mircea Kitsune [Fri, 28 Oct 2011 13:51:14 +0000 (16:51 +0300)]
Basic implementation for reading sandbox storage files. Currently, it just prints each line to the console. Also add an autoload cvar, which will make objects be automatically loaded at startup
Mircea Kitsune [Fri, 28 Oct 2011 12:58:27 +0000 (15:58 +0300)]
First part of storing objects to text files, using the autosave feature. Not working properly yet. I also don't know how I'm gonna store attachments to this =(
Mircea Kitsune [Thu, 27 Oct 2011 21:47:28 +0000 (00:47 +0300)]
Divide sandbox messages in three categories, and color each accordingly: INFO (tells unimportant stuff to the player), WARNING (tells important stuff to the player) and server (information about spawned objects printed to the server when g_sandbox_info is enabled)
Mircea Kitsune [Thu, 27 Oct 2011 21:09:09 +0000 (00:09 +0300)]
New command: claim_object. If the player has edit rights over an object (either free editing is enabled, or the object was spawned by a player without an UID), the player can claim the object as his with this command.
Mircea Kitsune [Thu, 27 Oct 2011 20:52:22 +0000 (23:52 +0300)]
Unfortunately, my previous change makes it impossible to track the object count of each player. Therefore, turn the object limit into a global float, and default it to 1000. My only concern about this is that a griefer can spawn objects up to the limit, and prevent other players from building on the server due to that. Not an urgent problem, but to be given thought.
Mircea Kitsune [Thu, 27 Oct 2011 20:46:01 +0000 (23:46 +0300)]
Since objects are going to be persisted, no longer set the owner as an entity. Object owner is set via player UID (key_0.d0si file). If the player does not have a valid UID, his objects are spawned without an owner, and therefore can be edited by anyone (even if g_sandbox_editor_free is disabled).
Mircea Kitsune [Thu, 27 Oct 2011 19:38:48 +0000 (22:38 +0300)]
Don't hard code materials. This will allow server admins to create their own materials only by adding particles and sounds, without having to recompile the code. This commit breaks functionality for now
Mircea Kitsune [Thu, 27 Oct 2011 17:07:26 +0000 (20:07 +0300)]
Increase / decrease the object count of the owner, not of the person spawning / removing objects. As later on, we might have support for removing objects using other means.
Mircea Kitsune [Thu, 27 Oct 2011 13:23:33 +0000 (16:23 +0300)]
Fix detaching of objects. Attached objects are no longer traced (and would be impossible to edit), so the detach function addresses the parent instead. When used, all objects attached to it get detached.
Mircea Kitsune [Wed, 26 Oct 2011 21:23:09 +0000 (00:23 +0300)]
Attempt to separate saving and loading into separate functions, so they can be used for other forms of storage apart from the clipboard later on. Currently doesn't work, and brakes the clipboard.
Mircea Kitsune [Wed, 26 Oct 2011 16:19:44 +0000 (19:19 +0300)]
Limit impact execution time to avoid sounds playing each frame. Impact sounds can still be triggered every 0.1 second... but to be honest, that sounds kinda cool B-)
Mircea Kitsune [Wed, 26 Oct 2011 13:39:18 +0000 (16:39 +0300)]
Object materials. They influence what sounds are generated when the object impacts a surface, as well as particles that will be generated. Main material types will be: metal, stone, wood. Currently, only metal has been fully implemented.
Mircea Kitsune [Wed, 26 Oct 2011 12:24:47 +0000 (15:24 +0300)]
Bound the minimum and maximum scale of objects server-side, to avoid griefers being able to spam objects that are either too tiny to trace, or huge enough to block an entire map.
Mircea Kitsune [Wed, 26 Oct 2011 09:48:35 +0000 (12:48 +0300)]
Allow setting the object color and glow color of objects. Note that the menu color picker does not work yet, since I need to figure a way around it sending the RGB vector with quotation marks (eg: "0 0 0" instead of 0 0 0).
Samual [Wed, 26 Oct 2011 01:31:51 +0000 (21:31 -0400)]
Now that getwrappedline bug is fixed, change minfontsize to 0 -- Also, add defaults to autocvars.qh for the new hud_panel_centerprint cvars. (They didn't exist since 0.5)