Commit Graph

262 Commits (d0fc1e580d7fc57a5c10efabc764085835f45e51)

Author SHA1 Message Date
vexed 47ab46d0b7 update MSVC solution file Disable mimimalRebuild since it was slower than doing /Mp 2012-03-17 13:53:57 -04:00
Cyp 3a1568d9bc Show milliseconds, if game speed is set to very slow.
Useful for keeping track of game state updates when debugging. Game state updates happen
every 100 ms, at time 00:00.002, 00:00.102, 00:00.202, etc….
2012-03-04 12:03:31 +01:00
Cyp f6dce9d632 Try to be more consistent with gameTime usage.
When updating the game state, we now determine what happened in the interval
[gameTime - deltaGameTime + 1; gameTime]. The time gameTime - deltaGameTime is now
considered to be in the past, so the game state may be modified at time
gameTime - deltaGameTime + 1, at the earliest.

During GAME_* message processing, deltaGameTime is 0, however it is still considered
valid to change the game state at gameTime - deltaGameTime + 1, since that will lie
within the following update interval.

Refs ticket:3175.
2012-02-28 03:53:08 +01:00
cybersphinx e5e0f729e0 cleanup: Remove unused define. 2012-02-28 03:20:45 +01:00
vexed 9a005ac66e Let the host kick people in non alliance games. (left+right click over ready button of the player you want kicked)
close ticket:3100
close ticket:3121
Fix kick routines that got clobbered by the merge a long time ago, and also implement a in-game kick.

Currently, you hold down the right mouse button over the channel icon of the person you want to kick, and it will kick them.

There is no more room for a new icon. :(

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11490 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit da30725d967cf7076456f56122b28ddbc3202488)

Conflicts:

	src/multiint.cpp
	src/multimenu.cpp
	src/multiplay.cpp

Allow the host to kick the AI only in 'cheat mode' in skirmish games.

Closes ticket:2139

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11596 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 7a083b154dab6b6fa8f421042db0670a671127f5)

Conflicts:

	src/multimenu.cpp

When kicking, make sure they are an actual human player before adding them to the list.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11506 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 43b180768c71853b3de97d71fa091e6a0fdfc10e)

Conflicts:

	lib/netplay/netplay.c

general networking improvements by popular request.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11568 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 052d03d19ec967d4b8cee5d79446fe5ec1f2b040)

Conflicts:

	lib/netplay/netplay.c
	src/multiint.cpp
	src/multijoin.cpp
	src/multiplay.cpp
	src/multiplay.h
	src/multisync.c

Fix client side messages.

refs ticket:2144

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11601 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 98723c00a9b7d6a46eab204ccd474df4a62fbd93)

Conflicts:

	lib/netplay/netplay.c
	src/multiint.cpp
	src/multiplay.cpp
2012-02-19 17:49:49 -05:00
Cyp 24db01ae10 Remove legacy synch code.
Some of it would run in the case of desynchs, but didn't help with anything.
2012-02-12 20:16:47 +01:00
vexed 3e15039aa6 Unfortunately, the Project can't stop time, so bump the year. 2012-02-11 16:50:52 -05:00
Cyp 8ab7ba79bc Make latency guesser less optimistic.
Hopefully reduces Zzz microfreezes a bit, in the case of laggy connections.

There's probably a better way of guessing latency than this, but it works for now.
2012-02-04 08:45:00 +01:00
Cyp 6e00044711 Eliminate quantisation errors from the button rotation rate.
Added a realTimeAverage() function which returns an integer which is correct on average.

Fixes ticket:3082.
2012-01-29 08:55:22 +01:00
Per Inge Mathisen 9cc8544991 Fix pause bug when using ctrl+o to change players. 2012-01-21 13:18:06 +01:00
Per Inge Mathisen 545eb5c272 Convert research message data to ini file format. 2012-01-07 19:14:34 +01:00
Cyp 2255251e06 Remove gameTimeStart assert.
gameTimeStart sometimes does get called to many times, but easier to just ignore that.
2012-01-07 18:41:54 +01:00
Per Inge Mathisen 392d00b415 Fix gcc4.7 compile error - function returning false instead of NULL. 2012-01-07 12:12:06 +01:00
vexed 193552de92 Update MSVC solution for building both SDL & Qt backends.
Note:
Highly recommend to use STLport, (www.stlport.org).  MS's version is too slow.
Qt finally released libs for 2010, but I have no idea if they compile with openSSL support,
which is REQUIRED at the time I write this, so you need to build Qt with SSL support yourself
if the pre-built don't support it.

Don't forget to setup the environment variable QTDIR correctly when using Qt builds!
Hack note: configuration type of 'utility' was needed to pick which lib to link to--yes, that is lame,
but I see no other fix for now.
Default builds are set for SDL.
2012-01-07 01:33:40 -05:00
Cyp 5d339a4975 Make projectile fire rate precise.
Fire delay is no longer restricted to multiples of the game update interval (but
minimum delay is currently one update interval, since combFire is called only
once per update).

Projectiles no longer freeze during the first update interval.

AG should now perform at the advertised rate.

Fixes ticket:2083.
2011-12-28 14:57:09 +01:00
Cyp e727873581 Make homing projectiles travel at a constant horizontal speed.
Homing projectiles previously behaved like expanding circles, where the projectile was drawn
at the closest point on the circle to the target. Which meant that if the target was fast,
moving at right angles to the direction of the projectile, the projectile would move fast,
too (and would not be travelling in the direction it was facing).

Homing projectiles now go at a constant speed towards the target, using target prediction.
To test the target prediction, set the projectile speed to something close to 700 (same as a
VTOL), and try to get the VTOL to escape.
2011-12-25 23:48:17 +01:00
Cyp 059758dff0 Simpler render and state update scheduling.
1) If the game doesn't need to update yet (10 updates per second needed), render it. Else goto 2.
2) If the game has been rendered since it was last updated, update it. Else goto 3.
3) Either render or update the game, such that rendering takes 2/5 of the total time.

Hopefully, this means more stable framerates, while still running the game at full speed, assuming
the CPU is fast enough. And on a super-fast GPU where rendering takes only 2/3 of the time taken
to update, there should be at least one rendered frame per game-state update (same as previous
behaviour from before the render and state updates were untangled).
2011-12-25 13:45:52 +01:00
Cyp aeb3634720 Fix gameTimeStart and gameTimeStop being reversed.
Introduced in a5ad6ef0e9, d'oh.

Fixes ticket:3006.
2011-12-21 13:58:22 +01:00
Cyp ceb339939e Avoid doing extra game state updates if the game state updates are somehow slower than graphical updates. 2011-12-18 16:53:58 +01:00
Cyp a5ad6ef0e9 Simplify game time logic. 2011-12-18 15:17:05 +01:00
Cyp 7e3c8e4f4e Remove DROID::sMove.ebit[XY], use gameTimeAdjustedAverage instead. 2011-12-17 18:21:52 +01:00
Per Inge Mathisen 700bb7a56e Merge branch 'master' into qt-sdl
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2011-12-17 16:02:26 +01:00
Cyp 675ddce69e Rename the generic wzapp_c.h to wzapp.h.
The _c was a leftover from the good old days, when this was written in C and everyone used RFC 1149.
2011-12-12 00:07:02 +01:00
Cyp e50368114d Allow multiple logical updates per rendered frame.
Allows maintaining game speed when the GPU can't keep up.
2011-12-11 16:10:05 +01:00
Per Inge Mathisen 063fc63629 Initial build system for qt/sdl-backend switcher 2011-12-11 15:30:54 +01:00
dak180 e5d7318b0c Speed boosts (for the mac build times).
Also PBXBuildRules simplification.
2011-12-04 14:23:43 -05:00
vexed 41515b089b More fixes to the MSVC build system 2011-11-08 21:41:58 -05:00
vexed de28a736ef Updates for the red headed stepsister.
Refs #2936.
2011-11-08 14:01:40 +01:00
cybersphinx 8581c9a29f Use automake's builtin lex/yacc handling.
Original patch by cazfi
(http://forums.wz2100.net/viewtopic.php?p=88749#p88749).

Refs #2936.
2011-11-08 14:01:06 +01:00
Cyp b780ec8d25 power: Spend all power at start of construction, instead of during. 2011-11-07 21:10:37 +01:00
cybersphinx 2dbd06e9b1 Get rid of the unmaintained makefile.win32s.
Closes #2900.
2011-09-25 19:58:13 +02:00
vexed f31e223626 Fix all builds, they should now all compile assuming everything is set up correctly.
You have both Debug & Release builds, using MS's STL, and the you have Debug & Release builds using STLport.
The STLport version is prefered.
2011-09-03 00:21:40 -04:00
Rene Jochum 9ecba718a4 Revert "Remove a direct src include from lib/gamelib."
This reverts commit e32c1f0e89.
It broke netsync for a weired reason.
2011-07-20 21:42:22 +02:00
Rene Jochum e32c1f0e89 Remove a direct src include from lib/gamelib. 2011-07-20 12:06:13 +02:00
Buginator f76e960f7d Fix various build issues for both 'qtgame' and the bson /new lobby stuff
for MSVC.

Nothing here should break other platforms.
2011-07-08 21:51:16 -04:00
Buginator be2c105b7a Update build for Release builds & using STLport.
Update release builds to SSE2 + STLport.
2011-06-25 19:48:46 -04:00
Buginator 690b2ccfde Fix MSVC project files that were broken after the miniupnc move. 2011-05-27 20:44:58 -04:00
cybersphinx 4c68d121d6 Don't uselessly include static libraries in other static libraries.
Saves ~40 MB of diskspace when building.
2011-04-25 21:33:53 +02:00
Buginator 1f5d94a564 Fix VS2k10 for Qt.
NOTE: All Qt headers *MUST* be before of the other headers, or else we get tons of conflicts
***
DO NOT CHANGE HEADER ORDER, unless you know what you are doing, it will fubar
other build systems!
****
close ticket:2570
2011-03-24 20:06:59 -04:00
Cyp 23f318fe39 Merge branch 'master' into qt
Conflicts:
	lib/exceptionhandler/exceptionhandler.vcproj
	lib/framework/frame.h
	lib/framework/framework.vcproj
	lib/framework/input.h
	lib/gamelib/gamelib.vcproj
	lib/iniparser/iniparser.vcproj
	lib/ivis_opengl/ivis_opengl.vcproj
	lib/netplay/netplay.vcproj
	lib/script/script.vcproj
	lib/sequence/sequence.vcproj
	lib/sound/sound.vcproj
	lib/widget/widget.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj (resolved in favour of qt)
	src/Makefile.am
	win32/Warzone2100.vcproj
2011-03-22 00:01:28 +01:00
Buginator 31502ccdce Let us try this again, leave the never-interactive option for the lexers.
Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd.
Define YY_NO_UNISTD_H when no unistd.h is detected.
Remove attempt to fix isatty error on Windows introduced in  2f780609.
cherry picked from commit c046bb88e5
2011-03-17 21:35:07 -04:00
Buginator 5cfd2e9dbe Initial VS2k10 changes.
VS2k5 (no longer supported with platform SDK)& VS2k8 are NOT supported anymore.
Redo other aspects as well in preparation of moving libs out of the main codebase.
NOTE: You *must* have msysgit installed, and it should be in your system path,
or you can modify the local property sheet to point to it.
This is needed to generate the autorevision.h file, (that fix is next)
2011-03-17 21:35:00 -04:00
Cyp e689ad51d5 Merge remote branch 'origin/master' into qt
Conflicts:
	configure.ac
	lib/exceptionhandler/exceptionhandler.h
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/input.cpp
	lib/framework/input.h
	lib/ivis_opengl/pieclip.h
	lib/ivis_opengl/screen.cpp
	macosx/Warzone.xcodeproj/project.pbxproj (used qt version)
	src/console.cpp
	src/console.h
	src/frontend.cpp
	win32/libs/Makefile
and src/Makefile.am (resolved by Safety0ff)
2011-03-13 22:31:19 +01:00
abomination a72c41aeec fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|
[Edit by Cyp: Removed a "typedef int bool;" when building on non-windows.]
2011-03-13 12:32:24 +01:00
Cyp a7730ccd15 Change "typedef struct {...} Blah;" into "struct Blah {...};".
Removed a few structs due to disuse.
2011-02-25 21:30:13 +01:00
Cyp 4a1b5fb543 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:50:54 +01:00
Cyp ae2ce18314 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:45:27 +01:00
cybersphinx dc2385368c Merge branch 'master' into qt
Conflicts:
	lib/framework/frame.cpp
	lib/framework/frame.h
2011-02-05 18:44:00 +01:00
buginator 87c9f38dc3 Revert "Add guard to YY_NO_UNISTD_H definition."
This reverts commit f1ebbe6eba.

Revert "Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd."

This reverts commit c046bb88e5.

see ticket:2444 for more info.
close ticket:2444
2011-01-30 01:40:53 -05:00
Cyp d39112244b Merge remote branch 'origin/master' into qt
Conflicts:
	lib/framework/frame.h
	src/main.cpp
2011-01-22 23:05:36 +01:00