From 1d64b7a037435aee796f068770a0c2ca2b19a93a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 22 Jun 2005 12:42:35 +0000 Subject: Detect ghosts at creation time. --- src/engine.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/engine.cpp') diff --git a/src/engine.cpp b/src/engine.cpp index 69e4c04e..3d18f8ad 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -374,30 +374,8 @@ void Engine::draw() } // Draw a player - /** - * NOTES (by Javila): - * - I'm not sure if comparing if being->id is less then 110000000 - * will create colateral effects (missing some player), but I think - * this will avoid drawing ghosts too, since they have IDs greater - * then value above. - * - Also this high ID values are used for monsters and not for - * players!!! Maybe can there be some monsters in server using - * invalid monsterset's ID... This way server send the unknown - * monster to client and tmw is guessing that this is a player... - * Errors like this are (or at least were) found in mob_db when - * monsters dropped unknown items (invalid items IDs)... Ok, I - * did check on server scripts files (CVS) and haven't found these - * errors... Do anybody have an idea about this??? - */ - else if (being->job < 10) + else if (being->isPlayer()) { - // Don't draw ghosts!!! - if ((std::string(being->name).empty()) && (being != player_node)) - { - beingIterator++; - continue; - } - being->text_x = sx * 32 + get_x_offset(being) - offset_x; being->text_y = sy * 32 + get_y_offset(being) - offset_y; -- cgit v1.2.3-70-g09d2