Junk and plant spawning is disabled by default. It can be enabled via
dayz_townGenerator config variable and positions blacklist (for trader
cities, etc.).
The trader objects spawn code was consolidated to functions.
The hive call in server_publishObject is the same between vanilla and
Epoch. The only difference is vanilla uses the _inventory area for
owner, lock code, etc. variables where as modular Epoch items just store
an empty array there.
The object classname does not need to be sent in the PV because it can
be obtained on the server.
PVDZE_veh_Publish was not used.
Updated loot spawning code for vehicle cargo.
Also it is faster and more efficient to call spawn_vehicles repeatedly
in one thread rather than spawn it hundreds of times (opening hundreds
of simultaneous script threads).
It should no longer be necessary to load dayz_vehicles in the
mission.sqm addons. It was taken out of mission.sqm in vanilla around
1.8.
The dayz_logo_ca.paa file was identical to loadingscreen.paa
The protective box is not needed on Chernarus.
If other maps need it we are better off spawning a permanent box around
the debug area once, instead of constantly creating new boxes every time
a player logs in.
Format has a 2048 character limit:
https://community.bistudio.com/wiki/format
Str() should be used for strings that may exceed that, like object
inventories and vehicle hit point arrays.
Achievements are saved in the state field, so we don't have room to save
friendlies there anymore. DZE_FriendlySaving is removed for now. I will
add it back later with a save to player profile instead.
The dayz_players variable is not used for anything. There were several
other unused variables in server_playerLogin.sqf.
MPHit does not always fire when a player is killed:
https://community.bistudio.com/wiki/ArmA_2:_Event_Handlers#MPHit
Using either MPHit or MPKilled is not a good idea here. There is already
a local 'killed' event handler which fires on player death
(player_death.sqf). That script sends a PV (priority message) to the
server which triggers server_playerDied. That means fnc_plyrHit needed
to finish sending its data to the server via public setVariables
(non-priority messages) before server_playerDied executed. Triggering
both these scripts at the same time was a bad idea.
Instead of sending the data to the server via setVariable I just
included it in PVDZ_plr_Death. This also lets us pass extra information
from the damage handler like ammo type, cause of death, etc. Still need
to test, but it should be more reliable and performant than
fnc_playerHit called from MPHit or MPKilled.
Fnc_veh_handleRepair is a new version of fnc_veh_setFixServer with extra
handling. It is used in salvage and some other scripts, but not
server_monitor.
It makes no sense to rename the identical DayZ PVs to have an E in their
name. I don't see any good reason it was done in the first place. All it
accomplishes is breaking script compatibility between the two mods and
requiring different publicvariable.txt filters. The only time it makes
sense is for custom Epoch variables that aren't used in vanilla.
All admins have to do to update custom scripts is swap the names
according to the change log.
Note I've submitted a pull request to replace PVDZ_veh_Save with
PVDZ_obj_Save in official too because they are duplicates.
A five minute knockout timer for combat logging is far too long. Most
players will just leave the server and join another. Two and a half
minutes is more bearable.
Wait for response from server to verify safe was saved and logged before
proceeding with deleting safe object.
Tested and confirmed this solves #1413. Most likely helps with #1503
too.