summaryrefslogtreecommitdiff
path: root/src/being.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-02-24Some code cleanupsThorbjørn Lindeijer1-23/+12
Reviewed-by: Jared Adams
2010-02-23Sanitized ManaServ movement protocol, by mainly moving code from LocalPlayer ↵Bertram1-3/+61
to Being. This fixes some movement glitches under ManaServ and make the code much cleaner even if it's not perfect enough yet. First of all, many checks have been gathered in the Being::setDestination() calls. Also, now all path nodes including destination are checked against surrounding tiles to correct the path when necessary. The LocalPlayer::nextTile() still needs to be reviewed and some checks are missing but it's almost done :)
2010-02-21Handle packet 0x0195, and shows player's party name in a popupChuck Miller1-0/+11
2010-02-21Made tick counter and framerate limiter work during login sequenceThorbjørn Lindeijer1-2/+1
Much code was moved from main() to the new Client::exec(). This new event loop now integrates with the Game class, so that the tick counter and framerate limiter apply universally. The Client class is also responsible for some things that used to be global variables. Mantis-issue: ...
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-19Fixed a crash when trying to switch serversThorbjørn Lindeijer1-4/+4
Ownership of the charInfo global variable wasn't well defined. It was being locked, unlocked and generally modified from a lot of places, and somewhere in this mess it ended up crashing when switching servers. Now the CharHandler instances, for eAthena and manaserv respectively, own this list of characters. A new class, Net::Character wraps up the slot index in combination with the player dummy. The list is passed on to the CharSelectDialog each time it changes. Both related and unrelated cleanups were made as well. Reviewed-by: Jared Adams
2010-02-10Adds missile-particle attribute to items and monster attacksChuck Miller1-14/+22
To use simply add something like: missile-particle="graphics/particles/arrow.particle.xml" to the item's or monster's xml entry This will only work on equipped weapons, and on specified monster attacks. This patch also fixes a memory leak with target particles
2010-02-09Got rid of non-sensical Vector operator overloadsThorbjørn Lindeijer1-2/+4
Just because something is the kind of calculation that seems to be required does not mean it makes sense in general. Let's try to keep things understandable.
2010-02-09Got successfully rid of tile width/height fallback values as asked by Jaxad.Bertram1-9/+1
But I added some logs when speed and other actions where refused due to game/map uninitialized. This could help.
2010-02-09Separated fallback defaults for tile width and height.Bertram1-2/+5
2010-02-09Made the Beings' logic be able to handle any tile height/width.Bertram1-4/+18
This is the First step to get rid of most hardcoded 32 values.
2010-02-07Nicer way of indicating that we're waiting on the serverThorbjørn Lindeijer1-14/+12
No longer a dialog with an annoying progress bar (due to going back and forth), but rather a progress indicator that integrates better with the background.
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-02-07Renamed TakedDamage to DamageTakenThorbjørn Lindeijer1-3/+3
Sounds a bit better.
2010-02-01Small cleanups.Bertram1-2/+2
2010-02-01Reduced CPU consumption by setting speed per ticks value only once.Bertram1-7/+1
2010-01-31Unify eAthena and manaserv support in to one build.Daniel Bradshaw1-38/+30
Finish support for server types in the server dialog. Using the new server type function, strip out ifdefs, replacing them with if blocks for later merging in smaller atomic commits. Remove any remaining references to the support defs, including in build system.
2010-01-28Added virtual destructors, some implicit casts, and a couple of type changes.Daniel Bradshaw1-4/+4
Many warnings removed. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-01-25Simplify Being position a bitJared Adams1-21/+15
2010-01-24Remove some more _SUPPORT ifdefsJared Adams1-0/+1
2010-01-21No point in differentiating between int and Uint16Thorbjørn Lindeijer1-1/+1
2010-01-15Fixes drawing sprite in the playerbox widget.Chuck Miller1-0/+14
2010-01-10Change code styleAndrei Karas1-13/+23
2010-01-10Fix initialization order in Being and MapJared Adams1-2/+2
2010-01-10Show monster inflicted damage.Andrei Karas1-2/+27
Disabled by default.
2009-12-16Stored the cached config value which says if non-crucial particle effects ↵Philipp Sehmisch1-1/+0
are enabled or not in a static member of class Particle instead of an instanced member of Being.
2009-11-03Remove more _SUPPORT ifdefs and do some cleanupJared Adams1-1/+1
2009-10-29Second round of fine tuning for keyboard movement.Bertram1-4/+8
I just discovered that the X,Y offsets aren't handled the same way between eAthena and Manaserv to draw the player's character. So, this patch hopefully fix the walk on water bug. There are some glitches left: - Like walking diagonally to a blocked corner. - Or Some times the character miss a blocked tile and correct its route. - The character's name is drawn in the wrong place for Manaserv client. - The playerBox draws the player at the wrong location; He's not centered at login and isn't diplayed at all in equipment window... But anyway, it's better than before. I'll go on for some polishing before continuing. Some cleanups are becoming vital for code's understanding.
2009-10-29Mostly fixed the walk on water bug... But...Bertram1-3/+0
The current code tells that the character must stop in the middle of a tile when the tile to the north is blocking. But even now with respecting this, the player is still on water. So, what to do? Correct the water tile?
2009-10-24REplace instances of TMW with ManaJared Adams1-4/+4
2009-10-22Fix flipping player's direction when using keyboard to walk diagonally.Bertram1-1/+7
2009-10-21Commencing the keyboard walking fine-tune.Bertram1-1/+7
Also, fixed sit to stand action change.
2009-10-15Speed code unification part 3: Made the client handle the speed in tiles per ↵Bertram1-13/+29
second in TMWserv. While I was on it, I tweaked the default speed value to its final 6 tiles per second value, which seems to be nice to me. Another notice, the server does already send speed value to the player. The keyboard movement protocol is one step ahead Release Candidate, enjoy ;)
2009-10-09Mostly fixed keyboard movement on TMWserv.Bertram1-9/+24
- Making sure that keyboard and mouse are fully working on eAthena. - Making sure the mouse code isn't broken again. There are some glitches left but it's coming! What's left to be fixed: - Come a little closer to walls (localPlyer::nextStep() improvement to be done). - Adapt the next Step range according to the being speed. (again in nextStep()). - Handle more nicely player's direction when walking diagonally. - Get player's speed from server. Enjoy :)
2009-10-05Hide color codes from speech textAndrei Karas1-1/+2
2009-10-04Do some refactoring of Being codeJared Adams1-13/+5
2009-09-22Added support for the go-through-walls case with mouse movement on TMWserv.Bertram1-3/+1
Also removed an (now) unuseful debug piece of information. Thanks Kage for reporting this case.
2009-09-22Mostly fixed the mouse movement in TMWserv client.Bertram1-6/+6
The only case left in mouse movement is that the client doesn't check for walkability of the destination point when you click on a unwalkable point. Let me explain this NASTY bug: The bug remained in the Being::SetDestination() function, when recalculating the path from tiles to pixels. The changeX and changeY variables went crazy when (endX - startX) gave a negative value. That why the given path became random, and the player went anywhere. This didn't happened to monsters, NPCs, and when walking using the keyboard because the patnodes system isn't used for movement up to 1 tile at a time. I removed some dead code (in viewpoint.cpp), made the keyboard navigation a little bit more bearable, and fixed this client bug. Now, I'll be up to finish fixing the movement system using mouse (What's remaining is a joke next to what I had to do to discover this...), and I'll look at a third time to the keyboard system which is a bit raw, just for now... Regards, P.S.: Kage, I'd like to get a three-cheese pizza!
2009-09-17Partially (but mainly) resolved Mantis #753 by making monsters, NPC, and ↵Bertram1-0/+18
Floor Items visible even covered. Next Step would be to add a caching system for multi-layered sprites + copy functions for SDL and OpenGL. Then, I'll be able to finish this, by making also players visible when covered... But Kage asked me (each and every hour) to do something else first ;)
2009-08-13Clean up Being and it's derivativesJared Adams1-64/+83
Move stuff only needed for Players into Player (like slots and sprite limits). Move name handling into Being (no need for three copies of this code). Clean up terminology (including Map terminology). Remove hair-related variables.
2009-08-07Gettext fixesKess Vargavind1-1/+0
Trying to use the same kind of capitalization and interpunctuation for various parts of the gui, melding a few split strings, updating POTFILES.in and adding translators' notes.
2009-08-01Fixes pickup items on eA, also cleaned up some codeChuck Miller1-9/+6
2009-08-01Remove some unused movement methodsChuck Miller1-24/+8
2009-07-27Fix compile warnings from last commitJared Adams1-1/+1
2009-07-01Remove complex path finding for players. Add a simple path finding algorithm ↵Roderic Morris1-6/+14
to map.
2009-06-26Fixes the walk after death on TMWServ buildsChuck Miller1-33/+36
2009-06-23Made so monster particle effects show up on eAChuck Miller1-6/+2
I also removed Being::handleAttack() and Monster::handleAttack() for TMWserv since they are not used
2009-06-08Merge being direction handling codeJared Adams1-24/+2
2009-06-08Remove some unused variablesJared Adams1-2/+0