summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-02-18Merge commit 'aethyra/master'Bjørn Lindeijer1-1/+0
Conflicts: src/net/npchandler.cpp
2009-02-18Introduced a toLower method and grouped string utilsBjørn Lindeijer1-1/+1
The string utility methods are now grouped together in the stringutils.h header. Also, a toLower method was added for convenience.
2009-02-17Fixed an error reported by m0t1k4 which caused a segmentation fault onIra Rice1-1/+0
closing when displaying your own name is turned on. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-16Don't arbitrarily unset player target on NPC deletionBjørn Lindeijer1-5/+5
When an NPC got deleted it would reset the player target. I'm assuming what was meant was to reset the target when the deleted NPC was the target.
2009-02-16Don't arbitrarily unset player target on NPC deletionBjørn Lindeijer1-5/+5
When an NPC got deleted it would reset the player target. I'm assuming what was meant was to reset the target when the deleted NPC was the target.
2009-02-15Removed unnecessary parenthesis at constructorsBjørn Lindeijer1-2/+2
When not passing any parameters to constructors, there is no reason for using parenthesis.
2009-02-15Merge commit 'aethyra/master'Bjørn Lindeijer1-95/+56
Conflicts: CMakeLists.txt configure.ac data/help/header.txt packaging/windows/setup.nsi po/POTFILES.in src/being.cpp src/being.h src/game.cpp src/gui/color.cpp src/gui/color.h src/gui/equipmentwindow.h src/gui/popupmenu.cpp src/gui/recorder.cpp src/gui/setup_colors.h src/gui/setup_keyboard.cpp src/gui/setup_keyboard.h src/gui/skill.cpp src/gui/speechbubble.cpp src/gui/speechbubble.h src/gui/table.cpp src/keyboardconfig.cpp src/keyboardconfig.h src/localplayer.cpp src/main.cpp src/main.h src/map.cpp src/resources/colordb.cpp src/resources/colordb.h src/resources/emotedb.cpp src/resources/emotedb.h src/text.cpp src/text.h src/tmw.rc src/winver.h
2009-02-10Use string::empty() instead of comparing to ""Bjørn Lindeijer1-1/+2
2009-02-10Fixed header files, as well as removed the unused buddy list class (notIra Rice1-2/+3
useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-11Removed many pointless comparisons with NULLBjørn Lindeijer1-1/+1
Sometimes it's nice for clarity, but most of the time this is just clutter. C++ != Java. :)
2009-02-10Use string::empty() instead of comparing to ""Bjørn Lindeijer1-1/+2
2009-02-10Don't time out targets when attacking.Ira Rice1-1/+1
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-10Simplified target drawing so that it actually uses the SimpleAnimationIra Rice1-94/+55
that it creates when initializing the target cursors in the first place. This behavior was carried over in the first place from the Viewport class. Also moved target drawing responsibility from the map to the being being targeted in the first place. This allows for assuring that targets are always drawn below the sprite being targeted (which the previous solution was designed to do, but didn't do correctly). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-5/+5
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-02-09Merged with Aethyra master as of 2009-02-09Bjørn Lindeijer1-2/+7
Conflicts: A lot of files...
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-5/+5
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-02-09Merged with Aethyra master as of 2009-01-27Bjørn Lindeijer1-19/+222
Conflicts: Almost everywhere.
2009-02-07Some more include cleanups.Ira Rice1-2/+6
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-04Moved mEquipment to the LocalPlayer class, since it's the only placeIra Rice1-0/+1
that uses it anyways. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-24Tweaks to the speech bubbles so that being status (GM, mob, npc,Ira Rice1-0/+1
regular player) is displayed in the speech bubbles now. No need to view your own name to be able to see whether you're showing as a GM now. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-09Removed an unneccessary functionIra Rice1-8/+0
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09Added the ability to save GM assert state to the client, as requested.Ira Rice1-1/+2
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09Added the ability to see your own name in game.Ira Rice1-0/+44
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-04Code reformattingBjørn Lindeijer1-4/+1
Mainly making sure 'const std::string &' is used everywhere instead of 'std::string const &'. The former has always been the preferred order in this project. (cherry picked from mainline)
2008-12-09Only play status effect sound effects for localplayerFate1-0/+4
2008-12-07Added some initialization and removed ChargeDialogIra Rice1-2/+12
Many member variables of LocalPlayer were not being initialized properly. In general this shouldn't have caused any problems, but it's bad style. The ChargeDialog was removed. This class was long dead anyway. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl> Conflicts: src/Makefile.am src/game.cpp src/gui/chargedialog.cpp src/gui/chargedialog.h src/localplayer.cpp src/localplayer.h Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-07Merge commit 'a7c21e6f8add37af7412449742ec55c8daa8571a'Ira Rice1-2/+3
Conflicts: AUTHORS CMakeLists.txt ChangeLog INSTALL README aethyra.cbp configure.ac data/help/changes.txt data/help/commands.txt data/help/header.txt data/help/support.txt src/Makefile.am src/aethyra.rc src/being.cpp src/being.h src/equipment.cpp src/equipment.h src/floor_item.h src/game.cpp src/gui/buddywindow.cpp src/gui/char_select.cpp src/gui/char_server.cpp src/gui/chat.cpp src/gui/chat.h src/gui/equipmentwindow.cpp src/gui/equipmentwindow.h src/gui/gui.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/itemcontainer.h src/gui/minimap.cpp src/gui/ministatus.cpp src/gui/newskill.cpp src/gui/npc_text.cpp src/gui/npclistdialog.h src/gui/ok_dialog.cpp src/gui/setup_video.cpp src/gui/skill.cpp src/gui/skill.h src/gui/status.h src/gui/table_model.h src/gui/updatewindow.cpp src/gui/viewport.cpp src/inventory.cpp src/inventory.h src/keyboardconfig.cpp src/keyboardconfig.h src/localplayer.cpp src/localplayer.h src/logindata.h src/main.cpp src/map.cpp src/monster.cpp src/monster.h src/net/beinghandler.cpp src/net/beinghandler.h src/net/buysellhandler.cpp src/net/equipmenthandler.cpp src/net/loginhandler.cpp src/net/loginhandler.h src/net/network.h src/net/npchandler.cpp src/net/playerhandler.cpp src/net/protocol.h src/net/tradehandler.cpp src/npc.cpp src/npc.h src/particleemitter.cpp src/particleemitterprop.h src/player.cpp src/player.h src/player_relations.cpp src/resources/imageset.cpp src/resources/imageset.h src/resources/itemdb.cpp src/resources/mapreader.cpp src/resources/monsterinfo.h src/text.cpp src/text.h src/textmanager.cpp src/textmanager.h src/tileset.h src/utils/fastsqrt.h src/utils/strprintf.cpp src/winver.h tools/tmxcopy/Makefile tools/tmxcopy/base64.cpp tools/tmxcopy/base64.h tools/tmxcopy/tostring.h Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-07Added some initialization and removed ChargeDialogBjørn Lindeijer1-5/+12
Many member variables of LocalPlayer were not being initialized properly. In general this shouldn't have caused any problems, but it's bad style. The ChargeDialog was removed. This class was long dead anyway. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2008-12-07Added client-side status change handlers (text, icon, particle effect, audio).Fate1-0/+40
2008-11-29Imported patch that Fate made on TMW which which changes the item Ira Rice1-0/+1
container to guarantee that the inventory window always reports what the player has correctly, getting rid of the stale item references that could occur from time to time.
2008-11-28Eliminated silly C++ warningFate1-1/+1
2008-11-28Initialise mSkillPoint variable to avoid erroneous skill point displays ↵Fate1-0/+1
during game startup
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-5/+2
statements, as well as removing the new skill dialog, which we do not, nor will we use (if we do, it'd be a new one that we'd make). WARNING!!! This, and all other previous builds have a linker error for the Gnome libraries version 4.3.2 on my setup. It's assumed that this is also the case for other users of this library as well. I'm currently assuming that there's a bug in the compiler itself, and will look into reporting this, but in the mean time, it doesn't build for these users, unfortunately. Sorry about this.
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-11-06Ported a patch by Peavey on TMW to keep all item pointers inside of Ira Rice1-1/+1
inventory. For us, this should get rid of the arrow crashing bug, if it still exists (been a few weeks since I've heard of it happening now).
2008-11-06Have equipment tied into player inventory instead of keeping its own list of ↵Dennis Friis1-1/+1
pointers to items. This ensures the ressource is up-to-date and avoids crashes on stale item pointers.
2008-11-05Minor targeting fix (don't count attacking against target timeouts), as Ira Rice1-5/+6
well as only calling the target draw update code only when necessary.
2008-10-30Fixed a small targeting issue that arose from having uninitialized data Ira Rice1-10/+9
at the start.
2008-10-28Fixed a fast walking bug that was caused by a state conflict Ira Rice1-6/+0
where the keys would tell the client to attack and stop attacking all at the same time. Thanks to SoftLace for reporting it.
2008-10-28Changed the name of the old target key to stop attack, as well as making Ira Rice1-1/+7
it do exactly that in the local player. Since it already was doing this behavior anyways, I just extended it out to stop attack at any point in the attack.
2008-10-28Fixed attacking so that it will actually continue to attack in Ira Rice1-29/+43
succession like it's intended to if it's given a true keep flag, or just do one attack if that flag isn't set. Since most people seem to prefer to continue to attack when attacking, shift will be used for when someone only wants to hit the target once.
2008-10-27Revised code so that dead sprites are de-targeted.Ira Rice1-7/+14
2008-10-27Fixed mouse attacks and targeting.Ira Rice1-1/+5
2008-10-27Added the ability to turn off a target by targeting it again after being Ira Rice1-2/+9
targeted.
2008-10-27Made targets draw on the fringe layer, as well as added t for talking to Ira Rice1-3/+20
an NPC, n for targeting an NPC, and changed basic targeting code so that it'll time out after being on a target for longer than a minute.
2008-10-27Merged the Tametomo branch back into trunk. Targeting has been removed Ira Rice1-0/+99
from the viewport, and is now located on the beings themselves. Eventually, this will be changed further so that the targets draw below the being, instead of maintaining the same logic, but baby steps first.
2008-10-23Cleaned up ColorDB code so that it loads with all other databases, as Ira Rice1-1/+0
well as fixed color cycling.
2008-10-15De-hardcoded colors in trunk. Now, all colors are loaded from Ira Rice1-0/+1
colors.xml.