Page MenuHomeFeedback Tracker

setDamage ignore useEffects parameter if executed on server side → will be default(true) even if set false. Server side in pre-init work problem
Closed, ResolvedPublic

Description

1.

If destroyable building will be destroyed using house1 setDamage [1, false]; only on server then the building will be destroyed as like we executed house1 setDamage 1 i.e. house1 setDamage [1, true];, so seems param was ingored and drop to default one
see YT video

2.

It seems this command will not work properly on the server if executed before initialization
Take a look at this ticket: T133265: if set a building as destroyed on the dedicated server the building will be destroyed but undamaed 3d model will not be deleted(move under world)
This is global command, the module's function is server side, all must be ok
So I change this function in path \a3\modules_f\environment\editterrainobject\init.sqf
with this code line285 _building spawn {waitUntil {time > 0}; _this setDamage [1,false]}; i.e. exec it after mission start
And after this it works as should (the 1. problem, of course, still remains) so I concluded that the problem is in setDamage which is executed on the server and before mission start and must not be global executed suggested as a solution from a comment https://feedback.bistudio.com/T133265#2323642 need just give a delay before setDamage execution or make changes to script command 'directly'(engine?)

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Operating System Version
22H2
Category
Scripting
Steps To Reproduce

1.


see YT video demonstration

  1. launch dedicated server with repro mission and start it
  2. SERVER EXEC house1 setDamage [1,false]
  3. result → house1 was destroyed with effects
  4. exec house1 setDamage 0 to repair house1 and try again but GLOBAL EXEC
  5. result → house1 was destroyed without effects and this is expected behaviour, but this command should not be executed globally and this leads to the problem

Event Timeline

TRAGER created this task.Nov 2 2023, 12:12 PM

T171471 but w/o 2. problem note

jaj22 added a subscriber: jaj22.Nov 3 2023, 6:03 AM

the 1. shhould be fixed in Revision: 151132
the 2. Need to test investigate

TRAGER added a comment.EditedNov 9 2023, 9:10 AM

there is repro mission to showcase the 2.

  • green house's logic exec: if (isServer) then {[nearestBuilding position this] findIf {_x setDamage [1,false]}}; (server execution, before mission start, terrain building - not Eden Editor) BUG!
  • red house's logic exec: if (isServer) then {this spawn {waitUntil { time > 0 };[nearestBuilding position _this] findIf {_x setDamage [1,false]}}}; (same but after mission start) no bug!
  • blue house's logic exec: [nearestBuilding position this] findIf {_x setDamage [1,false]} (global execution, before mission start, terrain building not Eden Editor) BUG!
  • turn 180 deg!
  • green, red houses have same code exec (depend color) but this is a Eden Editor placed objects, seems no bug if it's not a terrain object

My note is that problem 2. is only if executed on server seems false and bug presents even if global exec


↓↓↓↓↓↓placed with Eden↓↓↓↓↓

I have tried your mission, I started dedicated server with it, then joined it with one client, all houses were destroyed. What am I doing wrong? Have you tried this on the latest dev? Maybe the fix that I did to the 1. fixed the 2. as well? Please report back

BIS_fnc_KK changed the task status from New to Need More Info.Nov 9 2023, 8:45 PM
TRAGER added a comment.EditedNov 9 2023, 8:51 PM

I tested this mission on the prof branch 151142 (with 1. fix)

Reproed with new DEV rev. 151133


There is a .pbo version of repro mission, drop it into MPMissions, launch dedicated server and 1 client on DEV branch, start game. Cannot see any changes or fixes here

@BIS_fnc_KK did you try to reJoin on server? Seems JIP can't get this bug, only who was in 'before mission start' stage or smth. Check this YT video https://youtu.be/zXYsIWcPdYM
First time missions start (from briefing to gameplay)


ESC → Abort → Continue (re-join or join-in-progress)
no bug then

Seems to be related to my ticket again @ T172490 something isn't propagating scripted damage right over the network.

BIS_fnc_KK added a comment.EditedNov 10 2023, 11:21 AM

So the 1st client has to be the one that starts dedicated server? My dedicated starts on its own so every player joining is JIP. Do you think this is why I can’t repro?

Do you think this is why I can’t repro?

I think yes

Yes, I removed -autoinit from server start params and now am able to reproduce it

  1. should be fixed in Revision: 151146
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Nov 10 2023, 3:43 PM
BIS_fnc_KK changed the task status from Need More Info to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
dedmen set Ref Ticket to AIII-56069.Dec 7 2023, 6:13 PM
Wulf closed this task as Resolved.Dec 20 2023, 6:01 PM
Wulf claimed this task.
Wulf added a subscriber: Wulf.

Issues fixed in Dev build 151218.