Commit graph

20522 commits

Author SHA1 Message Date
David Cernat
b0965f094a [General] Rework PlayerAttribute packets so they are of minimal size
Previously, whenever a single attribute value changed for a player, that player then sent a PlayerAttribute packet with all values for all 8 attributes.

This did not cause anywhere as much packet spam as PlayerSkill used to, but there was no good reason not to fix it as well.
2017-11-24 14:28:05 +02:00
David Cernat
ef79a98544 [General] Rework PlayerSkill packets so they are of minimal size
Previously, whenever a single skill value changed for a player, that player then sent a PlayerSkill packet with all values for all 27 skills, plus the player's progress towards the next level and the bonuses to each attribute on the next level up as the result of sklll increases thus far.

This commit makes PlayerSkill contain only the values of specific skills, moves the player's progress towards the next level to PlayerLevel packets, and moves the bonuses to each attribute on the next level up to PlayerAttribute packets.

Players now also send a PlayerSkill packet whenever their progress towards a new point in a skill changes. This was previously avoided so as to not have massive packet spam.
2017-11-24 12:38:42 +02:00
David Cernat
64b57983f0 [General] Add TRACE log messages in player processors 2017-11-24 09:43:45 +02:00
David Cernat
606ddff813
Merge pull request #346 from TES3MP/master
Add master commits up to 24 Nov 2017
2017-11-24 05:47:33 +02:00
David Cernat
2373be9735
Merge pull request #345 from OpenMW/master
Add OpenMW commits up to 23 Nov 2017
2017-11-24 05:46:53 +02:00
scrawl
02b37dc036
Merge pull request #1562 from akortunov/carriage
Do not show carriage return characters
2017-11-23 15:56:12 +00:00
Andrei Kortunov
4f190bf7f4 Do not show carriage return characters (bug #3696) 2017-11-23 14:58:20 +04:00
David Cernat
cac4684986 [Client] Don't force skill update on cell change
Previously, an attempt by the server to simultaneously change a player's cell and skills (as you'd expect when a player file is loaded) led to:

1) The server sending the cell packet first and the skill packet afterwards

2) The player receiving the cell packet and sending their own skill packet as part of the client's forced skill update

3) The player receiving the skill packet from the server

4) The server receiving the skill packet from the player

The result was that, if the player then left the server without sending another skill packet, the server's memory retained the skills the player had sent instead of the skills it had sent to the player.

This is the first step in a solution to that situation and similar ones.
2017-11-23 10:07:14 +02:00
David Cernat
07d75abdf8 [Server] Use consistent order for includes 2017-11-23 08:11:37 +02:00
David Cernat
1ee460bba8
Merge pull request #344 from TES3MP/master
Add master commits up to 23 Nov 2017
2017-11-23 04:53:27 +02:00
David Cernat
656453725b
Merge pull request #343 from OpenMW/master
Add OpenMW commits up to 23 Nov 2017
2017-11-23 04:51:13 +02:00
scrawl
2136003e1c
Reapply commit a3f821cdc which got lost in a merge 2017-11-21 22:43:56 +00:00
scrawl
cd4f71d5cd
Merge pull request #1555 from akortunov/guifixes
Reworked trade window
2017-11-21 22:40:16 +00:00
Andrei Kortunov
ea36956ff1 Reworked trade window 2017-11-21 10:00:53 +04:00
scrawl
e840c4352f
Merge pull request #1556 from jbo-85/master
Fix search paths in FindSDL2.cmake to find SDL2 built from source
2017-11-20 23:27:51 +00:00
scrawl
cc3c27f241 Clean up layout files to use Spacer class 2017-11-20 23:20:04 +00:00
scrawl
a3f821cdcd Disable keyboard for trade +/- buttons
For one, because their RepeatClick handler breaks the keyboard function, and because its redundant anyway (just press Up/Down arrow with the edit box focused to do the same thing)
2017-11-20 23:20:04 +00:00
scrawl
9fda3b6db4 Fix NumericEditBox behavior broken by switch to std::stoi
For some reason stoi doesn't throw an error for '1foo' while 'foo1' does.

Now the edit box flat out rejects any non-digit key events.
2017-11-20 23:20:03 +00:00
scrawl
719255c5c6
Merge pull request #1557 from akortunov/journalfix
[Feedback needed] Handle 128px Tx_menubook_topics textures
2017-11-20 23:07:18 +00:00
scrawl
39a9e90b1d
Merge pull request #1553 from drummyfish/leakfix
Fix memory leak in WindowManager
2017-11-20 20:39:38 +00:00
Andrei Kortunov
60d0c83cca Handle 128px Tx_menubook_topics textures 2017-11-20 17:39:28 +04:00
jbo-85
f896c9acb6 Fix search paths in FindSDL2.cmake to find SDL2 built from source 2017-11-19 11:56:24 +01:00
David Cernat
d33254f287 [Server] Rename CharClass' isDefault() into isCustom()
It was already using the logic of isCustom() by mistake.
2017-11-19 12:35:11 +02:00
David Cernat
010a80ceca [Server] Place getters and setters in consistent order 2017-11-19 11:34:03 +02:00
David Cernat
947b3f76be [Server] Replace Player's isMale() and setIsMale() with gender property
For simplicity and clarity.
2017-11-19 11:06:35 +02:00
David Cernat
6f822f54aa [Server] Make chat commands case insensitive 2017-11-19 10:12:35 +02:00
David Cernat
a3e2ab4d4e [Server] Send correct packet for inventory changes 2017-11-19 04:24:54 +02:00
David Cernat
4cc0216e0a [Server] Send cell changes before position changes, and prioritize both
Previously, a script changing a player's cell and position at the same time would end up sending a position packet first and then a cell change packet that overrode the former, with the player ending up at the center of the destination cell instead of at the correct position.
2017-11-19 00:59:32 +02:00
Miloslav Číž
ea2bbce68a Fix memory leak in WindowManager 2017-11-18 19:27:09 +01:00
David Cernat
80be664139 [Server] Fix skill-related script functions
Add getSkillIncrease() and setSkillIncrease() script functions to get and set the attribute bonuses received at the next level up as a result of skill increases.

Previously, getSkill() and setSkill() attempted to return and set the attribute bonuses, respectively. However, they mistakenly used a skill ID as a parameter for the attribute bonuses, when in fact npcStats.mSkillIncrease is an integer array of size 8 where the key stands for an attribute's ID. As a result, setSkill() had the unexpected side effect of messing up a player's major and minor skills because of the invalid values it was setting for npcStats.mSkillIncreases.
2017-11-18 10:02:52 +02:00
David Cernat
57a0415ba3 [Server] Send level packets in Player's update() at the appropriate time
Previously, trying to send a level packet after base info and character class packets in a script actually led to the level packet being sent first and then being overridden by the others, with the player ending up at level 1 on their client.
2017-11-18 03:55:17 +02:00
David Cernat
494b10b97e [Server] Send player packets in a more appropriate order
Previously, the fact that a character class packet got sent after a dynamic stats packet caused the dynamic stats to get overridden on the client by the class change.
2017-11-18 01:47:18 +02:00
David Cernat
b2536d5296
Merge pull request #341 from testman42/patch-1
Update scripts repo link
2017-11-17 18:48:06 +02:00
Testman
7e0662cf81
Update scripts repo link
Change repo name from PluginExamples to CoreScripts.
2017-11-17 11:14:33 +01:00
David Cernat
ba161ddddd [Server] Make a few function names more consistent and fix typos 2017-11-17 04:12:25 +02:00
David Cernat
7788821a69
Merge pull request #340 from TES3MP/master
Add master commits up to 17 Nov 2017
2017-11-17 01:28:07 +02:00
David Cernat
28e1947f23 Merge pull request #339 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/engine.cpp
2017-11-17 01:26:31 +02:00
scrawl
36f4f0ef85 Don't increase simulationTime while the game is minimized (Fixes #4211) 2017-11-16 18:48:49 +00:00
David Cernat
068f733d1e
Merge pull request #338 from TES3MP/master
Add master commits up to 16 Nov 2017
2017-11-16 08:50:27 +02:00
David Cernat
5aff515d3f
Merge pull request #337 from OpenMW/master
Add OpenMW commits up to 15 Nov 2017
2017-11-16 08:49:56 +02:00
scrawl
cf40d19d7d
Merge pull request #1551 from thegriglat/abs
Change abs to std::abs
2017-11-15 17:34:59 +00:00
scrawl
60fba7acd8 Fix reorder warning 2017-11-15 17:20:08 +00:00
scrawl
c36d250044 Parse dialogue text for keywords after the resultscript runs (Fixes #4210) 2017-11-15 17:20:06 +00:00
scrawl
7c5d2a1ac4 Update dialogue topics list after result script is run
Regression from 0.42.
2017-11-15 17:20:06 +00:00
scrawl
5a93b6a324 Enable word-wrapping for the console history 2017-11-15 17:20:05 +00:00
Grigorii Latyshev
6e4f6c4bd5 Change abs to std::abs 2017-11-13 21:36:55 +01:00
David Cernat
1272b03f25 [Server] Fix typo in player script function 2017-11-13 07:43:20 +02:00
David Cernat
b4e8560698 [Client] Send cell states correctly after inputting name
Previously, initial cell states were sent in LocalPlayer::processCharGen() and were ignored by the server because the player was not yet regarded as loaded. The result was that existing players logging in could not see each other until they went through at least one cell change.
2017-11-13 05:38:56 +02:00
David Cernat
926106cf8c [General] Rework CharGen slightly for clarity purposes
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.
2017-11-13 05:33:27 +02:00
David Cernat
ac7a588632 [General] Update config files 2017-11-13 02:18:58 +02:00