Age | Commit message (Collapse) | Author | Files | Lines |
|
* Use final for all message handlers, Client, LocalPlayer,
Being::getType, Being::setPosition and Being::setMap.
(avoids some warnings about virtual dispatch in constructors)
* Use auto in more places
* Use emplace_back instead of push_back in some places
* Use default member initializers
* Less else after return
* Removed superfluous .c_str()
* Removed type aliases that are only used once
* Removed more unused includes
|
|
This change fixes hair style to take into account "race", which makes
the faces visible again. Hair colors should also be fixed now, with
partial support for itemcolors.xml added.
The Mana client now also supports per-character gender, and it now hides
the hair style and color buttons on character creation, when there are
none to choose from.
Closes #43
|
|
|
|
To match support for this in M+, since TMW uses this functionality on
two of its NPCs.
|
|
* Don't needlessly store or return raw pointers in BeingInfo
* Less copying, more moving
* Less else after return
* Make AddDEF a template instead of a macro
* Removed some unused includes
* Use range-based for loops
|
|
* Removing unused includes
* Use member initialization
* Use range-based for loops
* Use nullptr
* Removed no longer used aliases
* Use override
* Don't use else after return
* Use '= delete' to remove implicit members
* Use std::string::empty instead of comparing to ""
|
|
These checks are unnecessary as deleting a null pointer has no effect.
|
|
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
|
|
The delayed actor deletion was meant to be used during the logic calls,
to avoid modifying the container while it is being iterated. The
deletions happening from the network layer are not done while iterating
the set of actors, so it can delete immediately.
This fixes an issue where an NPC would disappear when changing
appearance on tmwAthena, because this was implemented as a remove + add,
which broke due to the delayed deletion.
Mantis-issue: 507
Reviewed-by: Jared Adams
|
|
- I made the charCreatedialog handle a possible
max permitted color Id and a minimum hair style id for tA.
- Added a foundation to later load the styles and colors from
the same file, to handle the Mana-issue #224 for manaserv.
- Support for non-contiguous hair color and style ids
has also been added.
- I also replaced the < and > arrow signs with images.
Reviewed-by: Ben Longbons, Thorbjørn Lindeijer
|
|
|
|
The hurt sound volume was being played based on the distance in tiles,
even though Sound::playSfx was expecting pixels. This would cause
hurt sounds of other players to play too loud.
There were also several conversions between pixel and tile coordinates
that could be simplified.
Reviewed-by: Yohann Ferreira
|
|
This will ease the reading of the next patch about hair handling
at character creation time in tAthena.
As requested by bjorn.
Reviewed-by: bjorn
|
|
This issue was much nastier than it first sounded.
The issue was happening when using a long weapon (like the scythe)
with the SDL backend.
The algorithm computing the sprite compound frames into one
would then update the sprite height to a high value
(127 in my case), leading to put the bubble too far away
from the player.
The algorithm not being in cause about the needed height,
I noticed that the simplest way to set a good Y position
of the text bubbles was to simply set a maximum.
A config option can be added later.
I also unified the way the position is computed in the being class.
+ Function description sentence removal requested by bjorn.
Resolves: Mana-Mantis #447.
Reviewed-by: bjorn.
|
|
Reviewed-by: Ablu
|
|
In fact, the bug was nastier and could also concern
many other beings, such as squirels, and some players.
The bug came from the distance odd check I added a while ago.
This (ugly) hack wasn't needed anymore since I made beings
finish their path before starting the new one also a while ago.
This also fixes some movement glitches I've seen in manaserv
at login time (Hurray).
Thanks for Ali-G for spotting this one.
Reviewed-by: Ablu
|
|
Conflicts:
src/actorsprite.cpp
|
|
This means that the order point of the sprites relative to the
particles is no longer the lowest point of the image but
instead a point which is approximately between the feet of
the characters.
The intent of the latest commits to treat sprites as perpendicular to the
ground instead of perpendicular to the view line is retained by this
approach.
I tested this with various particle effects and it results in exactly the
expected behavior. Note that this does NOT fix the current problems on TMW
with the snail slime effect, because the TMW content team accidently placed
this one 10px in the air. Sorry, garbage in, garbage out.
getDrawPixelY was re-renamed to getPixelY to be consistent with getPixelX,
while getPixelY was renamed to getDrawOrder, to make its purpose clear.
Further, particles are no longer drawn when behind other objects. This
is implemented by adding a drawnWhenBehind member function to Actor,
which currently returns true for everything except particles and compound-
sprites with more than one sub-sprites (the later case is consistent with
the previous behavior of them).
An exception are text particles which are excempt from this exception and
whose drawing order is also biased by 16 pixels south instead of north
to make them more visible.
Plus some minor changes from Bertram.
Reviewed-by: Bertram.
Resolves: Mana-Mantis #362.
|
|
|
|
Now the death animation is set to the minimum of 1.5 seconds
just as in the older versions, but permit longer sequences
as well.
I didn't put a maximum hard cap on it as it may be a burden
for the maintainers whatever the hard cap would be,
and as it isn't vital to set one anyway.
Resolves: Mana-Mantis #364.
Reviewed-by: bjorn, Jaxad0127.
|
|
- Made the map teleport distance fixed for manaserv.
- Small cleanups.
The branch is considered reviewed by: Cody.
Resolves Mana-Mantis: #74.
|
|
Every files has been checked against the hard coded
32 values except the map.cpp file.
I also added convenience functions in the Game class,
centralized the default item icon size, and removed two
unused defines in being.cpp.
|
|
Resolves: Mana-Mantis #336.
Reviewed-by: Jaxad0127.
|
|
Particles were being drawn with wrong positions due to their Z coordinate
being taken into account when sorting actors. Z is now only taken into account
when drawing them.
Reviewed-by: Bertram
|
|
Just some stuff that piles up while "looking" at the code, which
eventually gets annoying to ignore while staging real changes.
* Replaced a few NULL occurrences with 0
* Rely on default parameter for std::vector::resize.
* Replaced a few "" with std::string()
* Prefer .empty() to == ""
* Removed a few comparisons with NULL
* Don't check pointers before deleting them
* Removed a bunch of redundant semicolons
* Made some global variables static (local to their compilation unit)
* Prefer prefix ++/-- operators to postfix versions when possible
* Corrected location of a comment
|
|
|
|
Also fix position of being names.
Reviewed-by: Bertram
|
|
The monster offset wasn't counted anymore so I had to readd it
in the display coordinates.
Part of issue: #345.
|
|
This is provided through the use of the 'effect-id' property
of the <attack> tag.
Note that the 'particle-effect' support has been removed
as it was redundant, but can be kept for backward compatibility.
Now, on both Manaserv and tA, only the attack id 1 is supported,
i.e:
<monster>
...
<attack id="1" effect-id="11" action="attack" />
</monster>
More to come with re-enabling of the attack type support.
I had to fix a crash in the Being::takeDamage() function
when there were no attacker (in Manaserv), and add rotation
support to the effectManager to achieve this.
Reviwed-by: Jaxad0127.
|
|
Reviewed-by: Yohann Ferreira
|
|
|
|
This patch adds support for the following two parameters
in weapon items:
hit-effect-id: Effect triggered on the victim on normal hit.
critical-hit-effect-id: Triggered on the victim on critical hit.
(Specified in effects.xml)
The patch also permits the use of custom defaults set in paths.xml
by setting the following keys:
(Paths are relative to the 'particles' key value, here.)
hitEffectId: defaulted to effect id 26.
criticalHitEffectId: defaulted to effect id 28.
Resolves: Mana-mantis #337.
Reviewed-by: bcs86
|
|
This is fixng many issues and (hopefully) will make the movement
rendering much smoother.
Merge branch 'master' of gitorious.org:~bertram/mana/mana-movement-code-merge
Conflicts:
src/being.cpp
src/net/manaserv/beinghandler.cpp
Resolves: TMW-Mantis #946.
Reviewed-by: Thorbjorn.
|
|
That simply make the game a bit more realistic as I saw many
archers back fire arrows lately ;)
Plus, that's what the servers should expect.
|
|
We're now using it when picking up items.
Also, de-overnested the Game::handleInput() function when
handling pickups.
|
|
It's just an annoyance when it's only applied to a few classes. Either
we place everything in this namespace or nothing, and at the moment I
don't see any rationale for placing everything in a Mana namespace.
Acked-by: Jared Adams
|
|
Acked-by: Jared Adams
|
|
Acked-by: Jared Adams
|
|
- Removed another bogus comment.
- Made functions used only in the tA::beinghandler static.
- Don't init the destination to an irrelevant value
in being::setDestination()
|
|
- Fixed bogus documentation.
- Fixed Vector parameters to const Vector& where releavant.
- Removed a false comment.
- Removed superfluous headers in src/net/tmwa/beinghandler.h.
- Optimize a bit the tmwa::beingHandler::getPixelsPerTickMoveSpeed()
function.
|
|
Luckily or not, the code did the intended without even
being right. :)
|
|
I made it so that the behaviour can be changed with only
a boolean setting in the playerhandler.
|
|
by removing a now useless reset in the beinghandler.
Also added checks for flawed directions.
|
|
This fixes the bug about monsters direction not being updated.
The good news is that the bug was also present for Manaserv
and is now corrected.
I also moved back the ActorSprite::logic() call at its initial
place.
|
|
Also fixed again a condition in Being::logic().
I'll beautify the code in tmwAthena:Beinghandler once everything
will be working better.
Note: I also suspect current clients to flood the server with
keyboard messages, hence blocking the animation when they are remote.
I'll need to test that with someone having the same client than here..
|
|
Should be invisible on behaviour change.
|
|
Also removed dead code.
|
|
This was made in favour of the manaserv way of doing things.
I also added a way to keep the original server speed value
so the pixel value can be recomputed at each map change, as this
was necessary since the speed is given before the first map
is loaded.
The code is much more simpler now about movement handling,
and we can already see improvements on other characters
movements in The Mana World with this.
Everything can't be perfect the first time; here are bugs
identified so far:
- Monsters direction isn't updated on TmwAthena for obscure reasons.
- Remote players walking animation is sometimes reset on each steps.
- When changing map, the local player sometimes walks randomly
until the player reacts.
Stay tuned!
|
|
Based on:
http://gitorious.org/manaplus/manaplus/commit/ef7f53e43ce4306080efae3b86443a6016a3e66a
Resolves: TMW-Mantis #536
Reviewed-by: 4144.
|
|
I had to let the keyboard path not be resend when the player
released the movement keys and work on conditions
used to update the beings direction to avoid conflicts.
Resolves: Mana-mantis #154.
Reviewed-by: Thorbjorn.
|