Commit Graph

63 Commits (368a073415064957c292242483e2967a4c3e28b3)

Author SHA1 Message Date
Peter Wortmann 88ef1d40fa Warning fixes
Actually pretty sure a few of them were bugs
2015-08-31 19:52:39 +01:00
Armin Burgmeier 3ec53c2c40 Update GTK+ editor so that one can draw background materials 2015-08-04 21:21:24 -04:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
Sven Eberhardt f815d7ea6c Fix EditCursor selection and deselection callbacks when duplicating objects. 2015-01-17 22:53:21 +01:00
Sven Eberhardt 2cde706611 Object movement in editor respects Def->HorizontalFix and attachment procedure.
When moving attached objects, it will now move the attachment target along with the object. This makes moving elevator cases and wind generators a lot easier.
2015-01-17 21:19:56 +01:00
Sven Eberhardt cf9aca70fe Add callback EditCursorMoved. 2015-01-17 20:53:45 +01:00
Sven Eberhardt c00d8c7a4d Add next_selection parameter to EditCursorDeselection.
If an object is deselected due to a new object selection, that newly selected object is passed as next_selection.
2015-01-17 20:37:54 +01:00
Martin Plicht 03f43f462b C4ObjectList: Replace trivial cases of manual list traversal with iterator usage 2014-10-25 21:25:52 +02:00
Julius Michaelis 2c7d9c0549 Fix a load of warnings (two were actual errors, only in diagnostics though) 2014-04-17 19:24:41 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Sven Eberhardt 7995806bb4 Fix C4ControlPlayerAction (Surrender, activate goal menu, set hostility, etc.) packets in network.
The "action" member wasn't compiled. I wonder how it was even possible to play in network (since InitPlayerControl was never called).
2013-09-24 00:39:44 +02:00
Nicolas Hake 8e0535dd7d Network: Disallow re-enabling debug mode via faked control packet
Instead of taking the data parameter of the C4ControlSet packet at face
value, ignore it entirely and only allow disabling debug mode.
2013-09-21 15:10:39 +02:00
Nicolas Hake 4137e85eed C4ControlEMMoveObject: Send dropped ID as name instead of handle
Sending handles might desync network games if one of the connected
engines had run a different scenario before the current one, since ID
handles aren't cleared between games.
2013-09-08 14:43:06 +02:00
Nicolas Hake 7e260aa9de Remove C4ControlScript::fInternal
fInternal basically acted as a reverse "evil bit" as in RFC 3514: when
set, the engine would not do any checks on the script contained in the
control packet, nor log the script (visibly in game; the packet log
would of course contain the packet). A malicious game client thus would
be able to inject arbitrary script without people (immediately) noticing
anything was amiss.

As of this patch, only the host is able to execute arbitrary scripts,
and those will be shown in the message board for all players to see.
This privilege can be irrevocably disabled in network games by any
client by using the "/nodebug" message board command.

Closes #936.
2013-09-04 20:18:06 +02:00
Nicolas Hake 9b82abb8a0 Use control packet for mouse drag/drop and hover
This removes some more pre-assembled C4Script code going across the
network unchecked.

Part of #936.
2013-09-04 19:58:57 +02:00
Nicolas Hake 7e70554a04 Use control packet for more editor mode actions
Actions changed include dropping definitions, (de-)selecting objects,
player elimination. This removes some more pre-assembled C4Script code
going across the network unchecked.

Part of #936.
2013-09-04 17:51:55 +02:00
Nicolas Hake 059dd0e45a Use control packet for player control initialization
This removes some more pre-assembled C4Script code going across the
network unchecked.

Part of #936.
2013-09-04 15:45:00 +02:00
Nicolas Hake 9604753e93 Player self-management: Use dedicated control packets
Instead of sending pre-composed C4Script code across the network, make
player self-management (surrendering, team changes etc.) send a
dedicated control packet. This means less network traffic, and also a
smaller attack vector for malicions C4Script injection.

Part of #936.
2013-09-02 22:22:29 +02:00
Nicolas Hake f2dba4a6b3 MsgBoard commands: Handle and assemble on clients
MsgBoard commands used to be evaluated on the issuing client. Malicious
clients would be able to insert arbitrary C4Script code to be executed
instead of the scenario-defined command; other clients would not be able
to tell the difference.

Instead, we now only send the command identifier, issuing player and
command parameter. This is still not perfect because clients can
insert any player they want, but it's better than before.

Part of #936.
2013-09-02 20:47:03 +02:00
Nicolas Hake f920e853e0 MsgBoard replies: Remove detour via C4Aul
Instead of having message board replies synced via script calls, send a
dedicated control packet.

Part of #936.
2013-09-02 20:19:37 +02:00
Günther Brammer 4e875f4495 Don't store object rotation twice
Rotation was still stored as an integer and as a fixed point number.
Compute the integer on demand from the fixed point instead, like the
position. Rewrite the movement code where the two variables were
temporarily out of sync.
2013-05-25 14:59:58 +02:00
Sven Eberhardt 437433776f C4Landscape::InsertMaterial use ptr instead of ref for insertion pos 2013-02-18 00:48:25 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Philipp Kern e037300801 Fix spelling mistake: ressource -> resource. 2012-10-21 22:20:43 +02:00
Sven Eberhardt a6d9690afa Fix Win32/MSVC builds losing sync to due to different order of parameter evaluation when multiple calls of Random() were done in the parameters 2012-10-14 21:02:27 +02:00
Sven Eberhardt db84b849b1 /sound reenabled. Sound-creating client now shown in client list box (F4). No sounds played when client is ignored. 2012-10-13 13:37:59 +02:00
Günther Brammer 843642271d Script: local variables work for the Scenario and definition calls
This requires replacing C4AulScript::Def with C4AulScript::GetPropList() and
C4DefScriptHost::Def, and making C4GameScriptHost::GetPropList return the
scenario proplist prototype.

Definition calls won't be able to change the local variables, of course.

Other proplists will be able to use local variables once they can have
functions.
2011-09-29 03:49:21 +02:00
Nicolas Hake f3ae992f33 Fix dangling pointer on temporary pack of player file on join (#706)
I hate StdStrBuf. It's just close enough to any sane string class that you think
it does reasonable things, then when you don't look it will turn around and stab
you in the back with a rusty fork.
2012-02-03 14:36:17 +01:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Nicolas Hake fe747db554 Clean up copyright notices
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Tobias Zwick f025edb4a9 removed Portraits
+ CustomMessage now uses a normal picture of a definition/object
+ BigIcon is now the small (and only) "Portrait" the player chan choose
+ In future, one could of course make the max size of the BigIcon bigger
2011-08-05 14:58:16 +02:00
Armin Burgmeier 884809e8f2 Merge filename extension changes 2011-03-13 17:15:40 +01:00
Armin Burgmeier e282bf9a9c Change .c4s extension to .ocs 2011-03-13 16:11:55 +01:00
Günther Brammer 2820716057 Include fewer headers from C4Game.h so C4NetIO.h isn't included from there 2011-03-11 03:43:38 +01:00
Günther Brammer 75dc49e746 Replace Objects.ObjectNumber with C4PropListNumbered::CheckPropList
There's no need to go through the entire object list to get an object
number, so convert most usages of ObjectNumber(obj) with obj->Number. Add a
new method to check proplist pointers for debugging purposes to
C4PropListNumbered.
2011-02-06 01:59:49 +01:00
Günther Brammer a7615ddced Make C4PropListNumbered global data static members of the class
Previously, this was in ::Game and ::Objects. Both classes still work on
that data, but not as much as before.
2011-03-05 03:32:51 +01:00
Günther Brammer 45620c2b85 Move some C4AulDebug code into C4AulDebug 2011-03-03 00:58:43 +01:00
Armin Burgmeier 58d3682678 Fix a crash when script players join the game (#571) 2011-01-27 01:12:56 +01:00
Günther Brammer 3ef004506c editor: Store the selected objects only in EditCursor 2011-01-12 23:40:22 +01:00
Günther Brammer 6d3feabe69 Reduce #includes so that C4Include.h doesn't include C4Value.h
This should avoid many complete rebuilds.
2011-01-08 17:04:20 +01:00
Armin Burgmeier 9f74506e9b Support loading game data from system path 2011-01-06 21:18:13 +01:00
Nicolas Hake 5db69dd5e0 Remove some remains of Rnd3 2011-01-02 13:51:09 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Günther Brammer 719ed39632 Remove FairCrew and permanent Physicals 2010-12-10 01:06:38 +01:00
Günther Brammer b946751f36 Fix problems found by z33ky with g++ 4.6 2010-11-25 15:24:49 +01:00
Günther Brammer 25d74134c7 Support subpixel object movement in the editor
This also converts internal usage of ForcePosition to C4Real. For the
attach procedure, this should only result in smoother movements, but the
consequences for flight are less clear.
2010-10-10 18:46:23 +02:00
Günther Brammer fbdc799ae5 Each player can only control one Clonk simultaneously
Switching between multiple Clonks is still supported, and
Script could issue Follow commands to simulate the old
behaviour.
2010-07-30 22:38:21 +02:00
Armin Burgmeier 9f65838ae8 Fix a couple of compiler warnings 2010-04-28 23:43:25 +02:00
Martin Plicht 4902679b56 DirectExec and C4ControlScript support executing script expressions that access variables and parameters of the parent context (used for watch expressions while debugging) 2010-04-26 22:16:45 +02:00