Skip to content

Commit 1b5076d

Browse files
Merge pull request #33 from rcsoccersim/develop
Release candidate: version 16.0.0
2 parents 630667b + b5fd1d1 commit 1b5076d

File tree

7 files changed

+79
-4
lines changed

7 files changed

+79
-4
lines changed

ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2020-02-03 Hidehisa Akiyama <hidehisaakiyama@users.noreply.github.com>
2+
3+
* NEWS:
4+
* configure.ac:
5+
- update a major version number. Official release 16.0.0
6+
- add new features, automatic illegal defense detection and anonymous games.
7+
18
2019-11-10 Hidehisa Akiyama <akky@users.sourceforge.jp>
29

310
* NEWS:

NEWS

+45-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,51 @@
1+
[16.0.0]
2+
* New parameters:
3+
- server::illegal_defense_duration (default value: 20)
4+
- server::illegal_defense_number (default value: 0)
5+
- server::illegal_defense_dist_x (default value: 16.5)
6+
- server::illegal_defense_width (default value: 40.32)
7+
- server::fixed_teamname_l (default value: '')
8+
- server::fixed_teamname_r (default value: '')
9+
10+
* Introduce an automatic illegal defense detection rule. This rule
11+
is disabled if the value of illegal_defense_number is 0 (default
12+
in this version).
13+
14+
The illegal defense area is defined by two parameters,
15+
illegal_defense_dist_x and illegal_defense_width. The area
16+
defined by default values is same as the penalty area for each
17+
side. Please note that these values may be changed in the future
18+
version.
19+
20+
If a player in the defensive side team (not a ball owner team)
21+
exists whthin the illegal defense area for that team, the referee
22+
marks that player is a candidate of illegal defense state. Then,
23+
if the number of marked players is more than or equal to
24+
illegal_defense_number, the referee judges that the team behaves
25+
illegal defense at that cycle. Finally, if the illegal defense behavior
26+
for a team continues for more than or equal to illegal_defense_duration,
27+
'illegal_defense_[lr]' playmode is called and a free kick is
28+
awarded to the other team. The free kick position is currently
29+
fixed at (+-41.5, 0.0).
30+
31+
* Introduce a fixed team name feature. If fixed_teamname_[lr] are
32+
given, the players and online coaches receive the given string as
33+
their opponent team name, while receiving their own team name as
34+
it is. This feature can be used for an anonymous game where both
35+
teams do not know their opponent team name during a game.
36+
37+
* Define a new player state flag for the monitor protocol to
38+
represent an illegal defense state. This flag can be used to
39+
visualize the state of illegal defense behavior on the
40+
monitor/logplayer.
41+
142
[15.6.0]
243
* Change the default value of server::dash_angle_step from 45.0 to
344
1.0. This change means players can dash to almost any direction.
445

46+
* Fix the problem of foul assignment during penalty
47+
shootouts. Thanks go to Ruggero Rossi for providing the patch.
48+
549
[15.5.0]
650
* Fix build problems on Ubuntu 18.04. Replace all auto_ptr variables
751
with unique_ptr or shared_ptr. Now, rcssserver requires c++14.
@@ -34,7 +78,7 @@
3478
called. Thanks go to Fernando Almeida for reporting the problem
3579
and providing the patch.
3680

37-
* Changed the defalut value of server::log_date_format from
81+
* Changed the default value of server::log_date_format from
3882
"%Y%m%d%H%M-" to "%Y%m%d%H%M%S-".
3983

4084
* Fixed a defect of boost detection.

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
AC_PREREQ(2.61)
55
LT_PREREQ([2.2])
6-
AC_INIT([RCSSServer],[15.6.0],[sserver-admin@users.sf.net],[rcssserver])
6+
AC_INIT([RCSSServer],[16.0.0],[sserver-admin@users.sf.net],[rcssserver])
77

88
#AM_INIT_AUTOMAKE([gnu 1.7.2 check-news dist-bzip2 dist-zip])
99
AM_INIT_AUTOMAKE([gnu 1.7.2 check-news foreign])

src/player.h

+1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ class Player
302302
//
303303
Int32 state() const { return M_state; }
304304
void addState( const Int32 state ) { M_state |= state; }
305+
void removeState( const Int32 state ) { M_state &= ~state; }
305306
void resetState();
306307

307308
//

src/referee.cpp

+17-1
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,7 @@ IllegalDefenseRef::analyse()
15221522
const double right_x = +ServerParam::PITCH_LENGTH * 0.5 - ServerParam::instance().illegalDefenseDistX();
15231523
const double half_width = ServerParam::instance().illegalDefenseWidth() * 0.5;
15241524

1525-
for ( Stadium::PlayerCont::const_iterator p = M_stadium.players().begin(), end = M_stadium.players().end();
1525+
for ( Stadium::PlayerCont::iterator p = M_stadium.players().begin(), end = M_stadium.players().end();
15261526
p != end;
15271527
++p )
15281528
{
@@ -1535,6 +1535,7 @@ IllegalDefenseRef::analyse()
15351535
&& std::fabs( (*p)->pos().y ) < half_width )
15361536
{
15371537
left_player_illegal += 1;
1538+
(*p)->addState( ILLEGAL_DEFENSE );
15381539
}
15391540
else if ( (*p)->side() == RIGHT
15401541
&& M_last_kicker_side == LEFT
@@ -1543,6 +1544,7 @@ IllegalDefenseRef::analyse()
15431544
&& std::fabs( (*p)->pos().y ) < half_width )
15441545
{
15451546
right_player_illegal += 1;
1547+
(*p)->addState( ILLEGAL_DEFENSE );
15461548
}
15471549
}
15481550

@@ -1553,6 +1555,13 @@ IllegalDefenseRef::analyse()
15531555
else
15541556
{
15551557
M_left_illegal_counter = 0;
1558+
1559+
for ( Stadium::PlayerCont::iterator p = M_stadium.players().begin(), end = M_stadium.players().end();
1560+
p != end;
1561+
++p )
1562+
{
1563+
if ( (*p)->side() == LEFT ) (*p)->removeState( ILLEGAL_DEFENSE );
1564+
}
15561565
}
15571566

15581567
if ( right_player_illegal >= ServerParam::instance().illegalDefenseNumber() )
@@ -1562,6 +1571,13 @@ IllegalDefenseRef::analyse()
15621571
else
15631572
{
15641573
M_right_illegal_counter = 0;
1574+
1575+
for ( Stadium::PlayerCont::iterator p = M_stadium.players().begin(), end = M_stadium.players().end();
1576+
p != end;
1577+
++p )
1578+
{
1579+
if ( (*p)->side() == RIGHT ) (*p)->removeState( ILLEGAL_DEFENSE );
1580+
}
15651581
}
15661582

15671583
if ( M_left_illegal_counter >= ServerParam::instance().illegalDefenseDuration() )

src/stdtimer.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,13 @@ StandardTimer::run()
223223
printf( "WaitForSingleObject failed (%d)\n", GetLastError() );
224224
#else
225225
if ( ! gotsig )
226-
sigpause( SIGUSR1 );
226+
{
227+
//sigpause( SIGUSR1 );
228+
sigset_t mask;
229+
sigemptyset( &mask );
230+
sigaddset( &mask, SIGUSR1 );
231+
sigsuspend( &mask );
232+
}
227233
#endif
228234
gotsig = false;
229235

src/types.h

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ enum PlayerState {
6666
FOUL_CHARGED = 0x00020000, // player is frozen by intentional tackle foul
6767
YELLOW_CARD = 0x00040000,
6868
RED_CARD = 0x00080000,
69+
ILLEGAL_DEFENSE = 0x00100000,
6970
};
7071

7172
enum Side {

0 commit comments

Comments
 (0)