allow filtering sides on controller=
Disabled for networked multiplayer since the value differs between clients.
This commit is contained in:
parent
4aba43d15d
commit
3f2f24d45b
1 changed files with 14 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "variable.hpp"
|
||||
#include "team.hpp"
|
||||
#include "serialization/string_utils.hpp"
|
||||
#include "network.hpp"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
@ -172,6 +173,19 @@ bool side_filter::match_internal(const team &t) const
|
|||
}
|
||||
}
|
||||
|
||||
const config::attribute_value cfg_controller = cfg_["controller"];
|
||||
if (!cfg_controller.blank())
|
||||
{
|
||||
if (network::nconnections() > 0)
|
||||
ERR_NG << "ignoring controller= in SSF due to danger of OOS errors\n";
|
||||
else
|
||||
{
|
||||
const std::string& controller = cfg_controller;
|
||||
if(strcmp(controller.c_str(), t.controller_string()) != 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue