Page MenuHomeFeedback Tracker

onPlayerKilled not invoked in 1.66 anymore
Feedback, NormalPublic

Description

It appears that in the new 1.66 patch, the onPlayerKilled function of CfgRespawnTemplates is not invoked anymore when the player dies. This is currently blocking multiple MP mods to function properly. At least Epoch and Exile are affected, probably more.

I remember that one of the perf builds before 1.66 had the exact same issue. I believe it was perf2. The change in this perf build was revoked the day (or two days) after and perf3 was released. Now it seems the same issue has slipped through the quality check and has been released.

onPlayerRespawn is still invoked as it should.

Details

Severity
Block
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Multiplayer
Additional Information
class CfgRespawnTemplates
{
	class Exile
	{
		isCall = 1;
		onPlayerKilled = "ExileClient_object_player_event_onPlayerKilled";
		onPlayerRespawn = "ExileClient_object_player_event_onPlayerRespawn";
		respawnDelay = 30;
		respawnOnStart = 0;
		respawnButton = 1; 
	};
};

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Choppra added a subscriber: Choppra.Dec 1 2016, 9:34 PM
MGTDB added a subscriber: MGTDB.Dec 1 2016, 9:34 PM
truemc added a subscriber: truemc.Dec 1 2016, 9:36 PM

annnnnnnnnnnnd Check

added a subscriber

QA department for the win.

towatai added a subscriber: towatai.Dec 1 2016, 9:49 PM
sool added a subscriber: sool.Dec 1 2016, 9:50 PM
infiSTAR added a subscriber: infiSTAR.EditedDec 1 2016, 10:40 PM

Problem is not just on the clients, it is also on the server

Zze added a subscriber: Zze.Dec 1 2016, 11:29 PM

"upvote"? dont know if this is how im supposed to do it

commy2_ added a subscriber: commy2_.EditedDec 2 2016, 12:58 AM

// fn_selectRespawnTemplate.sqf
, - if (_isDeath && alive player) then {
,+ if (_isDeath && {alive player} && {!unitIsUAV cameraOn}) then {

xstreme added a subscriber: xstreme.Dec 2 2016, 1:37 AM

HandleDisconnect event also not firing.

mubby added a subscriber: mubby.Dec 2 2016, 2:42 AM
infiSTAR added a comment.EditedDec 2 2016, 2:48 AM

are you sure about the HandleDisconnect? I got not problem after applying a small dirty fix to Exile Server for the "KIlled" problem

This comment was removed by khaimovmr.
Senfo added a subscriber: Senfo.Dec 2 2016, 7:11 AM
vbawol added a subscriber: vbawol.Dec 2 2016, 7:19 AM
Roaban added a subscriber: Roaban.Dec 2 2016, 8:06 AM
Dwarden added a subscriber: Dwarden.Dec 2 2016, 9:19 AM
razazel claimed this task.Dec 2 2016, 10:31 AM
razazel changed the task status from New to Need More Info.
razazel added a subscriber: razazel.

Hello,

thank you for the feedback. Would you mind providing some more details? What exactly seems to be the issue.

I have tried a simple repro mission using the CfgRespawnTemplate provided by you and slightly modified, used a simple systemChat message to verify it is executed and everything seems fine.
(I have tried defining "ExileClient_object_player_event_onPlayerKilled" in an init and tried using sqf to be executed when player is killed).

Would you mind uploading a simple repro mission (if possible, without mods) that would allow me to reproduce the issue?

Thank you

ExileMod added a comment.EditedDec 2 2016, 10:39 AM

The exact issue is, that since 1.66 the onPlayerKilled defined in the respawn template is not invoked anymore when the player dies. onPlayerRespawn is still functional as before. It used to work for ages, but stopped to work yesterday.

It currently affects Breaking Point, Exile, Epoch and King of the Hill / Wasteland (The author told me yesterday).

Creating a simple reproduction mission is not possible. I can only supply you with what the description.ext of our vanilla mission includes. I cannot tell you what Breaking Point etc. do.

Here you go:

class CfgRespawnTemplates
{
	class Exile
	{
		isCall = 1;
		onPlayerKilled = "ExileClient_object_player_event_onPlayerKilled";
		onPlayerRespawn = "ExileClient_object_player_event_onPlayerRespawn";
		respawnDelay = 30;
		respawnOnStart = 0;
		respawnButton = 1; 
	};
};
///////////////////////////////////////////////////////////////////////////////
// Server Settings - Modify at will
///////////////////////////////////////////////////////////////////////////////
author = "Exile Mod Team";
onLoadName = "Exile Mod";
onLoadMission= "www.exilemod.com";
loadScreen = "exile_assets\texture\mod\logo.paa"; 
disableChannels[] = {0, 2};
OnLoadIntro = "";
OnLoadIntroTime = false;
OnLoadMissionTime = false;

class Header
{
    gameType = Survive; // Do NOT change this
    minPlayers = 1;
    maxPlayers = 100;
};

///////////////////////////////////////////////////////////////////////////////
// Exile Settings - Do not change these!
///////////////////////////////////////////////////////////////////////////////
forceRotorLibSimulation = 2;
skipLobby = 1;
joinUnassigned = 1;
respawn = "BASE";
respawnDelay = 120;
respawnDialog = 0;
respawnOnStart = 0;
respawnButton = 1; 
respawnTemplates[] = {"Exile"};
corpseManagerMode = 0;
corpseLimit = 20;
corpseRemovalMinTime = 1800;
corpseRemovalMaxTime = 3600;
wreckManagerMode = 0;
wreckLimit = 2;
wreckRemovalMinTime = 60;
wreckRemovalMaxTime = 360;
scriptedPlayer = 1;
disabledAI = 1;
enableItemsDropping = 0;
briefing = 0;
debriefing = 0;
allowFunctionsLog = 1;
enableDebugConsole = 0; 
allowFunctionsRecompile = 0;
showSquadRadar = 0;
showUAVFeed = 0;
reviveDelay = 6;
reviveForceRespawnDelay = 3;
reviveBleedOutDelay = 120;

showHUD[] = 
{
    true,   // Scripted HUD (same as showHUD command)
    true,   // Vehicle + soldier info
    true,   // Vehicle radar 
    true,   // Vehicle compass
    true,   // Tank direction indicator
    false,  // Commanding menu
    false,  // Group Bar
    true,   // HUD Weapon Cursors
    false   // Squad Radar
};

#include "config.cpp"

class CfgRemoteExec
{
    class Functions
    {
        mode = 1;
        jip = 0;

        class ExileServer_system_network_dispatchIncomingMessage
        {
            allowedTargets = 2;
        };
    };

    class Commands
    {
        mode = 0;
        jip = 0;
    };
};

onPlayerKilled is neither invoked on the client or on the server. It used to be invoked before 1.66.

Also, I do not know if it helps, but as mentioned above one of the Perf builds had the exact same issue. Another Perf build was released immediately to solve this issue. Maybe you can dig a little in the past and see if you can find that.

Where do you have the Respawn Template defined? Is it in description.ext or a config file?

I am not sure if I will be able to use provided info to reproduce the issue as it seems it might not be complete.

Did you try to verify the issue on a most basic repro? I will attach basic repro mission I have used that seems to work just fine on the Stable. Perhaps it is not the onPlayerKilled that is causing the issue

Perhaps you can try to use this and adjust it (try only the most basic things), the simpler the repro mission is the easier it will be to rule out other options and pinpoint the issue as it seems that at least basically the onPlayerKilled in the respawn template works.

And also @infiSTAR mentioned some "dirty fix", could anyone please provide an info on that? perhaps that will help too.

Isn't what "exilemod" stated relevant? "I remember that one of the perf builds before 1.66 had the exact same issue. I believe it was perf2. The change in this perf build was revoked the day (or two days) after and perf3 was released. Now it seems the same issue has slipped through the quality check and has been released."

Not be a downer but if things weren't reworded we wouldn't be in this mess.

@Reaper1243 It is relevant and it is actually already under investigation. But I don't have much more info about that so I am trying to simply gather more info because as I mentioned, it seems to work with the most basic setting on Stable branch (I have attached the mission in one of my previous comments). No attempts to reword this, simply trying to figure it out.

ExileMod added a comment.EditedDec 2 2016, 1:44 PM

I can only speak for Exile, not for the other mods. But in our case, the CfgRespawnTemplates is a part of the config. So doing only a repro-mission will not lead to the same results, since this is a mod, not a mission.

Hope it helps.

Here is a simple mission with comments in hints to reproduce:
166-repro.vr.zip (mainly you should read init.sqf)

So as jokoho482 mentionded above, the problem seems to be related to selection other unit by selectPlayer:

this is maybe related to this issue: https://feedback.bistudio.com/T121730

Regarding this:

https://feedback.bistudio.com/T121730

I can confirm that we are using selectPlayer.

He-Man added a subscriber: He-Man.Dec 2 2016, 2:17 PM

are you sure about the HandleDisconnect? I got not problem after applying a small dirty fix to Exile Server for the "KIlled" problem

Yes:
addMissionEventHandler ["HandleDisconnect", {...}]; <--- is broken

onPlayerDisconnected {...}; <--- is working

addMissionEventHandler ["HandleDisconnect", {...}]; <--- is broken

^ If that is true, shouldn't it be another ticket?

He-Man added a comment.Dec 2 2016, 2:25 PM

@ExileMod, you are right. I just wanted to clearify the Question from Infistar...

@He-Man I cannot confirm or deny that HandleDisconnect is not working anymore, but I "feel" it is not. This is a vague statement, but most mods clean up disconnected player objects via deleteVehicle. I have seen that in Exile and Battle Royale the players turn into AI when they disconnect. They are not being removed anymore. That means it could be that HandleDisconnect is affected by the same issue as onPlayerKilled.

He-Man added a comment.Dec 2 2016, 2:39 PM

Okay, thx for your Feedback. Someone has already made a topic about the HandleDisconnect:
https://feedback.bistudio.com/T121736

@ExileMod @He-Man Please check out the progress on that ticket, perhaps you will be able to help as well :) Thanks

macchky added a subscriber: macchky.Dec 2 2016, 5:04 PM
Capu added a subscriber: Capu.Dec 2 2016, 5:17 PM
Nerexis added a subscriber: Nerexis.Dec 2 2016, 7:46 PM
vbawol added a comment.Dec 3 2016, 5:57 PM

Just a heads up about this issue, not certain it is related. We noticed that the Killed EH (player addEventHandler "Killed") was executing client side properly. However, playerRespawnTime is always returning -1 since A3 1.66 release.

^ Yepp, can confirm that. Killed is still working. So is OnPlayerDisconnected. However:

OnPlayerKilled, playerRespawnTime, playableUnits and OnHandleDisconnect are broken in 1.66. It seems to be related to selectPlayer. As soon as selectPlayer is used to switch from one unit to another, every goes down the drain.

I tested a lot of stuff yesterday and wrote it here:
https://feedback.bistudio.com/T121730#1539845

BaroN added a subscriber: BaroN.Dec 3 2016, 9:21 PM
razazel changed the task status from Need More Info to Feedback.Dec 8 2016, 4:27 PM

Should be fixed in new hotfix, can you confirm?

ExileMod added a comment.EditedDec 8 2016, 4:35 PM

Multiple communities are reporting that it is working again, so we can assume it is solved.

Good job!