Age | Commit message (Collapse) | Author | Files | Lines |
|
Previous implementation was O(n^2), doing lots of work (saving file and
updating UI) for each removed player.
|
|
* Don't use `PlayerRelation*` in `mRelations`, but just store the value.
* Pass `std::vector<PlayerIgnoreStrategy *>` by reference instead of
pointer.
* Return player list in `PlayerRelationsManager::getPlayers` by value
instead of pointer.
Overall these changes simplify the code, making it less prone to errors.
|
|
There were some inconsistencies between the values set up in
`Client::initConfiguration` and those in `getConfigDefaults`. These
duplicates have now been removed.
For some of these settings the code getting the values had to be
adjusted to use getBoolValue, to actually rely on the provided default
instead of one provided as a parameter.
|
|
Seems to be no point in using a macro here.
|
|
Mostly adjustments based on feedback from the Finnish translator.
|
|
The Shortcuts window could no longer be moved since adding support for
resizing windows at the top edge. Now there is again a bit of space
where the window can be grabbed.
Included some related cleanups.
|
|
Fixed with clang-tidy `readability-static-accessed-through-instance`
check.
|
|
* Use 'time' instead of 'gettimeofday', since we only use the timestamp
anyway.
* Use the iterator returned by std::map::erase.
|
|
|
|
Helps making sure we're not modifying the images in the rendering code.
Re-applies 4eea727b7649726670d8963d11ab4fd429624b3e (and reverts
363f71157a8107190b3bd2ba656faf0a0e63ab36).
|
|
Because the allocated surface was based on the unscaled size, writing
the actual pixels was overwriting random memory.
|
|
Previously only the local player's weapon "strike" sound would play,
regardless of hit or miss. Now the sound is played in response to the
SMSG_BEING_ACTION message, so it can be played for all players.
Also added alias "miss", which is used by TMW in some places.
Finally, when no weapon is equipped, it falls back to the sounds defined
on the racesprite item (fixes punch sound on TMW).
Closes #68
|
|
Based on MV commit db452921bafb2dd322b52c1e5d03e5e713849dd0.
|
|
* Removed `Actor::getNumberOfLayers`, since we really only cared about
whether they should be visible when behind other stuff.
* Removed `CompoundSprite::drawnWhenBehind`, since this property was
only relevant for actors.
|
|
Now the experience mightes better with what it was before the logic
update change (59a7d5c58f8b3af21b3e19d4e78f5653bf011bfb). The per-frame
effect is reduced and less constant, based on a sine wave.
The effect is no longer applied directly to the mPixelViewX/Y values,
but is rather only taken into account when rendering the view.
|
|
This fixes the duration on 1500 ms, whereas before it was dependent on
the framerate, blinking for 200 frames.
|
|
This change addresses the slight stutter and broken animation playback
when walking with the keyboard.
Once the end of the path has been reached but a movement key is still
held, the LocalPlayer now immediately calculates a new path rather than
waiting on the next logic update.
|
|
There was a slight stutter in being movement, since each time a being
reached the next position along its path, it would only continue to the
following position with the next logic tick.
Now the logic has been adjusted to keep moving until all the time for
the current frame was used up, or the path was exhausted.
A slight stutter remains for keyboard movement, as well as broken walk
animation playback, since it will only set a new path once the current
one is finished (see e554d9b2be1ec2fcb15065ae70151302adeef602).
Also simplified some logic in Viewport::draw and removed some obsolete
code in LocalPlayer::startWalking.
|
|
The logic update now uses Time::deltaTimeMs() where needed to make it
framerate-independent. This means there will no longer be multiple logic
calls per frame (as was usually the case with logic ticking at 100 fps
whereas the game would generally run at 60 fps).
At the same time, the game can be more precise at higher framerates and
should now run smoother at 144 Hz, for example. Previously the game would
sometimes skip logic ticks at that rate.
This change affects:
* Updating of animations
* Being movement speed
* More moving of manual time variables to Timer
Notoriously, the particle system still does 100 ticks/second.
|
|
The Timer is efficient because it does not depend on incrementing a
counter to keep track of time, nor does it call SDL_GetTicks every time
its state is checked (this happens once per frame instead).
Along with global functions Time::absoluteTimeMs() and
Time::deltaTimeMs(), this replaces previous globals tick_time, cur_time
and get_elapsed_time().
For now, there is still a fixed 100 times per second logic call rate,
but the new Time::deltaTimeMs() function should allow getting rid of
this.
|
|
Maybe it once had a use, but a change in the "Show own name" setting is
already handled by LocalPlayer::event.
|
|
When items with particle effects are equipped.
|
|
Made the class and the code in general more readable by removing all
the needless getters and setters.
Also used "enum class" for SoundEvent.
|
|
(cherry picked from M+ commit cc6b5ebf94ad24180a4db69aa87cae07e3c876d2)
|
|
The effect is also there when the equipment is dropped, because it uses
the same field as the floor item.
Removed unused ItemInfo::particle.
Based roughly on M+ commit 44e5d8bcb7fea443ca9ed3844454b11ac6e4dbed.
Closes #85
|
|
Because "xmlChildrenNode" is a macro defined for compatibility with
libxml1, which we don't support.
|
|
Made the class and the code in general more readable by removing all
the needless getters and setters.
|
|
The new XML::Children class enables using a C++11 range-based for loop
to iterate over the children of an xmlNodePtr.
|
|
InputEvent::mIsConsumed is used to tell the Window it should not change
the mouse cursor as well.
This change also adds a closed hand mouse cursor, though this is unused
for now (might be useful when dragging stuff around).
The new cursors are by meway.
|
|
And removed the manual space character at the start of each line...
|
|
This was already done in the log, when responding to the --version
parameter and for the label on the Desktop widget, but not in the Setup
window. Now it is consistently part of the FULL_VERSION define.
|
|
This was already the case for each newly added line, but when the entire
layout was redone previous selected colors would spill over to the next
line.
|
|
* Apply indentation after wrapping only in NPC dialogs and chat window,
since we don't want this in the updater window / news.
* Added some margin around the text in the updater window and NPC
dialogs, using gcn::Widget::setFrameSize.
* Cosmetic changes to BrowserBox implementation.
|
|
If a text contained for example "##3##B", expected behavior was to
switch to blue color and bold font. Instead, due to there being no
actual text in between the markers, the layouting code was aborting
prematurely here:
if (mMode == AUTO_WRAP && partWidth == 0)
break;
As far as I could judge, this check is actually not necessary anyway,
but I've kept it for now since the wrapping code looks so problematic.
Instead, a while loop now makes sure we process all consecutive
formatting markers.
Closes #75
|
|
- Updated STATE_WORLD_SELECT case to automatically select the first
world and proceed to update state when mOptions.chooseDefault is true.
- This change ensures that the world selection window is bypassed for a
smoother user experience when the default selection option is enabled.
- Improved logic to handle cases with only one available world and
directly proceed without showing the dialog.
|
|
(cherry picked from M+ commit 13b9ff5baf1f6d31cc6bfa5bd30bacd45b80539c)
|
|
For new characters (and in general, when logging in with a character
that had nothing equipped), the equipment backend wasn't being
initialized. This resulted in the equipment not being visible in the
Equipment window.
Fixes #83
|
|
|
|
Nobody cared for the events that were emitted when NPC related network
messages had been sent.
|
|
|
|
Less code duplication.
|
|
|
|
The targetSelection attribute is supported on monsters and NPCs.
Also changed return value of Being::getInfo to indicate it can't return
nullptr.
(cherry picked from M+ commit dbc3b324a0c5dcb1a0ee29b289e71423a06e85fd)
|
|
The online list refreshes every 18 seconds, which matches ManaVerse
behavior. It's not ideal, but to improve this would mean diving into
TMWA.
The client version was bumped to 8 to get a SMSG_ONLINE_LIST reply.
Further changes needed related to the client version are tracked by #71.
This also changes the TabbedArea to take into account the frame size for
its tab widgets, to make sure those frames are not clipped by the
TabbedArea widget (as happened in the Social window).
The horizontal scroll bar is now disabled in all social tabs, with the
vertical one appearing only when necessary.
Closes #61
|
|
This reverts part of 087babc2525ddb89e5b31f240a08739d9a3029a9.
It's unclear to me why big words should be split (chat window
force-wraps when necessary anyway) and it's causing issues by adding
spaces in the middle of links, for example.
|
|
(cherry picked from commit 0192d44d46dcf948ab26371862753f4baf5aae4e)
|
|
Use BrowserBox in NpcDialog to enable the use of text formatting and
links in NPC texts.
This change is roughly based on ManaPlus commit
94f11a223e03c6845e7ce6e9fe67c0e9fa7061f4.
|
|
##B switches font to bold, ##b switches font to normal. Each line starts
with the normal font.
This change is roughly based on ManaPlus commit
6c4c6ca877c336e17c0378131a0a139792012a99.
|
|
MSYS2 builds cURL 8.8 with CMake, which installs a CURLConfig.cmake
file. Since CMake 3.17, the FindCURL module will prefer to return the
values from the config file. However, CURLConfig.cmake does not set
CURL_LIBRARIES.
While a fix for this is pending release (see
https://github.com/curl/curl/commit/1dec702c8676fef3a7b5850e5350102876067680),
we can rather update to modern CMake by relying on the IMPORTED target
CURL::libcurl, which is set since CMake 3.12 (our current minimum
required version).
|
|
Previously, the top edge of windows could not be dragged. Now you can also
resize windows by their top edge, as well as the top-left and top-right
corners.
|