Page MenuHomeFeedback Tracker

Eventhandler "HandleScore" broken when used on a server with a headless client connected
New, NormalPublic

Description

Short: The eventhandler "HandleScore" currently does not always trigger when a unit on a dedicated server gets score added after a kill when a headless client (HC) is connected.

Long: This EH works fine when in Singleplayer / Hosted or Dedicated, but when used on a server with remote units getting handled by a connected headless client, the eventhandler will NOT fire reliably.
So, when a headless client (HC) is connected and handling units, most of the times when one of those units gets killed, the killer does get the score for the kill, but the eventhander will NOT fire. This happens about 80% of the time, mostly when using vehicles to kill other vehicles. Killing foot units as foot soldier mostly does trigger the EH, but also not reliably.
This means if somebody would use this eventhandler with the "false" parameter to mitigate every score a player gets, this won't work reliably - and there is absolutely no workaround for this bug.

Attached is a mission to reproduce this:

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
10.0.17763.292
Category
Scripting
Steps To Reproduce

I've uploaded a testmission to repoduce this easily:

  1. Start the mission on a dedicated server and connect a headless client to it.
  2. Connect as a player to this server, select any of the three slots, don't edit the parameters yet, start the mission.
  3. Enter the nearby empty tank as gunner and start killing some enemy vehicles on the runway.
  4. In systemchat you will now notice two messages for each kill: "|-> entityKilled EH triggered" Shows up every time any entity gets killed "|---> Handlescore EH triggered" Shows up every time the eventhandler in question triggered on the kill
  5. So far this worked fine. Now restart the server, same setup, but this time change the parameter "Headless Client" to "ENABLED" before. Then start the mission.
  6. Repeat steps 3 & 4. Now you'll notice that you'll get only "entityKilled" in chat, but "handleScore" should be gone for >90% of the kills.

This shows that the handleScore EH just stopped working.

  1. -> Also definitly try exiting the tank and killing vehicles with your launcher and some of the drivers with your rifle through the windows - sometimes the EH will trigger, sometimes not. Inside the tank it mostly will not, with your rifle it somehow will do.

Alternative without my testmission:

  1. Create a mission with a player in a tank and several enemy vehicles. Those vehicles MUST be spawned by a headless client.
  2. Set up two eventhandlers: "entityKilled" and "handleScore" for the player. Both should trigger some kind of debug messages
  3. Start the mission on a dedicated server with a connected headless client.
  4. Every time you kill a unit that is spawned by the headless client, the "entityKilled" EH will fire, but the "handleScore" will NOT.
  5. Repeat this without the HC. Now "handleScore" will work again.
Additional Information

Although this feels just like a minor issue regarding general gameplay, for missionmakers and scripters this is in fact a huge issue.
This completely prevents custom scoring systems on dedicated servers with headless clients and forces users of such a system to fall back to a server with all units rendered on the server itself, thus creating a performance bottleneck.
Also there is no workaround for this - as long as this EH is broken, custom scoring solutions will not work

Event Timeline

auge103 created this task.Feb 24 2019, 3:07 AM
auge103 edited Steps To Reproduce. (Show Details)
auge103 edited Steps To Reproduce. (Show Details)Feb 24 2019, 3:09 AM
auge103 edited Steps To Reproduce. (Show Details)Feb 24 2019, 3:25 AM

Any updates on this? Is the eventhandler still broken?