summaryrefslogtreecommitdiff
path: root/src/being.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-04-30Added customizable on-hit effects for characters.Yohann Ferreira1-4/+18
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
2011-04-26Made the client use a unique kind of movement code.Yohann Ferreira1-206/+162
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-16Made the attackers look at their victims when possible.Yohann Ferreira1-0/+3
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.
2011-04-16Introduced the Being::lookAt() function.Yohann Ferreira1-0/+80
We're now using it when picking up items. Also, de-overnested the Game::handleInput() function when handling pickups.
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-9/+9
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-5/+5
Acked-by: Jared Adams
2011-04-09Moved Events to Mana::Event::TypeThorbjørn Lindeijer1-2/+3
Acked-by: Jared Adams
2011-03-28Random cleanups - Part 2Yohann Ferreira1-1/+1
- 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()
2011-03-28Random code cleanups requested righteously by Thorbjorn - part 1.Yohann Ferreira1-1/+1
- 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.
2011-03-17Fixed the Being::logic() once again as pointed out by Thorbjorn.Yohann Ferreira1-3/+3
Luckily or not, the code did the intended without even being right. :)
2011-03-17Now the client centers the pixel positions when using tA.Yohann Ferreira1-8/+24
I made it so that the behaviour can be changed with only a boolean setting in the playerhandler.
2011-03-16Fixed the bug with remote player movement animation,Yohann Ferreira1-1/+1
by removing a now useless reset in the beinghandler. Also added checks for flawed directions.
2011-03-15Adapted the Being::logic() to handle very slow beings.Yohann Ferreira1-4/+6
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.
2011-03-15Made the tA Beinghandler avoid dealing with flawed coordinates.Yohann Ferreira1-3/+3
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..
2011-03-15Fixed a small condition.Yohann Ferreira1-1/+1
Should be invisible on behaviour change.
2011-03-15Add a tolerance check on current position to limit desyncs.Yohann Ferreira1-4/+0
Also removed dead code.
2011-03-15Basically merged the two movement algorithms into one.Yohann Ferreira1-195/+54
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-01-11Added a distance based positional sfx sound system. Thanks to 4144.Yohann Ferreira1-3/+14
Based on: http://gitorious.org/manaplus/manaplus/commit/ef7f53e43ce4306080efae3b86443a6016a3e66a Resolves: TMW-Mantis #536 Reviewed-by: 4144.
2011-01-06Made the beings avoid changing direction at their path's end.Yohann Ferreira1-21/+40
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-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-12/+10
Reviewed-by: Jared Adams
2010-11-12Change NPC handling in the net codeChuck Miller1-3/+2
Instead of using events to invoke netcode, invoke netcode directly and have it send events Reviewed-by: Freeyorp
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-4/+4
Reviewed-by: Freeyorp
2010-11-07Convert the emote system to use particlesChuck Miller1-21/+0
Reviewed-by: Jared Adams
2010-11-02Add missing variable initialisation in Being.Andrei Karas1-1/+2
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-23/+52
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-17Added death effects to particle engine.Philipp Sehmisch1-4/+5
Every particle can now have a death effect. This is an effect which is created when the particle dies. Which death reasons (timeout, touching floor, touching sky, reaching target or deleted by external call) trigger the effect can also be specified. This is useful for exploding projectiles and many other effects. Reviewed-by: Bertram
2010-10-17Add new three colors.Andrei Karas1-3/+20
Add colors: Local Player Hits Monster Local Player Critical Hit Local Player Miss Reviewed-by: cody
2010-10-16Fixing wrong SpriteDirection of attacking monstersStefan Dombrowski1-10/+8
Reviewed-by: Bertram
2010-10-11Implementing show IP for game mastersStefan Dombrowski1-3/+8
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-08-26Merged testing branch into master.Yohann Ferreira1-4/+4
2010-08-12Simplify working with the event systemJared Adams1-2/+2
EventManager has been merged into Event, with some new convinience methods added. Reviewed-by: Chuck Miller
2010-08-12Replace most of Net::NpcHandler with eventsJared Adams1-3/+4
Reviewed-by: Chuck Miller
2010-08-05Have Being manage speech creation and add permissions to eventsJared Adams1-0/+21
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-01Remove isActive methods from buy/sell windowsJared Adams1-12/+0
Uses a state variable in PlayerInfo instead. Moves isTalking from Being to PlayerInfo. Also some small cleanups. Reviewed-by: Chuck Miller
2010-07-30Fixed two more forgotten hard-coded references.Yohann Ferreira1-4/+3
2010-07-30Changed the FloatData class to store double instead of single floats.Yohann Ferreira1-2/+3
Also fixed a few compile warnings.
2010-07-29Changed the items loading to handle a new 'attack-action' parameter.Yohann Ferreira1-18/+22
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.
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-9/+9
Please note that I didn't turned all the getValue() call into new ones, simply because I have to have config object initiated which is not forcefully the case the branding file. Resolves: Manasource Mantis #170.
2010-07-28Changed mAttackType to mWeaponAttackType were appropriate.Yohann Ferreira1-1/+1
To avoid misunderstanding between the actual attackType and this one. (Trivial fix.)
2010-07-19Merge branch '1.0'Yohann Ferreira1-1/+2
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
2010-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-1/+2
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.
2010-06-12Prevent removing dead players by timer.Andrei Karas1-1/+4
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-06-10Merge BeingManager and FloorItemManager as ActorSpriteManagerJared Adams1-2/+2
No need for two different classes to manage ActorSprites. Reviewed-by: Chuck Miller
2010-06-09Fix dead Beings not being removed using tmwAthenaJared Adams1-8/+22
Rename mWalkTime to mActionTime in Being and have Being manage death. Reviewed-by: 4144
2010-06-09Remove hard-coded frame counts from Being classJared Adams1-69/+71
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
2010-05-24Show selected target with bold font.Andrei Karas1-3/+13
Also fix possible memory corruption. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-05-23Fix attack display for beings without an attack definedJared Adams1-7/+2
Reviewed-by: 4144