Bug 112452 - script sends faked player input
Summary: script sends faked player input
Status: RESOLVED FIXED
Alias: None
Product: boson
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: The Boson Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-12 07:30 UTC by Andreas Beckermann
Modified: 2005-09-12 16:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.