Protocol: | pserver | User: | anonymous |
Machine: | crossfire.cvs.sourceforge.net | CVSROOT: | /cvsroot/crossfire |
Filename: protocol | |||
Revision 1.21 | mwedel | 2006/09/07 01:25:30 | +2 -2 |
doc/Developers/protocol: Fix off by one on how many layers are currently defined. server/swap.c: When loading up temp maps, make sure timeout is set to 0 - fixes bug 1539203. MSW 2006-09-06 | |||
Show difference between Revision 1.20 and 1.21 | |||
Revision 1.20 | tchize | 2006/08/28 13:39:22 | +2 -2 |
Added media tags documentation | |||
Show difference between Revision 1.19 and 1.20 | |||
Revision 1.19 | mwedel | 2006/05/18 00:27:43 | +171 -78 |
This commit adds support for the map2 protocol command (10 layer map). This changes how the data is stored and sent to the client. This also implements the idea of client handling map animations, so adds some object flags so that the server knows if it should let the client handle animations or not. Support for the original map protocol command is removed. --- aclocal.m4: rebuilt configure.ac: Add checks for zlib.h, libz - not used right now, but will probably be used in the future, so no reason to remove it. common/loader.l: Add client_anim_sync, client_anim_random FLAGS. common/map.c: Add add_face_layer() to set face for a layer. Redo/simplify update_position to store faces away based on layering criteria. common/time.c: Replace long pticks with a uint32, since size of a long will vary, and we now send pticks to the client as a 32 bit value. crossedit/CrEdit.c: Update the draw logic based on the fact there are more layers now. crossedit/Edit.c: Comment out some code that probably should be fixed. Replace calls of SET_MAP_FACE with SET_MAP_FACE_OBJ doc/Developers/protocol: Updated with map2, tick protocol additions. Reorganize the parameters in the setup protocol command so they are now listed in alphabetical order. include/autoconf.h.in: Add HAVE_ZLIB_H define. include/define.h: Update for the FLAG_CLIENT_ANIM values. include/face.h: Remove MapLook structure - no longer used. include/global.h: change extern type for pticks from long to uint32 include/map.h: Change MAP_LAYERS to 10. Add definitions for what each map layer is. Remove GET/SET_MAP_FACE macro - no longer used, GET/SET_MAP_FACE_OBJ replaces it. Add GET_MAP_FACE_OBJS which returns pointer to all the object info for the space. Remove faces from MapSpace structure. include/newclient.h: Update with new defines used for map2 protocol command. include/newserver.h: Change type of faces in map_cell_struct to be uint16 to be consistent. Change 'count' to 'darkness' to more accurately describe what it represents. Add MAP2_COORD_OFFSET define. Add Map2Cmd to MapMode enum. Add map_scroll_x/y to socket structure so we send those as part of map2 command. Add tick field to socket structure to know if we should send tick data to the client. server/login.c: Remove extern long pticks declaration - declared in global.h - don't need to declare it again locally. socket/info.c: Rewrite magic map code to use GET_MAP_FACE_OBJ instead of GET_MAP_FACE macros. socket/init.c: Initialize new fields in socket structure to 0. socket/loop.c: If client wants tick data sent, send one each tick. socket/request.c: Add setup responses for tick, map2 requests. Remove some extra code in Map1a setup. Send error message to client if not using at least Map1 protocol level. Modify map_newmap_cmd() to clear scroll information when using Map2. Remove original (map0) protocol logic. Update map_clearcell() to clear all 10 layers. Replace MAX_LAYERS with MAP_LAYERS. Add add_head() to remove some of the complication from update_space(). Add code in draw_client_map1() to find which 3 layers to send to the client from the 10 we now have. Add map2_add_ob(), map2_delete_layer(), check_space_for_heads(), draw_client_map2() to handle map2 protocol. Add send_tick() - sends tick to client, but also forces flush of data to reduce lag. utils/config.guess.utils/config.sub,utils/ltmain.sh: rebuilt MSW 2006-05-15 | |||
Show difference between Revision 1.18 and 1.19 | |||
Revision 1.18 | akirschbaum | 2006/05/13 15:44:02 | +4 -4 |
Fix typo; add default value for facecache command. | |||
Show difference between Revision 1.17 and 1.18 | |||
Revision 1.17 | cavesomething | 2006/01/30 11:00:34 | +10 -3 |
prevent unlimited login attempts by dropping the connection after too many password failures. Document the itemcmd setup flag, and improve that for the item and item2 commands | |||
Show difference between Revision 1.16 and 1.17 | |||
Revision 1.16 | akirschbaum | 2006/01/13 14:59:30 | +3 -3 |
Fix mismatch 'client' and 'server' in darkness setup option. | |||
Show difference between Revision 1.15 and 1.16 | |||
Revision 1.15 | cavesomething | 2006/01/09 13:35:12 | +96 -2 |
spell listing support | |||
Show difference between Revision 1.14 and 1.15 | |||
Revision 1.14 | akirschbaum | 2005/08/31 16:53:08 | +15 -11 |
Fix bug #1102991 (Duplicate grapical display of the same monster): doc/Developers/protocol: Change semantics of map_scroll command to what the server actually does: big faces outside the viewable area are cleared. Add newmap command. include/newserver.h: Increase MAX_HEAD_OFFSET to 8 (the size of a Greater Demon). socket/request.c: MapRedrawCmd(): Disable mapredraw command; it is now just ignored. MapNewmapCmd(): Clear map state before sending newmap command. check_head(): Remove redundant code. update_space(): Move invariant condition out of loop to speed it up. Fix uninitialized variable. Remove redundant condition. Fix off-by-one array access. update_smooth(): Remove unused code. Properly send cleared big faces. draw_client_map(): Remove duplicate check. Properly clear newly visible area when scrolling the map. | |||
Show difference between Revision 1.13 and 1.14 | |||
Revision 1.13 | tchize | 2005/05/06 16:10:11 | +68 -3 |
added a new command to identify the type of text send to client. media tags can be included inside them. Those text types include scrolls, books, message of the day, signs, aso. See protocol doc for details | |||
Show difference between Revision 1.12 and 1.13 | |||
Revision 1.12 | ryo_saeba | 2004/09/12 07:52:11 | +1 -1 |
Various fixes for Win32, apply some tracker patches | |||
Show difference between Revision 1.11 and 1.12 | |||
Revision 1.11 | mwedel | 2004/06/01 01:22:47 | +80 -0 |
Commit note about proposed map2 protocol command. Figure might as well make it more readily available. MSW 2004-05-31 | |||
Show difference between Revision 1.10 and 1.11 | |||
Revision 1.10 | ryo_saeba | 2004/04/28 14:49:47 | +2 -0 |
Sync client version with server | |||
Show difference between Revision 1.9 and 1.10 | |||
Revision 1.9 | mwedel | 2003/09/13 00:01:31 | +42 -4 |
Updated code for skill + spell code. skills and spells are now objects. tuning these now means changing the archetypes. New spells can now be added just by making a new archetype. Lots of code cleanup also done. MSW 2003-09-12 | |||
Show difference between Revision 1.8 and 1.9 | |||
Revision 1.8 | tchize | 2003/07/08 07:45:04 | +9 -8 |
Changed the way smoothing is done. Switched th smooth command to binary mode, rebuild archetype files, added doc on smoothing, updated protocol file. Changed a the "togglemapextended smoothing" to "togglemapextended smooth" to prevent problem of compatibilities with previous cvs smoothing release. | |||
Show difference between Revision 1.7 and 1.8 | |||
Revision 1.7 | tchize | 2003/07/03 15:03:05 | +99 -0 |
Modified change logs and protocol documentation. Promised smoothing doc will follow as fast as possible | |||
Show difference between Revision 1.6 and 1.7 | |||
Revision 1.6 | mwedel | 2002/09/01 01:32:30 | +33 -33 |
This change mostly deals with improving behaviour of pet monstes. Most of the code is from K. Reinert - however, I did some code cleanup/ fixes related to pet monsters, so it is difficult to note where each piece of code came from. One thing this does fix is handling of multipart pets - these now work properly. common/map.c: Update comment for get_rangevector() - no code change. common/object.c: Add get_search_arr() which is used in pet monster code. This returns a semi random scrambling of the freearr array. doc/Developers/protocol: Update documentation about map1a protocol command. include/libproto.h, include/sproto.h: rebuilt. server/attack.c: Have drain attacks return 1 damage so that it is clear that you are actually hitting your opponent. Otherwise, you would get messages that 'you missed xyz', even though you are draining it. This extra point of damage shouldn't change balance in any significant way. server/monster.c: Update hnadling of enemies for pet monsters. It should more intelligently choose the monsters and not switch/clear the enemy field for no reason anymore. Change find_nearest_living_creature to use the get_search_arr() to more randomly choose direction of target - before, there was a proclivity to always look in the north direction. Modify can_hit() to look for closes part of enemy - otherwise, monsters may not attack opponents even if they were right next to them because they couldn't get to the enemies head. Remove move_object from this function - merged with move_ob in move.c server/move.c: Fix move_ob to use 'cleaner' code of move_object, but also have specific features that move_ob had (player handling). Before move_ob didn't handle multipart objects correctly, and the two functions were largely the same. Now move_object() just calls move_ob - the only difference in the functions is that move_ob() takes 3 parameters instead of 2 of move_object() (added parameter is originator). I think this should now mean multipart player objects may now work. server/pets.c: get_pet_enemy enhanced to be much smarter about selecting/finding things for the pet to attack. server/player.c: Remove commented out line of init_beforeplay MSW 2002-08-31 | |||
Show difference between Revision 1.5 and 1.6 | |||
Revision 1.5 | mwedel | 2002/05/30 23:18:33 | +16 -10 |
Main change is the addition of name_pl and client_type to object structure. The name_pl contains the proper plural name instance - fixes problem of '2 tooths'. client_type is sent to the client so that client doesn't need to figure out sorting on its own. Client_type is an object attribute, so can be modified in maps to hide the real type. -- common/arch.c: item_matched_string() modified to use the name_pl field when trying to match names, and not to try to make the name plural itself. common/item.c: query_short_name(),query_base_name() modified to use name_pl instead of trying to make the name plural. common/loader.c, common/loader.l: Add code to load and save the name_pl value and client_type. Add logic when object is finished loading to set name_pl value to same as name or arch name if no name_pl is specified - this supports old maps/characters in which the objects dont have a name_pl field yet. Disable logic for need_an and need_ie flags since they are no longer needed. Fix bug that caused elevation not to get saved. common/object.c: Add client_type check for CAN_MERGE function. Add appropriate logice in functions to handle setting, clearing, and copying of name_pl values. Remove unused anim_... fields initialization. doc/Developers/objects: Add information about the name_pl field and client_type. doc/Developers/protocol: Remove item protocol command info - it has been obsoleted. Add information about item2 protocol command. include/define.h: Remote ST1_* values - they were not being used. comment out FLAG_AN and FLAG_NEED_IE values. include/newserver.h: Add itemcmd to socket structure - this is the version of the item protocol command that will be sent to the client. include/object.h: Add name_pl and client_type field to object structure. Remove unused anim_* values. lib/archetypes: rebuilt with new archetypes that contain client_type and name_pl information. lib/bmaps, lib/bmaps.paths, lib/crossfire.1, lib/crossfire.0, lib/faces: rebuilt. server/monster.c: Remove anim_ references that were not being used. socket/init.c: Initialize itemcmd version in the socket to 1. socket/item.c: Remove special handling for clients of old versions - all clients now have to be at least sc_version 1024 (which has been around for a long time). This simplifies a lot of the object code that deals with sending or not sending plural names to the client - now always send them. Change code that sends item to client to use the item revision (currently 1 or 2) that the client wants. If version 2, send along client_type information. socket/request.c: Handle 'itemcmd' parameter in setup command. Make sure it is in proper range. If client is very old (sc_version < 1024) tell them so. MSW 2002-05-30 | |||
Show difference between Revision 1.4 and 1.5 | |||
Revision 1.4 | mwedel | 2002/05/18 22:55:48 | +55 -89 |
The bulk of this commit is to modify the server to only send the lower rightmost part of multipart archetypes that use the same head. This allows support of big images in the client. common/arch.c: Modify first_arch_pass to figure out the tail_x/y values for multipart archs. Rename the prev variable to head, as that it really what it is. Remove quick_pos info. common/object.c: remove quick_pos info from object. doc/Developers/images: Add notes about using merged images. doc/Developers/protocol: Add information about the map1a command, which is used to for big image support. Remove map2 documentation. include/map.h: Add MAP_LAYERS define instead of using hardcoded value of 3. include/newserver.h: Change the MapCell to use MAP_LAYERS - saves considerable memory. Add defines for MAX_CLIENT_ map sizes. Remove map1cmd, map2cmd elements from socket structure - instead use enumeration of mapmode - only one map type will be used at any time by the client, so no reason to have individual elements - it also makes it easier to add new mapmode commands. include/object.h: remove quick_pos, update_tag from object structure. Add tail_x, tail_y values to archetype structure. include/player.h: Remove some now unused values from the player structure (drawn, floor, floor2, darkmask). These have been superseded by the map cells in the socket structure for quite a while. include/sockproto.h: rebuilt server/player.c: Remove code that initialized the drawn values in the player structure since they no longer exist. socket/init.c: Replace map1cmd, map2cmd elements in socket structure with mapmode element. Modify init_ericserver so that it properly passes an int when setting the SO_REUSERADDR field. socket/request.c: Modify code in SetUp function to use the new mapmode enumeration in the socket structure. Add support for map1acmd setup option. Throughout map code, replace MAXMAPCELLFACES with MAP_LAYERS. modify map_clearcell to take options for values to clear the cell to. Add have_head, check_head, and update_space commands - used with the map1 command to store and find head information. draw_client_map1 modified to support map1a extensions, as well as added logic for checking for heads in blocked and out of viewable map spaces. Some of the code is simplified by using the update_space function, since the logic for processing each layer was otherwise the same. remove draw_client_map2 function. esrv_map_scroll has same logic - some variables and code formatting changes. MSW 2002-05-18 | |||
Show difference between Revision 1.3 and 1.4 | |||
Revision 1.3 | mwedel | 2002/04/28 19:18:41 | +88 -0 |
doc/Developers/protocol: Add documentation about the map2 protocol command. socket/request.c: Fix bad indentation for the map2 function. No actual functional code changes, but some comments updated. Running diff with the -w option will make the changes, or lack thereof, more viewable. MSW 2002-04-28 | |||
Show difference between Revision 1.2 and 1.3 | |||
Revision 1.2 | mwedel | 2002/03/26 01:18:57 | +139 -2 |
Update to improve image caching and faceset support in the client. The main change is adding the 'requestinfo image_info' and 'requestinfo image_sums' commands. common/image.c: Checksum the bmaps file when we load it - we send this as part of the image_info data. doc/Developers/protocol: Document the requestinfo data. include/global.h: Add extern for bmaps_checksum, and the define for ROTATE_RIGHT which is used for checksumming. include/newserver.h: Update SC version to 1027 so that clients can know if they can issue requestinfo commands. include/sockproto.h: rebuilt lib/adm/collect_images.pl: Add support for it to make a crossfire-images distribution that the client can use to bootstrap its image set. socket/image.c: Change SendFaceCmd to take a NewSocket parameter instead of a player parameter - in this way, it can be used before the AddMe command - this allows the client to download images before issuing that command. Add send_image_info and send_image_sums function which send the requestinfo data to the client. socket/loop.c: Move the askface command from the player commands to the newsocket commands. Add RequestInfo functino that determines the type of request and calls the specific function to deal with it. MSW 2002-03-25 | |||
Show difference between Revision 1.1 and 1.2 | |||
Revision 1.1 | mwedel | 2002/01/14 01:56:02 | None |
Make a seperate 'Developers' subdirectory in doc, and put relevant developer files in that directory. This should hopefully make it a bit easier to find information for both players and developers. MSW 2001-01-14 | |||
First version |