Age | Commit message (Collapse) | Author | Files | Lines |
|
If the player switches login, then the password field in the
login window should be empty. This was not the case after
registering or password change.
Reviewed-by: Ablu, Bertram
|
|
Better to show non-rotated/flipped tiles than no tile at all. This also
fixes interpretation of collision tiles that happen to be flipped.
Also interpret the gid as an unsigned number, since that's how they are
written in the TMX file since the introduction of these flags.
Reviewed-by: Yohann Ferreira
|
|
I first removed the keep attacking and pickup targetting unset
statements in the setdestination() function
since it was messing with all the rest of the logic,
and put those targetting logic where they belonged more.
I also changed the gotoTarget function to properly call the setTarget
function which permitted to properly unset the previous target
in that case.
I also finished the logic built around the mGoingToTarget member
(until then actually unused) to make it all work again.
At last, I also removed a now false comment
in the startWalking() function.
Reviewed-by: Erik Schilling
|
|
The direction is updated in those case only when the engine knows
it's the mouse requesting the destination.
Reviewed-by: Erik Schilling
|
|
I also made the range be taken from the server type
as for the pickup and npc talk ranges.
Last but no least, I fixed the parameters sent with
PGMSG_PICKUP to send the (item) position where to pickup at
as described in the manaserv protocol.
The pickup is still not 100% functional due certainly
to two problems:
1. The client item coordinates might not be the exact same as in the server.
2. The client seems to try to pick up the item a bit too soon,
probably for the reason given in 1.
I'll investigate this in another patch.
Reviewed-by: Thorbjørn Lindeijer, Erik Schilling.
|
|
I also made the button not readjust its size when deleted
to avoid a crash.
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
|
|
The character used to stick to both corners of an obstacle it
encountered when walking diagonally.
Now it simply go back to the straight moving mode when
encountering an obstacle in one of the two direction used.
This also simplifies the function logic.
The character direction bug left is still there,
and will be dealt in a separate patch with.
Reviewed-by: Erik Schilling
|
|
It simply does the same thing, in better.
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
|
|
The tA beingmanager was wrongly using the attack type
in the Being::handleAttack() function,
which is in fact used to set the attack id.
Thus, breaking the attack id given
and all its attack parameters.
I noticed that while updating the client data for TMW.
Reviewed-by: Thorbjørn Lindeijer
|
|
I also change the serverInfo to use a deque to permit
the use of the push_front function.
Spotted and reviewed-by: Erik Schilling
|
|
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Bjorn.
|
|
Makes it easier to see what was added during a conversation.
Reviewed-by: Yohann Ferreira
|
|
They are apparently no longer being used.
Reviewed-by: Erik Schilling
|
|
In my opinion, the code is clearer when using aggregation. For performance
it makes no difference.
This also fixes a memory leak in CompountSprite::clear, which forgot to
delete any existing sprites.
Reviewed-by: Erik Schilling
|
|
Really only the trade handler is concerned about whether the player is
currently in a trade or not.
Reviewed-by: Erik Schilling
|
|
Previously it was interfering with the 'switch character' functionality.
Reviewed-by: Erik Schilling
|
|
A wrong (and duplicate) default entry for the 'onlineServerList' option
for branding files was causing it to malfunction. The problem only
showed up after the initialization of defaults was changed in commit
b856e8b47ab2dfd393e3c2720c5647eb66393931. Before that, branding config
file defaults were not being set when no branding file was used.
Reviewed-by: Yohann Ferreira
|
|
- Renamed mLastTarget to mLastTargetTime, and mLastAction to mLastActionTime
to clarify their use.
- NULL -> 0.
- Removed the unused mLocalWalkTime member.
+ Change requested by bjorn.
Reviewed-by: Thorjørn Lindeijer
|
|
Reviewed-by: 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
|
|
Makes sure that the client starts up again in the same size.
Reviewed-by: Erik Schilling
|
|
This happened when an NPC, monster or item couldn't be found and it had
to fall back on Being::Unknown. This instance was bugged since it had a
0 pointer in its sprites list, because when the Being::Unknown was
created, the SpriteDef::Empty was not initialized yet (since both were
global static variables, the initialization order was not well
defined).
Fixed it by removing SpriteDef::Empty and instead creating it in the
BeingInfo constructor. I've also changed the SpriteReference instances
to be inline values rather than instances on the heap, since they're
quite small. That also fixed a leak since those instances were never
getting deleted.
Reviewed-by: Yohann Ferreira
|
|
Use Mix_LoadMUS_RW to stream music files directly from PhysFS. I kept
around ResourceManager:copyFile for now, since it may have other uses.
Also cleaned up some initialization of configuration defaults.
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: Yohann Ferreira
|
|
This avoids the creation of a temporary buffer containing a complete
file for the sole purpose of wrapping it up in an SDL_RWops.
The necessary wrapper is by Ryan C. Gordon and is included in the
PhysFS repository under 'extras'.
Reviewed-by: Yohann Ferreira
|
|
+ Fixes from Bjorns review.
Reviewed-by: Bjorn.
|
|
Window positions are semi-smartly corrected as a result of the resize.
Not supported when using OpenGL on Windows for now.
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: Bertram.
|
|
- Added support for senders of announcement
Reviewed-by: Bjorn.
|
|
Also made it remember its size and position.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Bjorn.
|
|
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 can always happen, either due to mismatching local data or a
server-side error. The client displays a pop-up in this case, but
it's not possible to read that when it crashes as well.
Reviewed-by: Yohann Ferreira
|
|
By taking into account that the sprite is drawn half a tile lower than
the position of the being (that is messy on its own, but hard to fix
while supporting both pixel and tile based movement).
It also makes sure that the click area is at least 32x32 pixels, no
matter how small the being. This fixes the lack of a clickable area
for NPCs without a sprite (like some chests or signs) and makes
small monsters like maggots easier to hit.
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
|
|
The patch also takes care of not spamming the different servers,
when the servers are setting the being speed correctly.
The most problems were coming from the keyboard movement functions
handling 1 tile paths. To void the issues seen in #405, #439,
and #440, I simply prevented to set a new path before reaching
the destination of the former one, when using the keyboard.
The mouse path system remains unchanged.
I also made some functions private (or here protected)
to show they shouldn't be called by something else than
the localplayer object.
And I removed the nextTile() function, since it was obsolete,
unused, and replaced by the nextTile(direction) function.
That patch was tested on both servers with mouse/keyboard
mixed use.
Resolves: Mana-Mantis #405, #439, #440.
Reviewed-by: bjorn
|
|
Reviewed-by: Thorbjørn Lindeijer
Reviewed-by: Yohann Ferreira
|
|
This fixes a segfault when trying to do /announce on manaserv servers.
Reviewed-by: Bertram, bjorn.
|
|
This was already done by ManaPlus. It's a good idea anyway and it makes
comparing the code a little easier.
Reviewed-by: Yohann Ferreira
|
|
Just to make everything a bit more readable on modern screen resolutions.
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: Thorbjørn Lindeijer
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: Bertram
|
|
Rather useful when selling items to quickly see what you have in abundance,
rather than only seeing the quantity of the selected item.
Reviewed-by: Yohann Ferreira
|
|
The XMLContext is only relevant while an XML file is being parsed. So
rather than allocating it on the heap and forgetting to delete it again,
it's now allocated on the stack and thrown away automatically.
Reviewed-by: Yohann Ferreira
|
|
The 'inflated' pointer wasn't initialized, but included in the if
check for some reason (caught by valgrind). This would have caused
support for .gz compressed maps to break sometimes, but since we
don't use such maps anymore, maybe support for it should actually
be dropped.
Reviewed-by: Yohann Ferreira
|
|
Also shortened the title of the Custom Server dialog to "Custom Server"
since it is also used for editing an existing custom server and not just
for adding a new one.
And used Window::center() in a bunch of places just to reduce code size.
Reviewed-by: Yohann Ferreira
|