summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-01-14Removed the auto-untargeting code for the local player.Yohann Ferreira1-8/+0
This was an annoyance in long lasting battles. Resolves: Mana-Mantis #445. Rewiewed-by: Ablu, bjorn
2012-01-10player_node -> local_playerYohann Ferreira1-4/+4
Reviewed-by: Ablu
2011-11-01Merge github.com:mana/manaYohann Ferreira1-5/+15
Conflicts: src/localplayer.cpp src/net/manaserv/beinghandler.cpp src/net/manaserv/charhandler.cpp
2011-09-30Fixed the negative XP notifications on levelups.Yohann Ferreira1-3/+20
This used to have an associated issue but I just can't find it anymore. Reviewed-by: Thorbjorn.
2011-09-29Fixed the player direction update when picking up an item using the mouse.Yohann Ferreira1-0/+1
This also happened when trying to reach a monster. I didn't fix the pick up once the destination is reached as the fix will be a little more complex.
2011-09-29Fix negative XP on levelups.Yohann Ferreira1-3/+10
This used to have an issue but i just can't find it anymore.
2011-09-13Made the delay between to keyboard move calls functional.Yohann Ferreira1-6/+9
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. Reviewed-by: o11c.
2011-09-05The draw order of particles is now Y - 16 pixels.unknown1-1/+1
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.
2011-09-02The draw order of particles is now Y - 16 pixels.unknown1-1/+1
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.
2011-08-11Made the delay between to keyboard move calls functional.Yohann Ferreira1-6/+9
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.
2011-06-22Applied fixes requested by cody.Yohann Ferreira1-4/+4
- Made the map teleport distance fixed for manaserv. - Small cleanups. The branch is considered reviewed by: Cody. Resolves Mana-Mantis: #74.
2011-06-17First pass on removing tile hard coded values.Yohann Ferreira1-48/+68
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.
2011-06-17Made the client officially handle attack ids.Yohann Ferreira1-2/+2
It already was, but now the the api is clear about it. Client part of the mana issue: #363. Reviewed-by: Bjorn.
2011-06-07Fix particle positionsJared Adams1-1/+1
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
2011-04-30Fix attack speed on both servers.Yohann Ferreira1-2/+9
Currently, we actually receive the local player attack speed in milliseconds for tA. Yet, we don't support receiving the attack speed for other beings, so the old behaviour will remain for them until someone adds that. As for Manaserv, we're only using the default speed atm. Most urgent part of mana-mantis: #343. Reviewed-by: Thorbjorn.
2011-04-30Use default values for pickup options.Yohann Ferreira1-3/+3
2011-04-26Made the client use a unique kind of movement code.Yohann Ferreira1-242/+117
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.
2011-04-16Fixed player movement desyncs on tile-based implementation.Yohann Ferreira1-2/+27
The new destination wasn't sent correctly since the destination was centered but checked pixel exact afterward. Now the destination check has been adapted for tile-wise implementation, leading to an almost desync free movement. Hurray!
2011-04-11Adjust action timer to something reasonableJared Adams1-2/+2
1 action per second was annoyingly slow. Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Yohann Ferreira
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-10/+10
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
2011-04-09Moved Channels to Mana::Event::ChannelThorbjørn Lindeijer1-7/+7
Acked-by: Jared Adams
2011-04-09Moved Events to Mana::Event::TypeThorbjørn Lindeijer1-3/+3
Acked-by: Jared Adams
2011-03-17Fixed pick up using keyboard for both servers.Yohann Ferreira1-2/+2
The character picks up one item at a time (to remain kinda realistic) and turns to the item picked up.
2011-03-17Simplified the get/setAttackRange() functions as requested.Yohann Ferreira1-30/+4
The attack range is still hardcoded for Manaserv as long as generic equipment handling hasn't been implemented.
2011-03-16Fixed the attack range handling for both servers.Yohann Ferreira1-19/+38
The attack range is always the default for manaserv, as proper equipment handling is to be added. Anyway, now the proper attack range is handled in tmwAthena and is always set a proper minimum for both protocols.
2011-03-15Basically merged the two movement algorithms into one.Yohann Ferreira1-222/+79
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!
2011-02-21Merge branch '0.5'Thorbjørn Lindeijer1-4/+27
Translation file updates ignored. Conflicts: src/client.cpp src/commandhandler.cpp src/gui/popupmenu.cpp src/localplayer.cpp
2011-02-19Showing amount of picked up items in particle notificationStefan Dombrowski1-1/+5
2011-02-17Specific messages for each pickup failure reason.Ben Longbons1-5/+18
Reviewed-by: Jaxad0127
2011-02-17Add particle notification for "Unable to pick up item."Ben Longbons1-0/+6
2011-01-24Refactored the item loading in a more extensible and per protocol way.Yohann Ferreira1-5/+9
This will greatly help into upgrading the need of each protocol separately. This is the first step to a new item and equipment system for manaserv. A subclassing of the EquipmentWindow will be done in the next commit, as requested by Thorbjorn. Reviewed-by: Thorbjorn.
2011-01-06Made the beings avoid changing direction at their path's end.Yohann Ferreira1-5/+6
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.
2010-12-28Revert "Remove the AFK response system"Yohann Ferreira1-1/+63
This reverts commit 3d6a2d9c80a969c3613f567dd7029e75ef59b5cb. I've by that readded the AFK system on master. Please, remove it when we've got a proper replacement.
2010-12-06Removed superfluous #includes taken from checkheaders list.Yohann Ferreira1-5/+0
Resolves: Mana-Mantis #265. Trivial fix.
2010-11-13Replace config listeners with the event systemChuck Miller1-10/+10
Reviewed-by: Jared Adams
2010-11-11Replace Event names with enums instead of stringsChuck Miller1-2/+2
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-5/+5
Reviewed-by: Freeyorp
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-7/+12
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
2010-10-31Using tile coordinates for pick-upStefan Dombrowski1-2/+2
Since the tile coordinates are already avaible the calculation is not needed. Furthermore this avoids the correction of the tile, which was needed because the pixel coordinates are meant as coordinates for drawing the being. This resolves http://bugs.manasource.org/view.php?id=249 Reviewed-by: Thorbjorn
2010-10-11Implementing show IP for game mastersStefan Dombrowski1-1/+2
As an upcoming feature the TMW-Athena server sends IP addresses or IP hashes to game masters. The current client freezes if it receives such a packet, therefor the game masters need to use a new client before the server can use it. Normal players are not affected, because they do not get this packet. Showing the IP is optional and can be enable with the chat command "/showip 1". The IP is then shown behind the players name. Reviewed-by: Bertram
2010-10-08Remove the following systemStefan Dombrowski1-2/+0
Removed due to unresolved social issues. In master it had been already removed by Kage in commit 89f192b9039f9c000515f0a12f4bb9fb55c4691c.
2010-10-08Fixing pick-upStefan Dombrowski1-2/+2
If the player wanted to pick up an item one tile up, then he moved to that tile before he picked it up. The same fix is already used in Game::handleInput() for KEY_PICKUP. TODO: Understand why the position is wrong. As a reminder I made a mantis ticket: http://bugs.manasource.org/view.php?id=249
2010-10-05Send the server changed player direction if it changes during attackStefan Dombrowski1-4/+7
Reviewed-by: Jaxad0127
2010-10-04Remove the AFK response systemChuck Miller1-64/+1
This would be if it was handled by a addon later. Reviewed-By: Freeyorp < Freeyorp101@hotmail.com >
2010-10-04Remove the following systemChuck Miller1-2/+0
The implamentation is poor, and this is something that would be better handled by the addon engine later down the road. Reviewed-By: Freeyorp < Freeyorp101@hotmail.com >
2010-08-16Move more to the event systemJared Adams1-11/+18
Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram
2010-08-12Simplify working with the event systemJared Adams1-1/+1
EventManager has been merged into Event, with some new convinience methods added. Reviewed-by: Chuck Miller
2010-08-05Have Being manage speech creation and add permissions to eventsJared Adams1-0/+2
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
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-2/+2
Reviewed-by: Yohann Ferreira
2010-08-02Remove non-GUI references to MiniStatusWindowJared Adams1-51/+0
Reviewed-by: Freeyorp