Correction for 6239959
@oiad isPlayer is not reliable on dead units which may be passed to
fa_plr2Str. Also, the other scripts which call fa_plr2Str always provide
a player, so we only want to check for AI on the hit log source.
This changes the hit messages to only show AI instead of the AI's names.
Changes this:
20:08:37 "P1ayer PID#7(salival) hit by PID#1(Qadeer Hakimi) with
vil_G36VA4Eot/B_556x45_Ball <ammo left:25> from 356 meters in head_hit
for 0 damage"
To this:
20:08:37 "P1ayer PID#7(salival) hit by AI with
vil_G36VA4Eot/B_556x45_Ball <ammo left:25> from 356 meters in head_hit
for 0 damage"
Sanity fix for hit and kill for vehicles so they match:
Before:
22:44:03 "P1ayer PID#3(salival) hit by AI in Pickup (PK) DZ from 15
meters in head_hit for 0.88666 damage"
After:
22:44:03 "P1ayer PID#3(salival) hit by AI with a Pickup (PK) DZ from 15
meters in head_hit for 0.88666 damage"
Kill message:
22:44:04 "salival (76561197999617086) salival was killed
by AI with a Pickup_PK_INS_DZ from 15m"
limits distance to object, as well as validating random auth key. added server_deleteObjDirect which is only for direct execution on the server, whereas server_deleteObj should be used for PVEH execution only
Stops intensive loop from running unnecessarily when dayz_townGenerator
= false; The comfrey plants are pointless atm since the only thing they
may be used for is crafting a sepsis bandage.
Also added waterHoleProxy for Napf and Namalsk placed by @skigoggles
Vanilla commit:
b5a9125086
Don't even bother using vector in the key calculation, the sqf ObjectUID
isn't as critical anymore. This method will be much faster.
Changed ObjectUID column to Varchar since with this key generation
method we can approach the BigINT ceiling much quicker than we used to.
append diag_ticktime to key. Max length is 24 characters in the DB so
the limit so this shouldn't cause issues unless the server is up for
hundreds of days.
- Safe inventory arrays are no longer sent over network to all machines
on server startup and on each lock/unlock
- Disabled user input then closed gear dialog during safe
lock/unlock/pack to block various duping methods.
- Moved safe creation, deletion and gear handling to server. This cuts
down on add[Magazine/Weapon/Backpack]Cargo, createVehicle and
deleteVehicle BE logs.
I forgot numbers greater than 1 million are truncated when converted to
string:
http://killzonekid.com/arma-scripting-tutorials-float-to-string-position-to-string/
KeyStartNumber exceeded 6 digits which is why it was being truncated to
"1e+011" and getting stuck on loop (as that string was already in
currentObjectUIDs) as mentioned in 2df7279.
Starting at 10, there should never be more than a couple duplicates
generated, so keyStartNumber will never exceed about 100 max. Added an
exit just for a fail safe.
A Plot For Life also includes Precise Base Building by Mikeeeyy. Precise
base building has no variable to switch it on or off, I don't think it
should.
Seems to work well enough, this may conflict with the duplicate object
uid fix, it appears to spam my server rpt.
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.
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.
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.
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.