This reverts commits c4816c8 and 83dd363.
These were not errors, oiad did not properly update his dayz_server
before testing.
Renamed variables and added comments to clarify object or position can
be used
Corrections for #1988
@BigEgg17 abs(_objHDiff) only tells you how much you have raised the
ghost from where it was when you started building. To test the actual
height above ground or sea level you need to use _position select 2.
Say DZE_BuildHeightLimit was 60m and DZE_buildMaxMoveDistance was 20m.
If the player started building at 55m and then raised the object 20m,
they would be allowed to build at 75m with your check.
Also getPosATL should not be used here. For example, I am swimming on
the surface of the water on Napf and getPosATL returns a height of 29m.
@oiad you missed zombie_wildGenerate.sqf in #1987
Some combo binds will cause actionKeys to return a number greater than
six digits. See AgentRev's note:
https://community.bistudio.com/wiki/actionKeys
An example is NumLock + P [1.15763e+009]. Using a number this large as
an index errors out. Example:
test_array = [];
test_array set [9999991,true];
But six digits or less will not error:
test_array = [];
test_array set [999999,true];
Sell price of AKS74U_SD_DZ and AKS74U_Kobra_SD_DZ were wrong, since they
use 545 silencer (3 Goldbar). Sell price of Mosin PU variants was wrong
since it uses SCOPED not PSO attachment. @worldwidesorrow
Also corrected comment, extra Sa58 are camo variants while _DZ variants
are non-camo, so not entirely redundant
Lowered sell price of hemp, since these plants are pretty common. They
are guaranteed spawns In their spawn locations, and you can easily get 5
or more per server restart.
Zeds and loot should not spawn in trader cities by default, regardless
of whether the server uses safe zones.
For servers that do not use safezones, the only other things affected
are salvage and instant kill for vehicle explosions in trader cities.
Neither is a significant issue. Most servers use safezones anyway.
Following d750f57, changed to exitWith so the check is only called once
instead of multiple times. Also no need to call again in
zombie_generate, since that function is only called by
building_spawnZombies which already checks it.
This reverts commit b8dba25
As discussed with oiad on Discord, this serves no purpose now, since
DZE_lockDoor == charID means the player either just unlocked, built,
upgraded or downgraded the door, so they want to see the action.
Logically a combo lock can be removed while a door is open. In case of
it being locked, you already know the code, so it is assumed you put it
in before removing it. Completing two-three steps at once is more
convenient for the player.
Also removed _isDestructable because there are no classes which inherit
from "BuiltItems" and have a lock
@oiad when exitWith is inside an if () then it only exits that control
structure, not the whole script, so _canBuild could be overwritten by
_toolCheck below.
@oiad Add the Javelin magazine as trade_items to a trader which only
sells magazines (like FriendlyAssaultRifleAmmo) and the Javelin weapon
as trade_weapons to a trader which only sells weapons (like
FriendlyAssaultRifle), then test your changes from f8a230e with both in
your gear. You will see it allows you to sell all the magazines and the
weapon at both traders. This is because the only condition to add the
item to the sellable array is that it exists as an entry in the
category. It never checks the entry type. This commit will check to make
sure the type matches in the config and the player's inventory.
I changed your static "trade_any_vehicle" to find the type in the
config, because it could also be "trade_any_boat/bicycle/vehicle_free".
Boats are handled differently for the hitpoints check in sellItems.sqf.
Also I noticed that both the _HasKey check and your new _y == _myVehType
check were not working for upgraded vehicles _DZE[1-4] because they had
been swapped out to _baseVehicle. I forgot to account for that when I
added that feature.
This should resolve both problems. I tested both and everything looks
good. It can do with some more thorough testing though. Note
DZE_SaleRequiresKey is false by default.
These were resulting in sloppy mixed language sentences.
The server language never changes, so localize should not be used server
side, unless complete translations are added for all logs, which is not
worth the effort. Only admins see them, unlike client side strings which
are seen by everyone.
Wrecks were not deleted after removal following this change @icomrade
e079381931 (diff-e057d99bdf425219ff82fc6220a85b86L154)
In object_upgradeBuilding playerNear was exiting without readding
removed magazines.
I moved deletion back client side in packTent and upgradeStorage for
now, because there is potential for duping via pulling gear out of the
old tent during the deletion delay. PVS can be delayed especially when
the server is under load, so it can take a few seconds for the server to
delete the object after sending the request. These two scripts should be
the only ones where that could be problematic. Packing and upgrading
tents should eventually be moved completely server side like safes.
Continuation of 8035df0
This is important to have on publish to identify cheaters who spam
create objects in the database or create objects with bad inventory.
- Renamed variables to backport to vanilla
- Removed % and & due to code filtering in publicvariableval.txt
Changes in modular_build.sqf were the same as player_build.sqf.
Tested with building, upgrading buildable/vehicle/tent, downgrading,
buying a vehicle, destroying tent and removing an object.
Setvariables made redundant by 9cc3c82
Also changed removeEventHandler to remove all, so if switchModel exits
at one of the exitWiths the player will not be left invincible.
Forgot to remove F4 from the blocked list in 5acad04 @icomrade so it was
being overwritten.
Shift + P is not a hardcoded engine bind. It is just the default
DSInterface bind, so actionKeys "DSInterface" covers that in f760896.