Age | Commit message (Collapse) | Author | Files | Lines |
|
* 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.
|
|
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.
|
|
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
|
|
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)
|
|
* Removed some unused includes
* Removed unused ListBox::mFont
* Removed wrong cast to SDL_Scancode
* Removed superfluous .c_str()
* Removed superfluous explicit std::string construction
* Removed unused variable
* Use more emplace_back
* Turned FindBeingFunctor into a lambda
* Avoid needless pointer references for ambient layers and use a vector
|
|
* 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.
|
|
* Use default member initializers
* Use range-based loops
* Don't use 'else' after 'return'
* Removed some unused includes
* Construct empty strings with std::string() instead of ""
* Clear strings with .clear() instead of assigning ""
* Check whether strings are empty with .empty() instead of comparing to ""
* Removed redundant initializations
|
|
* 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 ""
|
|
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
|
|
The tmwa/BeingHandler was adjusting the effect id rather than the emote
id, causing it to not find the last emote (and the rest of the emotes
only worked correctly because the effect ids were consecutive in the same
order as the emote ids).
Furthermore, the EmoteShortcutContainer refused to draw the icon for the
last emote due to an off-by-one error in dealing with the 1-adjusted
emote ids used by the EmoteShortcut class.
Also cleaned up some old remains of a player ignore strategy that used
to use the two balloon emotes (this had been their original purpose).
Reviewed-by: Erik Schilling
|
|
Made the player's character look at where it is going
even when using the keyboard, by setting its direction
after getting the actual destination, and not before.
I also used the lookAt() function to avoid yet another
custom way of setting the direction.
Reviewed-by: Erik Schilling
|
|
- 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
|
|
|
|
Members that are implemented inline are already inline, there is no need
to mark them as such.
Made two inline members of OpenGLGraphics private since because they are
marked as inline, they can't be used from other classes.
Reviewed-by: Erik Schilling
|
|
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.
|
|
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.
|
|
It has been fixed and be made adapted
to the being movement speed.
Now, for instance, the client sends 3x times less move calls
to the tA server, and roughly 20x times for the Manaserv's one.
Resolves: Mana-Mantis #346.
|
|
It already was, but now the the api is clear about it.
Client part of the mana issue: #363.
Reviewed-by: Bjorn.
|
|
Resolves: Mana-Mantis #336.
Reviewed-by: Jaxad0127.
|
|
This required moving to C++0x, so it does that too, and fixes a few errors with
that.
Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
|
|
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
|
|
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.
|
|
We're now using it when picking up items.
Also, de-overnested the Game::handleInput() function when
handling pickups.
|
|
Makes it clear what kind of listener it is, since there are other
listener classes as well.
Acked-by: Jared Adams
|
|
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
|
|
- 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.
|
|
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!
|
|
Resolves: Mana-Mantis #265.
Trivial fix.
|
|
Reviewed-by: Jared Adams
|
|
Reviewed-by: Freeyorp
|
|
Reviewed-by: Jared Adams
|
|
Conflicts:
src/being.cpp
src/client.cpp
src/commandhandler.cpp
src/gui/setup_video.cpp
src/gui/socialwindow.cpp
src/gui/viewport.cpp
src/gui/widgets/browserbox.cpp
src/gui/widgets/itemcontainer.cpp
src/imageparticle.cpp
src/localplayer.cpp
src/localplayer.h
src/map.cpp
src/net/tmwa/beinghandler.cpp
src/particle.cpp
src/particle.h
src/player.cpp
src/player.h
|
|
The Being and Player Chat events now have the precomuted permissions
for SPEECH_LOG and SPEECH_FLOAT. The Being class now acts on those
events to show speech (if SPEECH_FLOAT is present). ChatWindow now
checks for the SPEECH_LOG permission.
Reviewed-by: Freeyorp
|
|
Uses a state variable in PlayerInfo instead. Moves isTalking from Being
to PlayerInfo. Also some small cleanups.
Reviewed-by: Chuck Miller
|
|
The old behaviour was to load the weapon-type value and do many
unnecessary checks and transformation on it:
The weapon-type was transformed using hard-coded values into
an integer enum value.
The exact same thing was done on the opposite side in the animation
files before comparing the two.
As both data were string values, I simplified all of it by using
the value taken in items.xml to call the corresponding action.
This now also permit to set up new attack animation in items.xml
and in the playerset.xml without having the need
to modify the client code.
Last but not least, the weapon-type value was used by both the skills
and the actions and avoided the possibility to set up a definite action
for a weapon-type.
Note: The weapon-type parameter will become deprecated for the server
in favor of a 'skill' parameter to reflect more it's actual use.
This patch is the first step to fix Manasource issue: #157.
|
|
Conflicts:
src/gui/itempopup.cpp
src/item.cpp
src/monster.cpp
src/net/manaserv/playerhandler.cpp
src/net/tmwa/partyhandler.cpp
src/npc.cpp
src/player.cpp
src/resources/itemdb.cpp
src/resources/monsterdb.cpp
src/resources/monsterinfo.cpp
src/resources/npcdb.cpp
src/resources/spritedef.cpp
|
|
data/paths.xml configuration file.
Also added default gui theme path in branding and default wallpaper path
and file searched respectively in the branding and paths.xml files.
Hard-coded values are still used as fallbacks.
Resolves: Manasource Mantis #148.
Reviewed-by: jaxad0127.
|
|
Rename mWalkTime to mActionTime in Being and have Being manage death.
Reviewed-by: 4144
|
|
Also removes the Monster/Player difference in tmwAthena's Being::logic
and moves the particle code from Being::setAttack to Being::Logic for
tmwAthena.
Reviewed-by: Chuck Miller
|
|
Instead of having these three subclasses with minor differences, this
commit merges them back into Being. In the future, we can make Beings
that are talkable to some, attackable by others, etc. This also puts
back support for monster equipment.
Also changes remaining references to Being::Type and the constants to
refer to ActorSprite::Type.
Reviewed-by: Freeyorp
|