A3Wasteland / ArmA3_Wasteland.Altis

A3Wasteland is a survival sandbox mission for Arma 3 where two teams and independent players fight for survival. Built in collaboration between GoT, TPG, KoS, 404Games, and others.
http://a3wasteland.com
GNU Affero General Public License v3.0
104 stars 185 forks source link

Player ghosts.. #357

Open LouDnl opened 8 years ago

LouDnl commented 8 years ago

Well like the title says. Since 1.52 it seems like there are much more player ghosts (AI controlled characters). As in an AI stays behind on the place the player logged out. It has the exact same gear as the player and roams the map. If it gets killed it goes to spawn island and starts a killing spree there. If he's in your group he will stay with you. No clue why this is happening. It used to only happen when there was much server side lag. Since 1.52 there is much server side lag, maybe tied in to this?

AgentRev commented 8 years ago

Even thought they have too much pride and/or are too lazy to acknowledge it, player ghosts are 110% Bohemia's fault. Have we reached the point where a ghost cleanup script is needed?

LouDnl commented 8 years ago

Maybe as a temporary solution? It doesn't happen all the time.

Besides that there is a lot of weird stuff happening. Players logging in without clothing (after logging out fine with), players logging in and are stuck. Stuff that hasn't happened in a long long time.

And ofcourse all without any log entries...

LouDnl commented 8 years ago

You can disable the ghost with the following command if you come across one. [cursorTarget, false] call fn_enableSimulationGlobal;

AgentRev commented 8 years ago

lol, I was more thinking about deleteVehicle

LouDnl commented 8 years ago

Yes I know, but what I meant was in the meantime :) otherwise they kill all your players :P

AgentRev commented 8 years ago

Where do they appear? On spawn island, or where the player logged off?

LouDnl commented 8 years ago

Where the player logs off. Have seen them on spawn island on occasion. Probably because a player logged out while being there.

AgentRev commented 8 years ago

Yep, broken ass game.

LouDnl commented 8 years ago

1.52 made a lot of things really broken.

AgentRev commented 8 years ago

Okay, let's try something; add this right here:

if (!isNull _unit) then
{
    _unit addEventHandler ["Respawn", { deleteVehicle (_this select 0) }]; // goddamnit BIS, stahp it
};

This could prevent some of them from happening, but even there I'm not certain, because I think ghosts appear before HandleDisconnect.

Gigatek1 commented 8 years ago

This looks like most promising lead yet for a 1.52 lag fix.

AgentRev commented 8 years ago

Also, try changing this line to:

diag_log format ["HandleDisconnect - %1 - alive: %2 - local: %3 - isPlayer: %4 - getPlayerUID: '%5'", [_name, _uid], alive _unit, local _unit, isPlayer _unit, getPlayerUID _unit];

Normally a ghost has an empty UID but isPlayer true, so those params could probably be used to identify and wipe them.

LouDnl commented 8 years ago

I've put it in my Altis mission. Will report back.

LouDnl commented 8 years ago

First disconnecting player (I asked him to disconnect). No ghost there. Will report if we get ghosts.

17:22:22 "onPlayerDisconnected - ["Heer Dieter","76561198058705174"]" 17:22:22 Client: Remote object 5:0 not found 17:22:22 "HandleDisconnect - ["Heer Dieter","76561198058705174"] - alive: true - local: true - isPlayer: false - getPlayerUID: ''"

AgentRev commented 8 years ago

Yeah it's only useful for ghosts, normal disconnects won't show anything special.

LouDnl commented 8 years ago

No ghosts yet.

LouDnl commented 8 years ago

Just heard Exile creates ghosts too.

LouDnl commented 8 years ago

https://github.com/LouDnl/ArmA3_Wasteland.Altis/commit/837e961d276a13bf252947b5fb07ea818c7884dd

Gigatek1 commented 8 years ago

Notice any lag or freezing improvement?

LouDnl commented 8 years ago

Well, I've been waiting for the weekend when we get more players on. Haven't heard about any ghosts though.

LouDnl commented 8 years ago

Haven't heard about player ghosts yet. Seems to work.

Gigatek1 commented 8 years ago

I implemented this fix in hopes for 1.52 lag improvement. No suck luck. No ghost though. Thank you Agent and LouD. https://github.com/A3Armory/ArmA3_Wasteland.Altis/commit/7e6d8988fb951404487643096244117668b018fd

AgentRev commented 8 years ago

You could probably change the line to:

_unit addEventHandler ["Respawn", { deleteVehicle (_this select 0); diag_log "Ghost deleted" }];

That should tell us if it has any effect or not.

LouDnl commented 8 years ago

Will do. On Perf7, with this ghost protection and removing the complete ability of saving turret ammo for vehicles and static weapons seems to have had effect so far.