Commit Graph

37 Commits

Author SHA1 Message Date
ebaydayz
5f0c2fcc49 Speed up onPlayerDisconnect some more
Moved combat log setVariables to playerSync. Now the player object is no
longer needed for any of the code at the bottom of playerSync or
onPlayerDisconnected.

Update objects is already performed at the bottom of playerSync. There
is no reason to do it again in playerDisconnect since it calls
playerSync.
2016-09-17 15:02:00 -04:00
ebaydayz
da70306291 Speed up playerSync a little
Removed unused variables and redundant checks.

_Force was always true so any condition with an OR _force in it was the
same as (true) i.e. redundant.
2016-09-17 14:03:05 -04:00
ebaydayz
9c2f15159a Correct Air relocate in server_playerSync
@icomrade you forgot to change the _playerObj variable to _character
when you moved this.

Also if BIS_fnc_findSafePos was successful on the first attempt the way
you had it would use the original _charPos instead of the successful
return because you never set _charPos = _newPos;

ed3227fa7a
2016-09-17 13:07:27 -04:00
ebaydayz
bc4cb49463 Remove redundant characterID check in server_playerSync
I made no changes apart from removing the (_characterID != "0") check
and the corresponding spacing/tabs.

If _characterID == "0" the script would have already exited on line 30.
2016-09-17 12:18:54 -04:00
ebaydayz
a63da4606d Speed up onPlayerDisconnect a little
Removed redundant diag_log since it is already done in dayz_recordLogin.

Removed noatlf4 variable because we use inCombat instead. Noatlf4 is
only set if the player is hit in the damage handler, while inCombat is
set any time the player is in combat.
2016-09-17 12:05:32 -04:00
icomrade
ed3227fa7a Fix dupe on disconnect
I moved the relocation code to player_sync, I didn't notice any errors
but just check to make sure it's working okay.
2016-09-10 13:43:56 -04:00
ebaydayz
ed47a63313 Make log more accurate in server_playerSync
Vanilla development commits:

45ac48b595

ca23681a7d
2016-08-12 16:41:45 -04:00
icomrade
ae78fde067 Add coin support to dayz_Server and login
New variables: DZE_groupManagement = false; //Enable or disable group
management. Enabled by default
DZE_MoneyStorageClasses = []; // If using a Single currency system
(Z_SingleCurrency = true;), this is an array of object classes players
can store coins in

if Z_SingleCurrency = true; the hive is now set up to handle coin
updates on players, characters, and objects.
if DZE_groupManagement = true; the hive is now set up to save groups

group and coin variables are set in player_monitor.fsm, for
vehicles/objects it's set in the server_monitor.sqf file for objects in
the DZE_MoneyStorageClasses array

Also, this commit includes a change to the way the hive spawns in
vehicles. vehicles are now created at [0,0,0] and moved using setPosATL
to their saved position. Thanks for the tip @ndavalos  @eraser1
2016-08-03 18:01:22 -04:00
ebaydayz
8202f7d61b Sync debug check
Vanilla development commit:

0baaac7a91
2016-07-23 15:23:00 -04:00
ebaydayz
dfe68c7824 Removed Achievements from sync.
Vanilla development commit:

09313b2376
2016-05-02 14:26:35 -04:00
ebaydayz
7da7b9e5dd Correct PVDZ_plr_Save for player zombies 2016-04-20 17:00:38 -04:00
ebaydayz
14dacf269c Add back player zombie faces
Also moved player zombie attack from 'v' key to an addaction with
localized string.
2016-04-20 14:50:12 -04:00
ebaydayz
dd8283951d Remove unused function 2016-03-25 11:54:12 -04:00
ebaydayz
ee13f4caf7 Remove friendlySaving for now
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.
2016-03-24 17:04:17 -04:00
ebaydayz
3ed4a95c14 Rework death messages
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.
2016-03-23 19:52:04 -04:00
ebaydayz
4bd9a9aa0b Update public variables
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.
2016-03-18 21:39:22 -04:00
icomrade
58acf95dc7 Server Done I Think 2016-02-29 00:29:23 -05:00
icomrade
c3ed4e49e1 Replace sleep with uiSleep
see the below links for more info. uiSleep is based off of a more
accurate method of tracking time, whereas sleep can fluctuate depending
on application performance since it is based on framerate.
https://community.bistudio.com/wiki/uiSleep
https://community.bistudio.com/wiki/sleep_vs_uiSleep
https://community.bistudio.com/wiki/sleep
2016-02-17 13:03:17 -05:00
ebaydayz
87ee176d7d Fix nearestObjects position error
_pos should be _charPos. Currently it causes this error in server RPT on 1.63.112555+ because it references the player object, not the player object's position:

 6:36:48 Error in expression <ear"] call server_updateObject;
} count nearestObjects [_pos, dayz_updateObjects>
 6:36:48   Error position: <nearestObjects [_pos, dayz_updateObjects>
 6:36:48   Error 0 elements provided, 3 expected
 6:36:48 File z\addons\dayz_server\compile\server_playerSync.sqf, line 209
2014-07-15 23:54:26 -04:00
icomrade
e54b9983dd Replace forEach with Count
Use count where you do not need _forEachIndex variable, it's quicker
than forEach.
2014-05-27 15:37:57 -04:00
Sandbird
55d49c279b Update server_playerSync.sqf
With str(_currentModel) it adds quotes in the database so it becomes : "GUE_Soldier_CO_DZ"  breaking the skin. Either comment that line or set to to what i did :)
2014-05-14 16:24:30 +03:00
icomrade
935ed7931d fix for name function error (untested)
17:00:15 WARNING: Function 'name' - PLAYER is dead
2014-03-25 22:01:07 -04:00
[VB]AWOL
8de83d4832 remove debug 2013-11-25 17:03:10 -06:00
[VB]AWOL
c60d6f5f0f disconnect save first 20 mags minus melee ammo 2013-10-31 18:59:48 -05:00
[VB]AWOL
f8dde10b40 destory != destroy 2013-10-31 11:59:03 -05:00
[VB]AWOL
1a531c7880 take 2 2013-10-31 10:55:13 -05:00
[VB]AWOL
b2b93e89ec prevent saving more than 12 magazine items 2013-10-30 17:20:23 -05:00
[VB]AWOL
cde35c43dc 1.0.2.51 dev 2013-10-30 13:06:18 -05:00
Zac Surplice
850229ffee saving properly 2013-10-29 14:51:49 +11:00
Zac Surplice
b8a5097a70 add friendly database persistence 2013-10-29 03:48:31 +11:00
[VB]AWOL
c12818f6f9 RC6 2013-10-13 13:15:27 -05:00
[VB]AWOL
c1339e4a6e 1.0.2.35 DEV 2013-09-26 20:05:41 -05:00
[VB]AWOL
2b6b172dbe using wrong variable here 2013-09-19 09:10:00 -05:00
[VB]AWOL
9236e55850 added back debug 2013-09-18 03:37:07 -05:00
[VB]AWOL
c911a7cdab 1.0.1.94 DEV BUILD 2013-08-26 02:29:18 -05:00
[VB]AWOL
9e5957b89d 1.0.1.7 DEV TEST
+ [CHANGED] Can now fill empty fuel barrels on standard fuel tanks.
+ [CHANGED] Increased range of crafting from 2m to 3m
+ [FIXED] Removed repair action from tow truck with VIL_asistvan_DZE
+ [ADDED] Tow truck VIL_asistvan_DZE can tow vehicles that fit within
the bounding box of the model.
+ [ADDED] Ability for fuel trucks to fill nearby vehicles 30m when
engine is running.
+ [CHANGED] Reworked Epoch events scheduler and made it more accurate.
+ [REMOVED] Road debris no longer spawn loot, helps with performance and
we have added extra loot positions in the world.
+ and more
2013-08-05 11:09:26 -05:00
vbawol
483279c126 Organize files a bit and removed non source pbo's 2013-06-24 06:26:15 -05:00