Killer bot

Report bugs of MFPS 2.0 here
Post Reply
User avatar
Leonid_RU
Contributor
Contributor
Posts: 56
Joined: Tue Sep 11, 2018 3:04 am

I use MFPS 1.7.

I'll start with the fact that Player2 (master client) in the Editor, Player1 in the web. When bots kill Player 1, camera orbit is displayed not on the killer (bot), but on Player2, since it is a masterclient. In killfeed, the record of Player1's death does not appear at all in this case. If the players kill each other, everything works correctly. Works poorly only with bots and if they kill other players, that is, someone who is not a master client.
User avatar
Lovatto
Admin
Admin
Posts: 1772
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Thanks for the video, I found and the problem and fix it, for it simply replace the line:

Code: Select all

 damageData.Cause = DamageCause.Player;
in bl_Bullet.cs -> SendPlayerDamage(RaycastHit hit), with:

Code: Select all

 if (bulletData.MFPSActor != null)
            {
                damageData.Cause = bulletData.MFPSActor.isRealPlayer ? DamageCause.Player : DamageCause.Bot;
            }
            else
            {
                damageData.Cause = DamageCause.Player;
            }
Let me know if that works for you.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Leonid_RU
Contributor
Contributor
Posts: 56
Joined: Tue Sep 11, 2018 3:04 am

Thank you, it works. You are the best author, great asset support!
Post Reply