Bug 112452

Summary: script sends faked player input
Product: [Applications] boson Reporter: Andreas Beckermann <b_mann>
Component: generalAssignee: The Boson Team <boson-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andreas Beckermann 2005-09-12 07:30:04 UTC
Version:            (using KDE KDE 3.4.2)

The ai.py script installs event handlers, for example for the event "UnitWithTypeProduced" and sends out player input for the playerID that is contained in this event.

However the event is received by a single script instance for all unit productions that the corresponding player can "see", so if the AI player can see the factories of the human player, the AI will receive such events for the human player, too. But in that case the event contains (of course) the playerId of the human player - and the AI will use that ID to send out (faked) player input.

It should check whether it is actually interested in the event before using it.

CU
Andi
Comment 1 Rivo Laks 2005-09-12 16:51:25 UTC
It was already fixed in 0.11 branch but noone had ported it to HEAD yet.
Ported now.