Commit Graph

45 Commits (eabca223f5e7c237f5d3bb88183d38a41cb9bced)

Author SHA1 Message Date
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 735f9cc06b C4Landscape: Pull everything private out of the header
Since LTCG is enabled now, we don't have to define every function inside
the headers for ~xXx super speed xXx~, which means we can strip the
headers down to their bare minimum and reduce interdependencies and
therefore recompilation times by a lot.
2016-04-03 13:24:24 +02:00
Lukas Werling 8dd1450e94 Implement "gamepad stick moved" events for analog input
Analog moved events are only sent once per control frame.
2016-02-21 18:26:18 +01:00
Günther Brammer e5f75c5a44 Remove a bunch of dead code, mostly player control related 2016-02-03 03:17:23 +01:00
Sven Eberhardt 6e4c7a2c2d Lobby ready button: Prevent message spam, improve icon updating and some small fixes.
* Show max one message per second per client
* Do not show ready message locally
* Fix observer flag reset by ready state change
* Reflect ready state change in client list immediately
2015-11-21 23:58:40 -05:00
dylanstrategie d284f49b6b Add "ready" button for clients in game lobby.
Signed-off-by: Sven Eberhardt <sven2@goldwipf.de>
2015-11-18 22:49:59 -05:00
David Dormagen ac738735b2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
	src/game/C4Game.cpp
	src/game/C4GraphicsSystem.cpp
	src/gamescript/C4GameScript.cpp
2015-09-02 08:19:34 +02:00
Armin Burgmeier 3ec53c2c40 Update GTK+ editor so that one can draw background materials 2015-08-04 21:21:24 -04:00
David Dormagen 196f528201 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
	planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
	planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
	planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
	src/game/C4Game.cpp
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +02: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
David Dormagen 06ac00ace8 Merge branch 'master' into Controls
Conflicts:
	CMakeLists.txt
	Makefile.am
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Club.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	src/control/C4Control.cpp
	src/control/C4Control.h
	src/gamescript/C4GameScript.cpp
2014-02-15 14:44:57 +01: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
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
David Dormagen d0182f4f4a C4GuiWindow now uses C4String* instead of unsigned int (hash) to handle tagging 2013-05-24 18:13:04 +02:00
David Dormagen c2ba7e65d7 improved menu functionality; added test scenario and helper objects 2013-04-04 18:36:27 +02:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Günther Brammer 6a6190564f Remove some forward declarations that are already in C4Prototypes.h 2012-12-31 22:03:12 +01:00
Sven Eberhardt c287c093cc PlayerControl: Mouse coordinate space (viewport vs landscape) is now a control property; not an assignment property.
This is in preparation for proper custom control assignments
2011-11-20 21:49:38 +01:00
Nicolas Hake 5ae60485fc Make OC build again 2011-10-09 20:52:13 +02:00
Peter Wortmann 6835b7939d Fixed some warnings, security 2011-10-08 13:02:15 +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 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
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
Sven Eberhardt 0767e3608e Implement optional cursor position as parameter to controls (#216) 2010-04-10 22:44:00 +02:00
Benjamin Herr 27287b981f Reformat everything according to style guidelines
as per http://forum.openclonk.org/topic_show.pl?tid=208
and http://wiki.openclonk.org/w/Style_Guidelines
via astyle
  --brackets=break
  --indent=tab=2
  --keep-one-line-statements
  --keep-one-line-blocks
  --indent-namespaces
  --convert-tabs
  --recursive
  --exclude=zlib
  --exclude=tinyxml
  src/\*.h src/*.cpp
2010-03-28 19:58:21 +02:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Benjamin Herr f3b35227ea avoid lots of gcc warnings 2010-01-25 05:00:59 +01:00
Sven Eberhardt 21590e58c3 + MouseSelectionAlt: Callback for right-click on C4D_MouseSelect objects 2009-12-29 18:54:39 +01:00
Tobias Zwick f584896446 merge 2009-10-08 20:51:31 +02:00
Armin Burgmeier e2c68254a5 Added includes and forward declarations to headers
So that they can be included individually
2009-09-21 00:01:55 -04:00
Günther Brammer 0254addc90 Fix DebugRec 2009-08-25 17:50:51 +02:00
Sven Eberhardt df6010a148 merge 2009-08-12 17:27:43 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00