AbigailBuccaneer
6978c28ee0
Compile with -Wsuggest-override under GCC
...
Clang by default compiles with -Winconsistent-missing-override, which
warns when a class declares virtual functions that override those in the
base class, and some but not all of them are explicitly declared
`override`.
GCC doesn't support this option, but has a stronger version,
-Wsuggest-override. In combination with -Werror, this means that any
virtual function that overrides another *must* be explicitly declared as
`override`.
This commit enables -Wsuggest-override where available. This means that
GCC users can't break the Clang build with inconsistent overrides (see
#1113 and #1114 ) and consequently that any build that passes the pull
request CI build on Jenkins won't break because of inconsistent
overrides.
2018-04-19 19:58:44 +01:00
AbigailBuccaneer
5cec29f4e6
Fix building under clang-7
...
Currently the build fails because of -Wdelete-non-virtual-dtor warnings.
This catches when an object is destructed, has a non-virtual destructor,
and is an abstract base class or a non-final class with virtual
functions. The warning happens inside unique_ptr<T>::~unique_ptr.
The warning is to prevent somebody writing code like this:
class MySceneEndCondition : public CSceneEndCondition {
~MySceneEndCondition() { /* some complex logic */ }
};
// this won't call MySceneEndCondition's destructor, potentially
// leading to leaks or segfaults:
std::unique_ptr<CSceneEndCondition> p{new MySceneEndCondition()};
2018-04-19 10:19:05 +01:00
tomangelo2
2f71cce9c9
Fix camera behaviour when switching to viewpoint
2018-04-15 00:06:04 +02:00
tomangelo2
b04d8d205b
Added viewpoints feature
...
This allows you to set fixed viewpoints in specific location, without attaching to any object, enabling you to track the game from any location.
Proper camera handling will be implemented in next commits.
2018-04-11 21:24:20 +02:00
tomangelo2
ad6dd00275
Change new functions return type and switch to enum class
...
As suggested by @krzys_h
2018-04-08 23:43:22 +02:00
krzys-h
477dc0cae7
Some CBot code optimizations
2018-04-06 15:02:06 +02:00
B-CE
0e6d22a549
Fix clang compilation, fixes #1113
2018-03-12 12:42:22 +01:00
tomangelo2
d371338920
Fix scoreboard sorting parameters
2018-03-11 17:00:17 +01:00
tomangelo2
1b79e8409f
Add switch to determine sort type
...
You can set it in scene file with ScoreboardSortType SortBy="Name" or "Points"
2018-03-07 21:25:35 +01:00
tomangelo2
ff0f22ef44
Sort scoreboard
...
First, the team with more points, then which team scored points faster
2018-03-07 15:46:30 +01:00
Martin Doucha
81b4d0e28b
Add Czech translation
2018-02-24 20:39:29 +01:00
krzys-h
7f6c0cd31e
added a thing
2017-11-22 18:29:09 +01:00
krzys-h
5f5e5234fc
Fix CEdit background margins, closes #1029
...
This mismatch happened after changes in 08d87fa975
2017-11-04 11:56:15 +01:00
krzys_h
d3b969fb4d
Merge pull request #992 from DavivaD/dev-dmgalarm-st2
...
Damage Alarm Implementation (2th Stage)
2017-11-04 11:27:14 +01:00
krzys_h
17d47e9b63
Merge pull request #1040 from melex750/dev
...
Saved game bug fix
2017-11-04 11:24:09 +01:00
krzys-h
387b7b5396
Fix non-scoreboard code battles, closes #1023
2017-11-04 11:23:17 +01:00
melex750
d357de1438
Save object lifetime and abstime
...
Fixes #1006
2017-10-24 05:12:19 -04:00
melex750
1eee06d9f9
Keep mission history after loading a crashsave
...
Fixes #812
2017-10-24 04:55:22 -04:00
melex750
a9e0874abc
Fix 'this' for object:: functions
...
Fixes #672
Fixes #1026
2017-10-24 04:46:07 -04:00
krzys_h
6b1dd5dd8b
Merge pull request #994 from DavivaD/dev-issue-658
...
Thumper & Recycler Enhancements.
2017-10-22 18:22:06 +02:00
krzys_h
ee0f3ff5fd
Merge pull request #1022 from immibis/dev
...
Fix horizontal scrolling of planets and background images
2017-10-22 18:21:49 +02:00
krzys_h
9448f6712f
Merge pull request #1004 from melex750/dev-cbot
...
Escape codes for strings in CBOT
2017-10-22 18:20:50 +02:00
krzys_h
0a83508547
Merge pull request #985 from melex750/dev
...
Bug fix for CStudio
2017-10-22 18:20:35 +02:00
DavivaD
2a0c2c38f0
Make shortcut blink in red
2017-10-17 02:35:33 +02:00
melex750
bf69b86233
Fixed shortcut not changing to normal state
2017-10-17 02:33:05 +02:00
tomangelo2
dab223e6ce
Clamp energy level to standard values for OrgaShooters
...
Fix issue #1009
2017-10-16 20:29:59 +02:00
tomangelo2
f40756bc46
Fix turn(1) doesn't draining energy
...
Fix using @Melex750 example, thanks!
Fix issue #136
2017-10-11 18:50:57 +02:00
immibis
8b0ccf6667
Fix horizontal scrolling of background images.
2017-08-05 20:08:00 +12:00
immibis
2e8798b33d
Make planets stay in one place in the sky - at least in the X direction.
2017-08-05 20:08:00 +12:00
immibis
2751db3245
Add horizontal FoV to CEngine
2017-08-05 19:45:08 +12:00
DavivaD
ee35d35db3
Correct Small Mistake
2017-07-27 02:02:46 +02:00
DavivaD
959854ec59
'Make Thumper Great Again'
2017-07-26 23:05:53 +02:00
tomangelo2
0de347d430
Fixed goto() behaviour on 32-bit binaries
...
Closes issue #844
2017-07-26 14:54:04 +02:00
DavivaD
a4482f1a7c
Decrease radius of squashing items.
2017-07-24 23:20:21 +02:00
melex750
e3c44e956f
Add syntax highlighting for escape codes
2017-07-22 14:30:05 -04:00
melex750
c03dfc1284
Add escape codes for string literals
2017-07-22 14:29:05 -04:00
DavivaD
b5e0f9966f
Make Recycler Recycle small Building Ruins.
2017-07-21 20:37:18 +02:00
DavivaD
bef6e9eceb
Make Thumper Squash transportable/small objects.
2017-07-21 20:36:31 +02:00
melex750
86870167a6
Fix moving and resizing open/save dialog
...
* Fixed buffer overflow when resizing
* Stop hard drive thrashing when moving/resizing
2017-06-26 14:19:53 -04:00
melex750
2d2990ff91
Fix moving and resizing editor/debugger window
...
* Stop hard drive thrashing when moving/resizing
* Also fixed #691 .
2017-06-26 14:11:47 -04:00
DavivaD
a29a4f93ac
Damage Alert Implementation (2th Stage)
2017-06-20 23:35:33 +02:00
tomangelo2
75d9f8573b
Display warning if no quicksave slot is found
2017-06-11 23:29:50 +02:00
tomangelo2
d63ed865f4
Added QuickSave/QuickLoad feature #929
...
Also rearranged a bit speed control buttons to make some space for it
F5 - QuickSave
F6 - lower speed (current/2)
F7 - reset speed
F8 - higher speed (current*2)
F9 - QuickLoad
2017-06-11 17:50:21 +02:00
krzys-h
d860a08d21
Merge long first frame rendering fix from #898
...
Also did some changes to make sure the "F1 to open SatCom" appears immediately (not after 0.1s),
and that mission timer won't start ticking in the first simulation frame (mainly for code battle initial pause)
2017-06-04 13:10:50 +02:00
krzys-h
bb35585194
Fix object.factory() code type detection, closes #938
2017-06-03 21:43:10 +02:00
krzys-h
4faabf2185
Apply shadow mapping performance counter patch from #923
2017-06-03 21:11:18 +02:00
krzys-h
a95f736cbe
Fix delete(this.id), closes #925
2017-06-03 20:05:54 +02:00
krzys_h
bf94bd7130
Merge pull request #965 from melex750/dev
...
Improved search() and searchall()
2017-06-03 18:56:29 +02:00
Abigail
f4614658cf
Fix -Wundefined-var-template warning ( #963 )
...
This avoids specializing CSingleton<T>::m_instance for each type, and
instead just defines it once in the header. This is allowed by the
standard, multiple definitions are merged in the same way that inline
functions are.
2017-05-29 20:46:11 +02:00
melex750
15b8cf7f78
Update object variable when concatenating strings
2017-05-25 02:09:44 -04:00
melex750
30210d0de7
Add searchall() and improve search() function
2017-05-25 02:01:42 -04:00
krzys-h
02aa281d30
Remove unnecessary m_instance declarations
...
They don't do anything at all in gcc and clang, but cause compile errors in MSVC
see #955
2017-05-24 14:00:34 +02:00
krzys-h
28081bfd3e
Fix clang builds
...
see #955
2017-05-24 14:00:34 +02:00
krzys-h
1f477bbc86
Fix error in edit.cpp in 08d87fa975
2017-05-24 12:46:30 +02:00
krzys-h
7216d8d12e
Fix crash after exiting a code battle
2017-05-24 12:42:37 +02:00
krzys-h
08d87fa975
Make initial scoreboard values editable
2017-05-24 12:39:05 +02:00
krzys-h
f60108f367
Prevent enforcement of ObligatoryToken for level controller scripts
2017-05-24 10:50:43 +02:00
krzys-h
935b789d02
Fix alien animations after 5d4dfd8cb5
2017-05-24 10:45:31 +02:00
krzys-h
5d4dfd8cb5
Fix scoreboard points sometimes being added multiple times
2017-05-23 22:25:40 +02:00
krzys-h
d8b0bd4df8
Make TargetBots explode when they run into something
2017-05-23 22:02:00 +02:00
krzys-h
149d1f8156
Fix aliens not appearing on the minimap, closes #901
2017-05-23 20:51:37 +02:00
krzys-h
004106eb19
Don't limit types of objects visible on minimap with fixed image
2017-05-23 20:47:03 +02:00
krzys-h
648dfd75c4
Fix handling of particle 'father' objects when they are destroyed
2017-05-23 20:31:55 +02:00
krzys-h
904b7e580b
Prevent giving scoreboard points to team 0
2017-05-23 20:20:46 +02:00
krzys-h
2d7911f155
Fix delete() in CBot not destroying PowerCells properly
2017-05-23 20:19:47 +02:00
MatiRg
417301ff06
Fix rendering glasses in FPP camera, closes #775 ( #959 )
2017-05-23 18:57:41 +02:00
krzys-h
108551c199
Fix @tomangelo2's code style
...
see 47a8f70f0f
2017-05-22 11:11:44 +02:00
Abigail
11d950221b
Fix all compiler warnings and enable -Werror ( #955 )
...
This removes all compilation warnings on:
* g++ 4.7.4, 4.8.5, 4.9.4, 5.4.1, 6.3.0, 7.0.1-svn246759
* clang++ 3.9.1, 4.0.0, 5.0.0-svn303007
2017-05-22 11:10:35 +02:00
DavivaD
df12f87b47
Implement damage alarm ( #916 )
...
Implements part of #320
2017-05-22 11:01:36 +02:00
krzys_h
cd808ac59f
Merge pull request #920 from melex750/dev
...
Fix default arguments
2017-05-22 10:58:16 +02:00
MatiRg
a0e5cc25e1
Allow ctrl + backspace in the editor. ( #839 )
2017-05-22 10:57:30 +02:00
krzys-h
7b328fbfc3
Make UraniumOre not destroyable, closes #777
...
This was likely a mistake during object interface refactoring
2017-05-21 21:45:46 +02:00
tomangelo2
47a8f70f0f
Display warning if there is not enough energy to shoot
...
Fix issue #949
2017-05-20 20:41:30 +02:00
krzys-h
681d5203e5
Make code battle start button header translatable
2017-05-19 21:23:14 +02:00
krzys-h
c68f5e276f
Add live scoreboard display
2017-05-19 21:11:43 +02:00
krzys-h
b3ea687d32
Minor documentation fixes
2017-05-19 20:15:13 +02:00
krzys-h
8948da0612
Add Barricade objects
2017-05-19 15:33:44 +02:00
krzys-h
327eafddb7
Add order= parameter for ScoreboardEndTakeRule
2017-05-18 20:39:32 +02:00
krzys-h
6bebbb3f70
Fix sky rendering artifact
2017-05-18 19:03:19 +02:00
krzys-h
f6cc629054
Log correct terrain relief resolution
2017-05-18 18:32:22 +02:00
krzys-h
cf7c19ef62
Make teams and scoreboard translatable
2017-05-17 19:00:40 +02:00
krzys-h
880f31a7c6
Add basics of scoreboard implementation; better support for multiple teams
2017-05-17 18:22:58 +02:00
krzys-h
6cd72543c4
Fix amount of damage from OrgaShooters
...
I messed it up in previous commit, 0.002/2 is 0.001 not 0.0005 :P
2017-04-29 13:18:01 +02:00
krzys-h
fda58a6008
Change bullet collision logic to allow for collisions with non-damageable objects
...
For now, you have to add bulletWall=true to objects you want bullets to collide with.
It's ugly but will work for now. This is needed mostly for compatibility
with exercises which use barriers to block movement but not bullets.
I also made the collision checks run more often because otherwise the bullets
would sometimes miss the objects (but only visually)
2017-04-29 13:14:10 +02:00
melex750
f80db9e8fb
Fix using negative numbers in default arguments
...
Issue #919
2017-03-03 02:11:10 -05:00
melex750
b032dad578
Fix execution of default arguments
2017-03-03 01:09:09 -05:00
tomangelo2
588bf30b94
Fixed some functions doesn't returning 0 if no error
...
Fix issue #917
2017-03-02 23:01:55 +01:00
krzys-h
9eae1e151d
Fix Shooter target getting stuck on not selectable objects ( #900 )
2017-01-28 12:56:42 +01:00
krzys-h
7fadf7bad5
Fix aliens being selectable by default ( #900 )
...
Broken in 6a382830a9
This change also allows you to make selectable insects with selectable=1 in scene file
2017-01-28 12:53:28 +01:00
melex750
92a8c48953
Add syntax for parameters with default values
...
Also fixes #642
2017-01-24 15:19:03 -05:00
melex750
baba6081b3
Add checking for return statements in functions
...
issue #30
2017-01-24 14:41:22 -05:00
melex750
2ff8251a81
Fix game crashing with syntax errors
2017-01-24 13:47:00 -05:00
melex750
8e54f7ca9c
Fix memory leaks in CBOT engine
2017-01-16 21:16:59 +01:00
melex750
64bc1f1afb
Fix constructor/destructor and field syntax
2017-01-16 21:16:59 +01:00
melex750
8fc0151444
Fix increment and decrement syntax
2017-01-16 21:16:59 +01:00
piotrwalkusz1
d7fae300b9
Fix crash on class redefinition, closes #703 ( #890 )
2017-01-15 20:28:52 +01:00
Smok94
8a0c7279dc
Command history for cheat console, closes #316 (PR #869 )
...
Adds console command history. Browsable by up and down arrow keys.
2017-01-02 20:23:19 +01:00
piotrwalkusz1
6ec13017eb
Fix apperance camera position, closes #802 ( #880 )
2017-01-02 18:43:19 +01:00
Tomasz Kapuściński
9bdd83771e
Optimizations and changes in OpenGL 2.1 device.
...
* Limited number of lights to 4
* Only directional lights
* Per-pixel lighting
* Improved dynamic shadows a bit
2017-01-02 16:35:40 +01:00
krzys-h
7b3b257580
Fix code style
2017-01-02 14:54:38 +01:00