Commit Graph

201 Commits (d59b1e5e5ba48c08a442d7ee0b4e4886cefd5089)

Author SHA1 Message Date
Tobias Zwick d59b1e5e5b reduce version numbering from x.y.z (x does never changes) to y.z 2014-12-12 21:57:52 +01:00
Martin Plicht 03f43f462b C4ObjectList: Replace trivial cases of manual list traversal with iterator usage 2014-10-25 21:25:52 +02:00
Sven Eberhardt 828eb7f82a Don't save ControlTick and SyncRate in network savegames (#1058). 2014-10-03 23:12:55 +02:00
Sven Eberhardt 91800fcfec Implement setting for forced values of parameters in league games. 2014-10-03 14:02:28 +02:00
Sven Eberhardt 3fc1f02c6d Implement custom scenario parameter selection in startup scenario selection dialogue and by command line. 2014-09-27 16:05:32 +02:00
Sven Eberhardt abab7be591 Added scenario achievements displayed as small symbols beside the scenario name in the startup selection screen.
They can be used e.g. to show that you have finished a scenario on different difficulty levels.
2014-09-24 23:08:40 +02:00
Sven Eberhardt 378bda5546 Added custom scenario parameters (SCENPAR_*).
Can currently only be set in network games in the lobby. In the future, maybe we can find a place somewhere in the scenario selection dialogue.
2014-09-23 23:02:52 +02:00
Sven Eberhardt b1db0c7918 (Re)implement text completion in dialogue text windows as an async control. Default to Space, i.e. MenuOK. 2014-08-10 20:58:26 +02:00
Sven Eberhardt 4266b370d6 Added script functions SetLeagueProgressData, GetLeagueProgressData, GetLeagueScore and SetLeaguePerformance. 2014-04-20 15:33:36 +02:00
Günther Brammer 04e1c74c05 Merge Call fix commit 2014-04-19 19:02:27 +02:00
Günther Brammer 22016e075f Replace some usages of C4ID with C4Def*
In particular those that made the c4script shell depend on C4Id.cpp.
2014-04-19 19:02:22 +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 75deff0e15 Avoid out-of-bounds read
There's only defTeamColorCount colors stored in the array; make sure the
index is within that range.
2014-04-15 14:51:57 +02:00
Julius Michaelis e5b7ef5b80 AutoFrameSkip: Graphics option to reduce lag by slow
Skips drawing every second frame if drawing the previous frame was too slow
Setting is controlled by game host
Default: on

Imported from Clonk Rage

From e6e680f49ac50a352e9a051ee21622e7f00648b6 Mon Sep 17 00:00:00 2001
From: sven2 <sven2@786b8e90-9c09-0410-89a9-bccc6ef1e79b>
Date: Sat, 21 Sep 2013 21:34:44 +0000
Subject: [PATCH] + AutoFrameSkip: Graphics option to reduce lag by slow
 clients in network games

git-svn-id: https://www.clonk.de:83/svn/clonk/stable@14501 786b8e90-9c09-0410-89a9-bccc6ef1e79b
2014-04-03 14:53:12 +02:00
Tobias Zwick 724bb80300 change a LogFatal() to Log() when loading of a player failed (related to #693) 2014-02-03 00:19:08 +07: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
Tobias Zwick db6a31cc7a add localized error for each player that could not be loaded (#693) 2013-12-18 12:47:08 +07:00
Tobias Zwick fe2a400c02 replace global function GetTime() with class function C4TimeMilliseconds::Now() 2013-12-07 21:27:01 +07:00
Tobias Zwick 94c618d153 add new type C4TimeMilliseconds for time measurements to solve problems when GetTime() overflows (#251)
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
2013-12-04 19:35:07 +07:00
Tobias Zwick ecf538cd1f refactor: consistently use time_t t... variables for times in sound system, stats, application and player controls 2013-11-29 14:16:14 +07: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 3feac3fc2c Merge branch 'issue936' 2013-09-11 14:46:55 +02:00
Nicolas Hake 83ca1393d6 Records: Never load chunks on-demand if a dump is requested
Before, unpacked records were always loaded on-demand, which made the
text dump only contain the first 4k of record data.
2013-09-08 14:47:54 +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
Sven Eberhardt 60a32b1f14 Added player control assignment trigger mode "ClearRecentKeys": If assignment is triggered, clears all recently pressed keys prior to and including trigger key.
Useful for spell combos, where one spell combo might end the same way another combo starts.

Also corrected docs for OverrideAssignments (it's just a flag; not a trigger mode).
2013-09-02 17:27:15 +02:00
Martin Plicht 524fe879aa Make DEBUGREC define a commandline option 2013-05-25 22:51:32 +02:00
Tobias Zwick 003e29f223 enable loading Title.jpg for scenario (folders) 2013-05-25 20:48:14 +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
Günther Brammer 9506c5ad97 Merge branch 'scancodes' 2013-05-24 17:47:59 +02:00
Günther Brammer 50eb1b6a76 Since internal keycodes are now scancodes, they do not need to be resolved 2013-05-24 17:41:14 +02:00
Nicolas Hake bec6e1dfb0 C4GameControl: Remove duplicated variable fPreInit
C4GameControl::fPreInit and C4GameControl::fInitComplete were always set
at the same time save for replay playback. Both variables are only ever
read in assertion checks.

Closes #961.
2013-04-26 14:22:14 +02:00
Sven Eberhardt 6250ff1766 Silence a few MSVC warnings 2013-04-01 12:48:02 +02:00
Sven Eberhardt 437433776f C4Landscape::InsertMaterial use ptr instead of ref for insertion pos 2013-02-18 00:48:25 +01:00
Oliver Schneider 582e75d3da Use scancodes instead of localized key (#729)
The options dialog still shows localized keys, but the config files use US-Layout keys (when loading default files) and scancodes when saving player changes.
2013-02-09 01:05:27 +01: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
Günther Brammer 327bfa31e7 Remove some superflouos output from the dedicated server 2012-11-30 22:20:16 +01:00
Sven Eberhardt 5b90f2f39f Fix sequence combo key assignments so they don't break when mouse movment is assigned to a control 2012-10-28 17:47:02 +01:00
Philipp Kern e037300801 Fix spelling mistake: ressource -> resource. 2012-10-21 22:20:43 +02:00
Armin Burgmeier b4aafdd874 Remove build number aka C4XVER4 2012-10-18 23:54:50 +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 ec22028640 Some DebugRec fixes 2012-10-14 14:39:22 +02:00