Commit Graph

56 Commits

Author SHA1 Message Date
ebayShopper
5a5323bdd7 Move large format strings to str formatText
These may exceed 2048 in some cases, so best to be safe and use str
formatText.

Partial revert of fbfb124 to more readable form
2017-11-05 12:12:26 -05:00
icomrade
e326678504 Don't str str 2017-08-02 18:57:26 -04:00
icomrade
fbfb124296 use str instead of format 2017-08-01 17:39:53 -04:00
ebayShopper
abdb3e0e42 Fix survival time not counted after clothes change
Vanilla commits:

cf4fde6335

74dd04616f
2017-06-10 10:07:19 -04:00
oiad
2ec5390b70 Standardize coin variables, prevent coins not refreshing on skin change. (#1904)
* Standardize coin variables, prevent coins not refreshing on skin change.

* Add missing commit
2017-03-11 13:05:34 -05:00
ebayShopper
f0ef0fce35 Make server_playerSync exit log more accurate
This will now show INFO instead of ERROR when sync exits while a player
is changing clothes.
2017-02-26 15:28:17 -05:00
ebaydayz
8c1caa9c1c Remove some redundant checks
Vanilla commits:

da7061429a

da55eaa53e
2017-01-29 19:36:48 -05:00
ebaydayz
6c62b3f8e4 Rework player_death for respawnDelay=0; #1825
See #1825
2017-01-24 15:55:15 -05:00
ebaydayz
638c7dd8b8 Remove some unused variables 2016-12-06 15:02:18 -05:00
ebaydayz
9234244c72 Clarify diag_log 2016-12-06 14:31:30 -05:00
ebaydayz
5058308f00 Prevent issues caused by respawn_west marker being moved
Vanilla commit:

39bcedb4b6
2016-12-05 14:37:28 -05:00
ebaydayz
bec4ccce38 Update dayz_server
Vanilla commits:

95bf775fd2

6e638aeb8c
2016-11-18 15:28:00 -05:00
ebaydayz
f770b0a85d Add group system
Initial commit, not tested in multiplayer yet. Some revisions still left
to do.
2016-10-27 16:06:49 -04:00
ebaydayz
c7d9741be4 Add height check for logout in air vehicle exploit
This prevents players who logout in grounded air vehicles from being relocated.
2016-10-25 18:48:54 -04:00
ebaydayz
4faa1cbaab Set third parameter after findSafePos
All other scripts using findSafePos either set the third parameter or
use a getPosATL/etc. instead before the position is saved to database.

Also partially reverted d6e78b2 since it is not needed.
2016-10-02 18:51:46 -04:00
ebaydayz
0a17804e36 Change inCombat to bool instead of number
When a variable is only going to be 0 or 1 it makes more sense to use a
bool.

Also avoided unnecessary network broadcasts of inCombat from e446603
2016-10-01 13:07:59 -04:00
icomrade
4e946552fd Fix combat logging
Thanks @ndavalos

@ebaydayz since this was moved after player_sumMedical is called in
5f0c2fcc49
it would no longer save the modified unconcious and timeout vars to the
DB.
2016-09-21 11:09:03 -04:00
ebaydayz
d0e7b26121 Fix wrong distance in relocate diag_log
My mistake from 9c2f151
2016-09-17 18:15:16 -04:00
ebaydayz
3d0c5b13cf Fix playerSync error from 5f0c2fc
@icomrade There are cases where playerSync will receive > 3 params if
achievements are passed. Example:

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/system/player_spawn_2.sqf#L305
2016-09-17 17:43:41 -04:00
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