Mircea Kitsune [Sun, 6 Nov 2011 13:38:48 +0000 (15:38 +0200)]
Actually, remove the g_grab switch permanently, and leave only the cvar to select grabbing distance. The code must enable an entity to be grabbed, so there's no point in having a cvar too.
Mircea Kitsune [Sun, 6 Nov 2011 13:30:20 +0000 (15:30 +0200)]
Read-only mode. When enabled, no sandbox commands can be used, and objects cannot be spawned, removed, or edited. Useful if a server admin uses the sandbox to place objects on a map and modify gameplay, without wanting to recompile the map itself.
Mircea Kitsune [Sun, 6 Nov 2011 12:11:14 +0000 (14:11 +0200)]
In order for the new grabbing to work, a sandbox object's owner must be set as an entity too. Therefore, scan for players each frame... and if the player with the correct UID is present on the server, it is set as the owner. Otherwise, the owner is world
Mircea Kitsune [Sun, 6 Nov 2011 11:15:53 +0000 (13:15 +0200)]
Remove non-cheat grabbing from the sandbox code, and allow it to be used for other purposes too. Any object with the .drag value set to anything other than 0 will be possible to drag without cheats, regardless of the sandbox mode.
Mircea Kitsune [Sun, 30 Oct 2011 09:46:21 +0000 (11:46 +0200)]
Update object owner nickname when using the object_claim command. This can also be used to update your name on an object if you already own it, but changed your nickname since creating it.
Mircea Kitsune [Sun, 30 Oct 2011 09:37:16 +0000 (11:37 +0200)]
Store object information about creation and owner. Objects can now report the name of their owner, their creation date, their last edit date, and the date the creator last went to the bathroom. Joking about the first three ;)
Mircea Kitsune [Sat, 29 Oct 2011 21:16:22 +0000 (00:16 +0300)]
Revert my last commit. I forgot you can edit one property of an object without changing the other, so setDependent does not make sense and gets in the way
Mircea Kitsune [Sat, 29 Oct 2011 20:42:47 +0000 (23:42 +0300)]
To make things even more fun, make the default clipboard cvar seta instead of set. Now even if you restart Xonotic, you can paste your last copied object in the world :)
Mircea Kitsune [Sat, 29 Oct 2011 19:57:00 +0000 (22:57 +0300)]
Second part of my last commit, clipboard functional again. Objects are now pasted from the specified client cvar. For real men: You can also use the object_paste command to spawn an object from the console, by writing each property manually. I challenge your mental strength >:)
Mircea Kitsune [Sat, 29 Oct 2011 19:51:44 +0000 (22:51 +0300)]
And now for something a little different: No longer use a string for the clipboard, but a client-side cvar. This offers many new possibilities... such as multiple clipboards, object presets and shortcuts, exporting objects and posting them online (forum, twitter, etc), and using the clipboard between servers. eg: Say you see an object you can copy, and wanna put it on your server. Just copy it from the Sandbox menu, disconnect, connect to your server, and paste. Your object will be there :)
Mircea Kitsune [Sat, 29 Oct 2011 16:08:19 +0000 (19:08 +0300)]
Re-implement remembering of old movetype for objects, and also persist it in storage. For example: If you set an object to MOVETYPE_PHYSICAL, attach it to another object (during which it becomes MOVETYPE_FOLLOW), restart the server, then go back and detach the object, it will know to go back to MOVETYPE_PHYSICAL. This does not add any extra info, as movetype was already added to the storage for child objects, and was useless before this.
Mircea Kitsune [Sat, 29 Oct 2011 13:35:24 +0000 (16:35 +0300)]
Storage save: Persist all strings between quotation marks. This allows models, materials, and bones with spaces in their names to be persisted properly
Mircea Kitsune [Sat, 29 Oct 2011 13:16:59 +0000 (16:16 +0300)]
Detach objects at exactly the same origin, not the origin of the parent. Angles however are reset to the parent's, so that detached objects don't spin or roll
Mircea Kitsune [Sat, 29 Oct 2011 11:05:55 +0000 (14:05 +0300)]
New functionality for g_sandbox_editor_free. 0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object. Default is now 1 (you can duplicate other people's objects but not edit them).
Mircea Kitsune [Sat, 29 Oct 2011 10:59:06 +0000 (13:59 +0300)]
Name the info command "mesh", and allow it to list both model, andimation frame, and tags. People can then know the model and frame of any object, which can be helpful with building
Mircea Kitsune [Fri, 28 Oct 2011 23:26:32 +0000 (02:26 +0300)]
Get storage loading to use arrays too. Attached objects will be saved in storage, but object can also be copied / pasted with their attachments now. Bones are not saved yet, and will be done tomorrow
Mircea Kitsune [Fri, 28 Oct 2011 23:09:41 +0000 (02:09 +0300)]
At the expense of the developer's sanity, get the save system working with arrays. Also fix a code typo that was always there, making the storage get saved each frame. By default, storage is saved every 5 seconds
Mircea Kitsune [Fri, 28 Oct 2011 20:54:39 +0000 (23:54 +0300)]
Add a code comment about how the string works. Clipboard and database seem to be fully functional now. divVerent won't let me tokenize tokens though, so I need to change implementation to something less hackish.
Mircea Kitsune [Fri, 28 Oct 2011 19:49:02 +0000 (22:49 +0300)]
Attempt to persist attached objects in storage and clipboard, part 1: Store child objects in the same line as their parent object. Objects are separated by the ; symbol.
Mircea Kitsune [Fri, 28 Oct 2011 19:09:34 +0000 (22:09 +0300)]
Don't allow attaching to attachments, for obvious reasons. Also don't persist the movetype of attachments, as it will not work with that I'm going to implement next (restore default physics when detaching an object)
Mircea Kitsune [Fri, 28 Oct 2011 15:48:57 +0000 (18:48 +0300)]
Add a name cvar for storage. That way, people can select between multiple storages. If * is that cvar, storage files are named sandbox/storage_*_mapname.txt