--- crossfire/socket ---


Protocol:pserver User:anonymous
Machine:crossfire.cvs.sourceforge.net CVSROOT:/cvsroot/crossfire

Filename: request.c
Revision 1.97mwedel 2006/09/04 02:21:05 +2 -8
Bulk of this change is updating some files to use draw_ext_info() - all
future code should use this, since there is no real reason not to and
it provides additional features. One notable change - reversed the
order of the new and old formats in draw_ext_info_format() - the
order was different than that of draw_ext_info(), which leads to confusion.
draw_ext_info_format() wasn't used in many places, so easier to change
that than all the draw_ext_info() calls. Only another 1200
new_draw_info calls left in the server.
--
doc/mediaTags: Fix some typos, clarify some behaviour (the way it works
now so that there will not be confusion in the future).
include/define.h: Remove MSG_ tags - moved to newclient.h
include/newclient.h: Synchronize with client version. Add MSG_ defines
include/newserver.h: Move some defines from here to newclient.h
server/apply.c: Reverse format parameters to draw_ext_info_format() calls.
server/c_misc.c: Rewrite to use draw_ext_info{_format} - this allows nice
formatting of tables, etc. Also general style cleanups, clarify some
messages. in help_topics(), don't do linewrap - let the client
handle it. remove bug_report() function - no longer used. Remove
explore_mode() - wasn't used. Move command_style_map_info() to
c_wiz.c since it is a wiz only command.
server/c_wiz.c: As per above, move command_style_map_info() to this file
since it is a wiz command.
server/player.c: Reverse format parameters to draw_ext_info_format() calls.
server/shop.c: Update to use draw_ext_info{_format} instead of new_draw_info()
socket/info.c: Reverse format parameters in draw_ext_info_format().
Update va_start() to use new last parameter. Remove call to
strip_media() if the client supports the tag - that should only be
used if the client does not support the tag.
socket/request.c: remove commented out MSG_TYPE values.
MSW 2006-09-03
Show difference between Revision 1.96 and 1.97
Revision 1.96ryo_saeba 2006/08/22 16:45:25 +8 -1
Fix for bug #1528636 (Invisible player disappears from map view)
Show difference between Revision 1.95 and 1.96
Revision 1.95ryo_saeba 2006/08/08 05:05:34 +4 -1
Feature request #821645 (change password command)
Show difference between Revision 1.94 and 1.95
Revision 1.94mwedel 2006/05/30 02:16:23 +9 -3
Various bug fixes, related to the new map display code.
common/loader.c, common/loader.l: Add map_layer attribute so object can
override what layer it should go on (fix for levitation boots).
common/map.c: Add support for map_layer to override layering. Fix bug
where if there were more objects than would fit on a layer, not all
would be drawn (same object was duplicated onto multiple layers).
common/object.c: Add check for ob->map_layer in can_merge()
include/map.h: Add extern declaration for map_layer_name[]
include/object.h: Add map_layer to object.
socket/request.c: In map1 compatibility mode, make sure we always
send the player.
MSW 2006-05-29
Show difference between Revision 1.93 and 1.94
Revision 1.93akirschbaum 2006/05/21 05:35:11 +39 -30
Make socket handling more robust.
Show difference between Revision 1.92 and 1.93
Revision 1.92akirschbaum 2006/05/21 05:07:13 +2 -2
Fix reference to undefined type name.
Show difference between Revision 1.91 and 1.92
Revision 1.91ryo_saeba 2006/05/20 07:36:48 +4 -2
Add a bot flag, to not count in metaserver information
Show difference between Revision 1.90 and 1.91
Revision 1.90mwedel 2006/05/18 00:27:44 +693 -361
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.89 and 1.90
Revision 1.89akirschbaum 2006/05/13 16:21:12 +8 -13
Fix server crash when sending addspell command(s).
Show difference between Revision 1.88 and 1.89
Revision 1.88ryo_saeba 2006/05/05 04:41:15 +2 -2
Second part of patch #1453869 courtesy Stefan Huehner (shuehner)
Show difference between Revision 1.87 and 1.88
Revision 1.87ryo_saeba 2006/03/18 09:05:37 +48 -46
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.86 and 1.87
Revision 1.86mwedel 2006/03/14 01:41:49 +42 -41
Fix bug/exploit in setup command. We were strcat'ing back data provided
by the client.
---
socket/request.c: Modify SetUp() to use safe_strcat() - eliminates buffer
overflow issues. Add some char* casts to spell/skill requestinfo
to eliminate compiler warnings. Add IP address to log for incoming
connections.
MSW 2006-03-13
Show difference between Revision 1.85 and 1.86
Revision 1.85cavesomething 2006/02/20 17:35:31 +2 -4
A better fix for sending the spell skill data
Show difference between Revision 1.84 and 1.85
Revision 1.84cavesomething 2006/02/20 12:43:24 +11 -8
fix crash when sending spell info if there no associated skill
Show difference between Revision 1.83 and 1.84
Revision 1.83akirschbaum 2006/02/10 17:59:28 +2 -2
Apply slightly modified patch #1428309 (code-cleanup: const, static) by
Stefan Huehner: add const/static to functions/variables. Remove some type
casts.
Show difference between Revision 1.82 and 1.83
Revision 1.82mwedel 2006/02/07 01:54:46 +12 -6
Code that adds transports. Transports are described more in detail in
docs/Developers/objects.
---
loader.l: Add new move type ('boat'). Update move_name field to be aware of
this type.
common/object.c: Unrelated to transport, but more apparant with transports -
fix bug with insert_ob_in_map() and multipart objects - we now only
try to fix up map and coordinates if the provided coordinates are
out of the map. Before, function would always use the passed
map for multipart objects, which is incorrect if we have already
set valid coordinates.
doc/Developers/objects: Update notes for TRANSPORTS. Update move
information to include MOVE_BOAT.
include/define.h: Add type TRANSPORT. Add MOVE_BOAT.
include/player.h: Add transport field to player structure.
include/sproto.h: rebuilt.
server/apply.c: Add code to handle applying of transports. Update
apply_below to apply transport if player is on one.
server/attack.c: Update hit_map() to look for transports, and hit any
players with the damage.
server/c_object.c: Update put_object_in_sack() to also handle TRANSPORTS
so that code can be re-used.
server/move.c: Fix handling of multipart objects in move_object() -
old code didn't work right with multipart objects moving along seams
of tiled maps. Add code to move_ob() to update player map position
for all players in a moving transport.
server/player.c: Update move_player_attack() too check of player is
in tranport, and use that for map and location information. Update
move_player() to handle speed related issues with transports.
server/time.c: Add code to credit time back to TRANSPORT objects since
we remove time in move_player() for TRANSPORTS.
socket/item.c: Add add_object_to_socklist() so that same code isn't
reproduced in 3 different places in the file. Update draw_look()
to handle transports - send transport object itself, then objects
in transport. Update esrv_send_inventory() and esrv_send_item()
to use add_object_to_socklist(). Update esrv_get_ob_from_count() to look
for objects in transport if player is in transport.
socket/loop.c: Remove checking of pl->map status, since draw_client_map()
does that, and we need to handle if the player is in a transport.
socket/request.c: Handle map drawing if player is in a transport.
MSW 2006-02-06
Show difference between Revision 1.81 and 1.82
Revision 1.81akirschbaum 2006/01/13 15:26:27 +2 -2
socket/request.c: In ReplyCmd() make sure the reply does not cause a buffer
overflow.
Show difference between Revision 1.80 and 1.81
Revision 1.80cavesomething 2006/01/13 14:42:02 +8 -4
fix a crash bug in addspell packet formation
Show difference between Revision 1.79 and 1.80
Revision 1.79mwedel 2006/01/13 01:10:43 +7 -3
Quick change to include proper byte counts in packet sizes for
spell - see if it will reduce the crashes.
MSW 2006-01-12
Show difference between Revision 1.78 and 1.79
Revision 1.78mwedel 2006/01/11 02:12:41 +3 -2
Make function ANSI C compliant.
MSW 2006-01-11
Show difference between Revision 1.77 and 1.78
Revision 1.77cavesomething 2006/01/09 13:35:13 +181 -3
spell listing support
Show difference between Revision 1.76 and 1.77
Revision 1.76akirschbaum 2006/01/08 15:02:06 +1 -7
include/newserver.h, socket/{init.c,request.c}: Remove unused fields ext2 and
ext_title_flag from NewSocket structure.
Show difference between Revision 1.75 and 1.76
Revision 1.75akirschbaum 2005/12/10 08:27:10 +3 -1
common/object.c, server/{pets.c,player.c,spell_attack.c,time.c},
socket/request.c: Properly check for P_OUT_OF_MAP after calling
get_map_flags().
Show difference between Revision 1.74 and 1.75
Revision 1.74akirschbaum 2005/10/28 14:08:53 +7 -2
Fix compiler warnings. Most changes do not change the program (remove unused
variables, convert "if(x = y)" into "x = y; if(x)"); a few actually fix
(possible) problems (fix uninitialized variables, fix printf format
specifiers, fix mismatches between signed and unsigned variables, add missing
return and default statements).
Show difference between Revision 1.73 and 1.74
Revision 1.73akirschbaum 2005/10/24 17:51:03 +1 -10
The archetypes now contain more than MAXFACENUM (5000) faces. The following
changes remove the fixed limit of the number of faces. The server now
allocates enough memory to handle all defined faces.
include/newserver.h: Remove MAXFACENUM since it is not used anymore. Change
NewSocket.faces_sent from array into pointer.
socket/{init.c, loop.c}: Allocate/initialize NewSocket.faces_sent.
socket/request.c: Remove safeguard/error message since it depends on
MAXFACENUM.
Show difference between Revision 1.72 and 1.73
Revision 1.72ryo_saeba 2005/10/01 11:36:35 +2 -2
Clean some compilation warnings.
Show difference between Revision 1.71 and 1.72
Revision 1.71akirschbaum 2005/08/31 16:53:09 +37 -32
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.70 and 1.71
Revision 1.70akirschbaum 2005/08/17 03:17:31 +2 -2
socket/request.c: Fix range checking of toggleextendedtext parameters.
Show difference between Revision 1.69 and 1.70
Revision 1.69tchize 2005/05/06 16:10:27 +54 -1

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.68 and 1.69
Revision 1.68mwedel 2005/03/28 01:20:10 +2 -2
socket/image.c: Change esrv_send_face to check for <=0 instead of <0 on face
number.
socket/request.c: Change if statement that acted improperly to determine when
to send faces.
MSW 2005-03-27
Show difference between Revision 1.67 and 1.68
Revision 1.67mwedel 2005/03/19 03:14:57 +53 -32
This change makes it so that the smoothing information is pushed to the client
(if the client is using smoothing) instead of a process were we tell the
client the smoothlevel and the client then has to request the face info for
smoothing. If we know the client wants the info, much easier to push it to
the client. This simplifies the client code (doesn't have to keep track
of what is requests). It also fixes the 'problem' that when you join the
game, you get a few frames with no smoothing and then the smoothing shows
up, which seems a bit odd. My testing shows that old clients that want
smoothing use this new logic withouth any problems.
--
common/image.c: add smooth_face default so that we don't have to look it
up everytime.
include/define.h: Add SMOOTH_FACE_NAME used by image.c
include/global.h: Add smooth_face extern declaration.
include/newserver.h: Update comment on what faces_sent is used for,
add NS_FACESENT_* values which determines what info for the face was
sent.
socket/image.c, socket/init.c, socket/item.c: Update faces_sent checks/set
to check against NS_FACESENT bitmask.
socket/request.c: Update faces_sent as mentioned above. And SendSmooth(),
rewrite AskSmooth() to use SendSmooth(). Modify update_smooth()
to send smoothing information to the client.
MSW 2005-03-19
Show difference between Revision 1.66 and 1.67
Revision 1.66akirschbaum 2005/03/06 14:38:56 +2 -2
common/{map.c, readable.c, treasure.c}, crossedit/Attr.c, server/{apply.c,
attack.c, c_wiz.c, init.c, monster.c, pets.c, shop.c, skill_util.c, skills.c,
spell_attack.c, spell_effect.c, time.c}, socket/{info.c, request.c}: Add
missing newline character to LOG() messages.
Show difference between Revision 1.65 and 1.66
Revision 1.65akirschbaum 2005/03/06 13:05:25 +2 -2
common/living.c, include/living.h: Change type of weight_limit to uint32.
socket/request.c: Remove non-portable assignment to rvalue.
Show difference between Revision 1.64 and 1.65
Revision 1.64mwedel 2005/01/24 01:29:26 +3 -2
common/object.c: Change CAN_MERGE() from an inline function, since
it calls itself and inline functions are not supposed to do that.
Update type check in insert_ob_in_map() to check against defined
type (EXIT) instead of hardcoded integer value (66).
crossedit/xutil.c: Update to just include Defines.h, which then includes
all the other necessary files, including global.h.
include/global.h: Add #ifdef checks for the UINT*_MAX types, as some
systems already define these values, which results in a redefinition
error. Also fix up // style comment.
include/shstr.h: Include proper cast in TOPBIT definition.
server/main.c: Don't display 'xyz left the game' messages if the player
is only at the get name or get password prompt. Prevents possible
spoofing of that message.
server/player.c: Clean up formatting of check_pick() function. If player
is using newpickup to pick up booze, also pick up poison unless
they know it is cursed.
socket/request.c: AskSmooth() - change buffer type to uint8 so that
it matches what the SockList structure wants.
utils/scores.pl.in: Use skill_praying to find players god, and not the
deprecated experience_wis object.
MSW 2005-01-23
Show difference between Revision 1.63 and 1.64
Revision 1.63akirschbaum 2004/06/13 12:30:39 +3 -1
common/object.c
include/define.h
include/player.h
include/sproto.h
server/attack.c
server/c_object.c
server/player.c
server/shop.c
socket/item.c
socket/loop.c
socket/request.c: Remove explicit calls to
esrv_update_item(UPD_WEIGHT, pl, pl) for player objects. Instead
send the new weight whenever it changes.
Show difference between Revision 1.62 and 1.63
Revision 1.62mwedel 2004/02/11 02:09:29 +5 -4
common/Makefile.am: Clean up proto - lex seems to toss some new symbols in
now days.
common/map.c, common/object.c, server/player.c, socket/item.c,
socket/request.c: change parameters of get_map_from_coord from int to
sint16, so the op->x,op->y can get passed directly in. Update callers of
this function.
lib/archetypes: Add damned 1 to the shop floors.
server/pets.c: Fix problem with big (multisquare) pets following the owner
across tiled map boundaries.
socket/item.c: Fix problem of players being able to see everything within
containers by just looking at them.
MSW 2004-02-10
Show difference between Revision 1.61 and 1.62
Revision 1.61mwedel 2004/02/10 01:14:25 +2 -2
Fix horrendous memory leak related to extended map info - wasn't
freeing data when it should have.
MSW 2004-02-09
Show difference between Revision 1.60 and 1.61
Revision 1.60tchize 2004/01/31 06:46:59 +15 -15

Ooops, last fix had c++ style comments, sorry, fixed
Show difference between Revision 1.59 and 1.60
Revision 1.59tchize 2004/01/31 06:10:52 +26 -27

Fixed a bandwidth consuption bug. One was in map1a command the other was
in mapextended command. Both having same reason: empty squares outside of
client visible area were sent with empty layer data. mapextended error
came from a cut and paste, simply deleted it. map1a error came from a
mischeck which considered 'nothing to send' the same as 'send all empty faces'.
Fixed
Show difference between Revision 1.58 and 1.59
Revision 1.58mwedel 2004/01/21 02:12:05 +17 -4
Fix for some map drawing anomalies, mostly related to fog of war.
MSW 2004-01-20
Show difference between Revision 1.57 and 1.58
Revision 1.57tchize 2004/01/20 08:52:52 +2 -2

Slight modification to smoothing code.

Now it's possible to desactivate the smoothing on a map adding

nosmooth 1

in map header. Some mapmaker asked for a 'special arch' which would
disable smoothing on a whole region of map. I think disabling for a whole
map is easier. Maps don't look crappy because of the special arch visibility
(think about no_spell). So no special arch, just about 4 additionnal lines
of code :P. No changes to protocol, so no change to client!
Show difference between Revision 1.56 and 1.57
Revision 1.56ryo_saeba 2003/12/14 10:28:47 +20 -18
Compilation warning cleaning
Show difference between Revision 1.55 and 1.56
Revision 1.55ryo_saeba 2003/12/02 12:51:44 +64 -41
Added & updated comments, now in doxygen-like style
Show difference between Revision 1.54 and 1.55
Revision 1.54mwedel 2003/11/30 23:45:18 +11 -1
server/rune.c: Fix it so that players won't be hit by traps if they are
not next to them when set off (firing arrows at a door for example).
server/spell_util.c: Fix spell_failure() to properly damage player if they
fumble. Fix cast_spell() to not complain about not having enough
grace if the spell doesn't take grace. Add same check for mana, but that
is much less likely, as harder to get negative mana.
socket/request.c: Fix problem where map sending code was not properly avoiding
duplicating the head of a big image on multiple layers. This bug most often
manifested itself of player standing on lower right corner of large building,
and something else standing on other portion of building - player would seem
to disappear.
MSW 2003-11-30
Show difference between Revision 1.53 and 1.54
Revision 1.53mwedel 2003/10/08 02:20:37 +63 -35
socket/request.c: Clean up some compile warnings. Improve big face
handling - there were cases where data wasn't being sent when
it should have, and vice versa. Basically, do better checking
to see if we should send a big face for a particular layer, and
also better checking to make sure we don't send the same face more
than once for the same layer. Also, change esrv_map_scroll()
to clear out spaces that appear into view - adds a little extra bandwdith,
but necessary because otherwise the fact there is a big face on the edge
doesn't always get sent.
MSW 2003-10-07
Show difference between Revision 1.52 and 1.53
Revision 1.52mwedel 2003/09/13 00:02:14 +55 -11
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.51 and 1.52
Revision 1.51tchize 2003/08/08 12:49:31 +8 -51

Comments cleanup in the FASTCAT saving code (long waited by mwedel i
suppose :P) and in the smoothing map1function
Show difference between Revision 1.50 and 1.51
Revision 1.50tchize 2003/07/08 07:45:28 +38 -138

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.49 and 1.50
Revision 1.49tchize 2003/06/19 05:59:33 +359 -10

Added support for smoothing to the client.
This will allow (i hope) better graphical results while using very
little bandwidth overhead.
Changes done follows:
- Added protocol command MapExtendedInfos and smooth commands to server
- Added a SetUp paramater in protocol for activating smoothing
(disabled by default) or more general Extended map infos
- Added file lib/smooth a text file containing some smoothing info a
client might ask the server about.
- Changed loader.l to be able to mark an object as 'smoothed' in
archetypes (the smoothlevel parameter) and rebuild loader.c
accordingly
- Changed lib/Makefile.am to install lib/smooth file in shared folder
- Rebuild the Makefiles.am and the Configure script (using autogen.sh)

To be able to smooth, A client commit (the common part+ the gtk part)
will follow and an archetypes commit will also follow.

I will also detail changes to the protocol within a few days
Server has been tested with older client to check backward compatibility
Show difference between Revision 1.48 and 1.49
Revision 1.48mwedel 2003/04/02 02:13:31 +11 -2
TODO: Various updates
aclocal.m4,configure: Update path to find python (fix again)
common/image.c: Minor update to a ocmment in the code.
common/los.c: Add missing P_OUT_OF_MAP checks that resulted in some incorrect
LOS calcuations.
include/funcpoint.h: Remove draw_func function pointer.
lib/Makefile.am, in: Remove bmaps.paths to from being installed or being part
of distribution - bmaps.paths is only needed when collecting the image
lib/*: Rebuilt
server/c_object.c: Patch by Bernd Edler to have the apply functions take into
acount if the item is equipped or not when looking for good matched items.
server/commands.c: Move printlos to normal commands. I don't think it reveals
any information that is in any way harmful. And since it dumps the
output to the players screen, no concern of it filling up log files.
Also, when doing LOS debugging, it is pointless to have it as a DM command
because LOS is ignored for DM's.
server/disease.c: Modify remove_symptoms to remove all symptoms the player
may have a disease. Modify infect_object() to not allow a creature to
have more than one instance of the same disease.
socket/info.c: remove draw() - instead, draw_client_map() can be used,
as that is most the only thing draw() did anyways.
socket/loop.c: Update draw() calls to draw_client_map()
socket/request.c: Remove special handling for darkness==4 cases (first
space that is in full darkness) - this is extra complications and causes
display problems. Update draw_client_map() to include the little bit
of logic that draw() had that this function did not have.
MSW 2003-04-01
Show difference between Revision 1.47 and 1.48
Revision 1.47mwedel 2003/03/19 02:04:51 +2 -6
common/anim.c: Pass direction to animate_object() - needed for player
animations as player's facing may not match direction.
crossedit/Attr.c, server/main.c, server/time.c: Update calls to animate_object()
include/libproto.h: rebuilt
include/newserver.h, plugin_animator/animator_box.c, socket/init.c,
socket/request.c: Remove newanim field from socket structure - not needed -
how to animate is determined by object, not by socket.
server/move.c: Add check to P_OUT_OF_MAP in teleport function.
server/player.c: change move_player to call animate_object, so it gets full
power of functionality it supports instead of 4 way hardcode animation
information.
server/spell_effect.c: When altars are consecrated, don't look to arch name
for first portion of name - always call them Altar of %s - fixes problem
where altar is special god altar that has god's name in archetype, resulting
in altar of .. of ...
MSW 2003-03-18
Show difference between Revision 1.46 and 1.47
Revision 1.46mwedel 2003/03/02 23:13:08 +13 -5
Various bug fixes.
Makefile.am, Makefile.in: Put crossedit as the last directory, so any build
errors for crossedit doesn't effect anything else.
README: Update ftp site listing.
TODO: More things aded.
aclocal.m4, configure: Add missing / when checking in /usr/local for
python headers.
common/map.c: Add some debugging in free_all_objects that checks to make sure
there are not objects remaining that belong to the map just freed -
only active if MANY_CORES is set.
random_maps/random_map.c: Increase minimum random map size to 10x10 - this
is need for square spirals to work properly I think.
server/spell_effect.c: Have perceive self tell dragon players what they are
currently focused on. Fix town portal to remove force objects from
players if destination is no longer available.
server/swap.c: Reset maps reset_time when loading them in in read_map_log() -
this is only used if recycle temp maps is on. Also, do sanity checking
on reset_time value - bogus values were observed on metalforge.
socket/request.c: Update map timeout in draw_client_map() - in this way,
we don't swap out a map within a players view only to swap it back
in.
MSW 2003-03-01
Show difference between Revision 1.45 and 1.46
Revision 1.45mwedel 2003/01/02 00:31:10 +2 -2
socket/request.c: Fix buffer (malloc) overrun in esrv_send_stats - more
stuff has gotten to be added, without ever increasing the size of the
buffer to hold it.
MSW 2003-01-01
Show difference between Revision 1.44 and 1.45
Revision 1.44mwedel 2002/10/03 02:07:44 +2 -2
Bugfixes: Add golem_count element to player structure so we can properly
detect when golem is destroyed. This fixes a crash in some places as the
code tried to remove this already removed golem.
Fix crash when null player maps.
include/player.h: Add golem_count element to player structure.
server/player.c: Add code in handle_newscs_player() that checks status of
golem, clears op->contr->golem is value is bogus
server/spell_effect.c, server/spell_util.c: Initialize golem_count
value when golem is created.
socket/request.c: Check for null map value.
MSW 2002-10-04
Show difference between Revision 1.43 and 1.44
Revision 1.43mwedel 2002/09/07 00:55:18 +2 -2
More bugfixes:
common/loader.l, loader.c: Fix up the handling with speed with respect
to style maps - the objects were still getting put on the active
list.
common/map.c: Fix up blocked_link() to behave more like the
blocked_two() function - inventory checkers and door handling.
Comment out blocked_two since it isn't used anymore. Modify
load_objects to remove objects on style maps from the active
list. Remove some of the debug messages about map loading.
common/object.c: Add remove_from_active_list() function for use
in map.c to remove objects from active list.
common/porting.c: Comment out debug message if open_and_uncompress()
can open a file - caller of the function should print out messages,
and it really isn't much of an error in any case.
include/libproto.h: rebuilt.
random_maps/special.c: Modify place_special_exit() - this should fix
bug of very large treasure maps - problem was if the generated map
size was too small, when generate_random_map was called, it would
generate a newly sized map that was much larger. Code was also
re-arranged some to make it a little more readable.
server/attack.c: Fix crash when creature may not have an owner and
it kills something else.
server/move.c: comment added - no code change.
socket/request.c: Fix off by one error in esrv_send_animation() -
rare condition as it only showed up when trying to send the last
animation (zombie) - only an issue if the player is put on top of
a zombie for some reason (no other space for them) - observed when
leaving the random dungeon in the undead church in scorn without
clearing out all the zombies first.
MSW 2002-09-06
Show difference between Revision 1.42 and 1.43
Revision 1.42mwedel 2002/07/25 01:57:14 +13 -3
Various bug fixes, add glyph spell:
TODO: Updated
common/map.c: Fix change_map_light() - if darkness was reduced to zero,
it wouldn't properly notify the players or update the maps they are
on. Also, make it more robust to handle changes by more than one.
include/define.h: Increase NROFREALSPELLS
include/spellist.h: Add glyph spell.
include/spells.h: Add SP_GLYPH entry.
server/attack.c: Fix up kill_object() - it has had some many various
additions that it was difficult to follow the logic. It should also now
do better check on skill objects when awarding experience.
server/player.c: Add some checks/addition to properly deal with freeing the
name_pl in the player object. Fix it so that if you are braced, you
still won't attack friendly creatures.
server/rune.c: Add cast_generic_rune() to handle the glyph and rune spell.
server/spell_effect.c: Fix up some pointers in cast_cause_disease() -
needed so that it works properly when embedded in a glyph. Have it
return 1 even if no one caught anything - you still cast the spell, so
you should lose the grace for it.
server/spell_util.c: Fix some formatting. Break out the code dealing
with rune into cast_generic_rune()
socket/loop.c: Add flag to player command mapping, and update structure -
if flag is set, command can only be issued when player is in play,
and not when waiting at the quit or login prompt - fixes crashes where
players could wait for the map to get swapped out (after quitting), and
then looking at a space.
socket/request.c: Fix map2cmd so that invisible players are drawn.
MSW 2002-07-24
Show difference between Revision 1.41 and 1.42
Revision 1.41mwedel 2002/07/14 23:57:13 +11 -41
-- Start body commit notes --
Major commit. This adds body locations which is used for equipping items.
Equipment has information which body part it gets equipped to, and monsters
have information on how which body locations they can have.

As part of this work, I also did a lot of code cleanup.

To use this, you must use up to date archetypes - the ones included
in this commit are fine - just make sure you install them. If
you don't, players will not be able to equip items.

common/arch.c: Initialize body_used to be same as body_info for
archetypes - this way when monsters are created, they can
start equipping items right away.
common/exp.c: update new_exp() - some flags it checked for before no longer
exist or have new names.
common/info.c: describe_item() now takes second parameter - update
dump_abilities to use new calling convention.
common/item.c: Add table that describes the body_info locations and
their names. Add functions that calculate item power for objects
that don't have it set. Update display functions to show
item_power in items. Update describe_monster() - use_horn/wand/rod
merged into just use_range. Modify describe_item() to take second
paramater - who the item is being described for. Show item_power
in describe_item.
common/living.c: Pull out MAXLEVEL from being defined in this file -
define in in define.h, since other files use it. Add NUM_STATS
define - replace hard coded values of having just 7 stats with it.
Update change_abil to not display that the player has a new
attacktype when equipping a bow that has it - fix_player() ignores
the attacktype of the bow, so it was incorrect information.
fix_player(): Initialize player ranges structure to null -
will get filled in by code in function, updated to deal with
updating the body_used data from body_info in the objects.
Replace instances of last_heal with gen_sp_armour. Rearrange
some code to make function more readable.
common/loader.c, common/loader.l: Remove the variable_const information - no
longer needed and confusing for new people when adding in new object
elements. Add set_body_info() - parses the string from the load file and
sets the appropriate array element. Add check_loaded_object() - does
sanity checking for an object after finished loading - replaces need for
long processing directive in the actual rules by having seperate function.
Remove unused flags from load directives (apply_once, no_pretext,
can_apply), add some new ones (item_power, gen_sp_armour), update others
to can_use_range. Replace flag_links with simple array that contains the
name for each corresponding flag. Update get_ob_diff to not use the V_
values and just include the actual string name - all recent changes have
done this, just updated for old stuff. Update get_ob_diff to save new
values that have been added.
common/object.c: clear_object: Modify to use memset to clear
the structure to zero - this is less error prone than listing
all the specific values, and probably faster. Also, makes it
easier to add new elements - no need to update object.c in most
cases.
common/player.c: Remove get_player_ob routine - this is now merged
in with get_player_ob in server/player.c. Remove generate_ext_title -
not used.
common/readable.c: Update to pass second argument to describe_item.
common/treasure.c: Update to calculate item_power of generated items.
Clean up a lot of code formatting. Update add_abilities
to use gen_sp_armour values, not last heal (note, it appears
the last_heal values weren't being used before). Update
calls to describe item to take second parameter.
doc/Developers/objects: Update will_apply notes, add note about
item_power, body location.
include/define.h: Comment out unused flags (flag_apply_once, flag_paralyzed,
flag_no_pretext, flag_ready_rod, flag_read_horn). Add flag_use_shield.
rename flag_use_wand to flag_use_range. rename flag_ready_wand to
flag_ready_range. Add flag_ready_scroll. Update ARMOUR_SPELLS access
macro. Add AP_PRINT flag to apply flags. Add CAN_APPLY_.. return types
for can_apply_object function.
include/includes.h: add strftime, mktime checks to this file.
include/libproto.h: rebuilt.
include/living.h: Add NUM_STATS define, update extern declarations
to use it for sizing.
include/loader.h: remove the V_.. info and xbm_.. externs that were not
used.
include/newserver.h: Remove ext_tile information.
include/object.h: Add Body_Locations structure, NUM_BODY_LOCATIONS define.
Add definitions for WILL_APPLY values. Clean up object structure -
formatting is now consistent, ordering of values groups values
together more logically. Update all types to use the int8/int16/int32
types. Several unused fields removed.
include/player.h: Update rangetype enum. Add unapplymode enum.
Clean up player structure - type updates, unused fields removed,
formatting fixed up.
include/spells.h: remove range_name extern. Update SpellTypeFrom
field to combine wand/rod/horn into spellMisc - none of the
spell casting code was differentiating these.
include/sproto.h: rebuilt.
lib/Makefile.in: Add new help files (applymode, bind, brace)
lib/archetypes: rebuilt for body_info, gen_sp_armour, item_power,
can_use_shield information.
lib/artifacts: updated for item_poer and gen_sp_armour changes.
lib/treasures: remove unused _force for player treasure.
plugin/plugin_python.c: Change FLAG_USE_WAND to FLAG_USE_RANGE.
server/apply.c: Move stftime, mktime to include/includes.h. Remove
draw_find() - one line function can just as easly be in the
code itself. Update calls to long_desc to pass second parameter.
move gravestone_text() to player.c file. Add direction parameter to
apply_scroll() - in this way monsters can use it properly.
Remove dead code. Update apply_special function. Add
unapply_special(), get_item_from_body_location(), unapply_for_ob(),
and can_apply_object() functions.
server/attack.c: Remove SET_FLAG(op, FLAG_PARALYZED) line - no code
was ever checking status of FLAG_PARALYZED.
server/c_misc.c: add command_body() which dumps body information for
player. Update who as idle element in player structure removed -
was not being used by anything. Add command_applymode() to
set players prefered unapply method. Remove calls to unlock_player()
in various functions - unlock_player() has not done anything
meaningful for a while.
server/c_object.c: Modify long_desc to take a second parameter
which is who is examing the object. this is needed so that we
can pass it down to some of the lower level functions.
Update calls to describe_item to pass this second parameter.
remove FLAG_NO_PRETEXT code - no archetyps were using it. When
examining objects, also tell player where to put them on.
server/c_range.c: Update legal_range() - we now store the object that
is responsible for a range in the player object, so code is
much simpler. Update change_spell() to not destroy golem
just by readying another spell - we now let players regain control
of golems after switching to another range. Update change_spell
to use item name of object for range description.
server/c_wiz.c: remove reference to count_left from player object -
field removed from structure.
server/commands.c: add new commands (applymode, body) to command dispatch
table.
server/login.c: Remove unlock_player() and lock_player() and calls to it -
current checking of names at login should be sufficient to
prevent duplicates. Remove dead code from check_name. Update
load/save code for unapply mode value. Add set_flag(op,
FLAG_USE_SHIELD) if player is allowed to use armor - needed since
flag_use_shield is really a class feature and so is not automatically
updated for old player files.
server/main.c: Remove references to count_left. memset marker object to
NULL - seems to increase stability on metalforge server.
server/monster.c: Many updates related to the body info - monsters follow some
rules as players. Add monster_should_cast_spell function - monsters will
use this for all spellcasting related actions (abilities, scrolls, wands,
etc). Update for merged rod/horn/wand ranges. Update bow use by monsters
- they don't actually need to equip it to fire - this way we don't need to
constantly swap the monsters weapons between the bow and melee item. Use
fire_bow from player.c for most of the work. Modify scroll usage -
monster will use it when player is near, not when it first picks it up.
Add FLAG_READY_SCROLL to denote the monster has a scroll to use. Also,
monster now casts it in appropriate direciton. Merge the
monster_use_wand/rod/horn into monster_use_range. Modify
check_good_weapon and check_good_armour to just look at the stats of the
two items without needing the monster to apply it first.
server/player.c: Print motd in green so it is more noticable. Update
get_player function to do work it did before as well as that of
get_player_ob. Have get_player take a parameter which is the object of
the player if he has one. Modify to use memset to clear the player
structure - more sure fire than explicitly listing values to initialize.
Remove calls to unlock_player. Modify fire_bow so that monsters can also
use the function. Add fire_misc_object() to fire_wand/rod/horn - removes
code from fire(). Add gravesetone_text() to this file.
server/shop.c: Update to pass second parameter to describe_item().
server/skill_util.c: Update check_skill_to_fire since there are fewer
rangetypes now. change range_scroll name to range_golem, as that is
a bit more accurate for what it actually does. Modify show_skills()
to show player his item power and total of items he has equipped.
server/skills.c: Add second paramater to long_desc, remove references to
count_left.
server/spell_effect.c: Add second paramater to long_desc, remove references to
count_left. Update range_scroll to range_golem
server/spell_util.c: remove references to count_left. Update messages
if player trying to cast where he can't with new range names.
socket/info.c: Update range information and how we display what it is -
we will use the object name of the range if available. Remove
reference last_known_spell, last_shoot, last_spell, last_value
player structure fields.
socket/init.c: Remove ext_title information.
socket/request.c: Add element for life_stealing in the resistance array.
Remove references to idle, count_left in player structure. remove
ext2 title information.
MSW 2002-07-14
-- End body commit notes --
Show difference between Revision 1.40 and 1.41
Revision 1.40mwedel 2002/07/01 18:04:10 +8 -3
socket/request.c: If players were using the original map command with
an even map size, server would try to send too much data to client -
checking in server would result in an abort. Modify code to now properly
send right number of spaces.
lib/Makefile.in: remove extraneous / in front of motd entry in file list.
include/version.h: Update for version 1.3.0
Makefile.in: Update for version 1.3.0
lib/archetypes: rebuilt.
MSW 2002-07-01
Show difference between Revision 1.39 and 1.40
Revision 1.39mwedel 2002/06/07 02:00:45 +12 -3
Mostly bugfixes. I'm not sure if this will fix the disappearing arch problem-
none of the changes made in the original multiple name would seem to
cause it, so hard to say if any of these changes may fix it.
--
common/arch.c: Change get_archetype_by_name to be more efficient and
not leak memory. Modify code that frees all archetype data to free
the name_pl information. Make sure the clone.name_pl is set to
NULL. When singularites are created, set the name_pl for them.
common/loader.l, common/loader.c: Modify code that fixes up name_pl
to be more correct when it fixes up name_pl for old objects.
common/map.c: Modify load_map_header so that tile_paths will be normalized -
need for editor to be able to load maps that have a multipart object
that spans the maps.
crossedit/Edit.c: Modify some calls of out_of_map to OUT_OF_REAL_MAP, since
tiling code really isn't fully in place for the editor. Modify
EditPerformFill so that it actually works and doesn't crash the editor.
include/global.h: Move FREE_AND_COPY macro from loader.l to here so that
all source code files can use it.
lib/adm/map_info: Modify to actually be able to examine just a sub
portion of the map directories, and not all of them. Don't always
show the unused objects - information isn't very interesting if only
a portion is being examined. Modify the exit examining code to properly
deal with random maps (if there is a finalmap component, make sure
that does exist.) Loade the bmaps file and not the faces file to
find valid faces.
plugin/plugin_python.c: Add missing %s that described what script
was actually loaded.
random_maps/special.c, server/alchemy.c, server/c_misc.c, server/gods.c,
server/login.c, server/player.c, server/spell_effect.c: Set up proper
name_pl value for code that changes the name of objects.
server/apply.c: Use FREE_AND_COPY to set up names. Set up proper
name_pl values for cases that change name. In apply_lighter, call fix_player
if player is lighting an object in his inventory - necessary for the
players glow_radius to get updated so the change actually takes effect.
socket/request.c: Modify esrv_map_scroll so that it properly clears cells
that are moving out of view - failure to do this was resulting in the
map1a updating these spaces with empty faces. This was causing
fog of war wackiness with the client.
MSW 2002-06-06
Show difference between Revision 1.38 and 1.39
Revision 1.38mwedel 2002/05/30 23:18:39 +20 -2
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.37 and 1.38
Revision 1.37mwedel 2002/05/19 22:11:50 +8 -5
crossedit/png.c, crossedit/xutil.c: Increase size of temporary buffers that
are used when loading images - necessary to allow the editor to run without
crashing.
include/newserver.h: Remove quick_pos from the MapCell structure.
server/main.c: Add code to set the coordinates to the EMERGENCY_X/Y
values if using the EMERGENCY_MAP.
socket/request.c: Fix code that was causing darkness to get repeatedly
sent for some spaces.
MSW 2002-05-19
Show difference between Revision 1.36 and 1.37
Revision 1.36mwedel 2002/05/19 00:47:43 +2 -1
Fix for last commit - the old map command caused the server to crash
because it apparantly packed in more layers. Increase MAP_LAYERS
by one in map.h, and just return on the buffer being full, don't
abort.
MSW 2002-05-18
Show difference between Revision 1.35 and 1.36
Revision 1.35mwedel 2002/05/18 22:55:48 +380 -358
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.34 and 1.35
Revision 1.34mwedel 2002/04/28 19:18:41 +105 -104
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.33 and 1.34
Revision 1.33mwedel 2001/12/31 02:36:04 +28 -119
This change lets the server have multiple image sets. The client
can then request which image set to use, and the server will use
that image set, falling back to other sets as necessary. I have tested
this with CVS client, and works fine at least in terms of old functionality.
=
doc/Makefile.in: Add images file which describes image guideline.
doc/Protocol: Various updates - some things missing, added other notes
about facesets.
doc/images: New file, describes guidelines for image sets, as well
as some of the internals
include/newserver.h: Update for multiple image set - redid most of the
image definitions as they were out of date with only png being supported.
include/sockproto.h: rebuilt
lib/Makefile.in: remove crossfire.png, add crossfire.0, crossfire.0. Update
build directions to use crossfire.0 instead of crossfire.png
lib/adm/collect_images.pl: Modified to collect all the image sets, remove
support for collect xpm and xbm images.
lib/crossfire.0: new file, base images
lib/crossfire.1: new file, alternate images
lib/image_info: New file, describes image sets.
lib/crossfire.png, lib/xpmtopix.pl.in: Removed - no longer needed.
socket/Makefile.in: add image.c file.
socket/image.c: Moved all image related data in this file - this includes
loading the image files, as well as the protocol commands.
socket/init.c: move read_client_images to image.c file. set ns->faceset
and ns->facecache to 0. Move freeing of image data to image.c
socket/request.c: fixed some indentation inconsistencies.add setup commands
for faceset as facecache. Move SetFaceMode,SendFaceCmd,esrv_send_face
to image.c file.
MSW 2001-12-31
Show difference between Revision 1.32 and 1.33
Revision 1.32mwedel 2001/12/23 02:17:36 +4 -20
common/loader.l, common/loader.c, common/object.c, include/object.h,
socket/item.c:
Remove sub_type and sub_type2 information -
these were poorly named fields and not properly implemented.
common/treasure.c: Add missing return type to change_treasure function.
crossedit/Edit.c: Add SET_MAP_FLAGS macro to set P_NEED_UPDATE flag
before calling update_position.
include/config.h: Add NEW_WORLD_MAP selection which results in proper
emergency save paths if you are using the maps-bigworld distribution.
server/c_wiz.c: Fix the formatting (indentation) of the command_create
function. No actual changes in how it runs, but the old
formatting was really terrible and inconsistent.
server/main.c: remove call to send_mapstats_cmd
server/monster.c: Update the comment style to be proper, as well
as the comments themselves.
socket/request.c: Fix up improper indentation in esrv_update_stats.
remove send_mapstats_cmd function.
MSW 2001-12-23
Show difference between Revision 1.31 and 1.32
Revision 1.31mwedel 2001/12/15 21:31:03 +2 -2
common/object.c random_maps/Makefile.in
server/c_wiz.c server/player.c server/plugins.c server/timers.c
socket/request.c: Most of the changes are to just fix compiling warnings
or errors so that it compiles on sparc solaris with the workshop
compiler (things like }; should just be }). Declaration for alphasort
was missing in plugins.c. random_maps/Makefile.in had the wrong order in
linking - the system library needs to be linked in after the crossfire
libraries.
crossedit/App.c: Fix for running on 8 bit color - colormap was not being
initialized to usuable default value.
crossedit/xutil.c: Broken code when duplicating faces for undefined
images. That code should never really be used, as pixmaps currently
are always contiguous.
MSW 2001-12-15
Show difference between Revision 1.30 and 1.31
Revision 1.30michtoen 2001/12/03 21:49:18 +17 -1
mapstats cmd for extended clients.
Add a cmd which sends mapstats for clients.
This use not the script events. Script events should
used for special scripted events.
Show difference between Revision 1.29 and 1.30
Revision 1.29mwedel 2001/12/03 01:51:46 +9 -30
This checkin for the most part removes support for xpm and xbm graphics -
now the only image supported is the png.
common/arch.c: comment out printing on warning of object having no type -
getting 300 meaningless messages at startup is annoying.
common/image.c: Remove X11 color information from colorname array. Remove
processing of color_fg and color_bg information from face file - only
use color_fg if no magicmap information is available - foreground
and background infoformation was only needed for bitmap graphics.
common/loader.c, loader.l: Add elevation element, comment out some logging
messages that are excessive and only really relevant for people
who want to fix them (really should be in the collect script
anyways). Remove some unused code.
common/map.c: add outdoor field to map structure - add support for loading
and saving it.
crossedit/App.c,crossedit/CrUtil.c, crossedit/Defines.h, crossedit/crossedit.c
crossedit/xutil.c: Remove support for non png graphics.
crossedit/Attr.c: Add support for elevation variable, remove code for non
png graphics.
doc/map-technical: Add note about outdoor field.
include/face.h: remove fg, bg fields from face struecture.
include/global.h: Update colorname array definition.
include/loader.h: Add V_ELEVATION field.
include/map.h: Add outdoor field to map structure.
include/newserver.h: Update types so it only loads/knows about png information.
include/object.h: Add elevation field to object structure.
lib/Makefile.in: Remove support for building crossfire.xpm and crossfire.xbm
files.
lib/animations, lib/archetypes, lib/bmaps, lib/bmaps.paths, lib/crossfire.png,
lib/faces: Rebuilt. Main difference is a few sea types, and the fact
that it hadn't been collected for a while.
server/spell_effect.c: Modify dimension door so that it calls MapNewmapCmd
so that fog of war does not get confused. Also, removes call to
draw as functions further up will do that.
server/spell_util.c: Remove color information from attack information that
shuffle_attack uses.
socket/init.c, socket/request.c: Remove support for non png images.
MSW 2001-12-02
Show difference between Revision 1.28 and 1.29
Revision 1.28michtoen 2001/11/19 17:30:28 +4 -4
Full support now for gender, rank and alignment.
Full support for guilds & quests in code, most script
functions included.

- some fixes
- old clients will not be effected
- to avoid treasure file error msg, collect arches
Show difference between Revision 1.27 and 1.28
Revision 1.27michtoen 2001/11/17 15:25:21 +50 -17
commit the ext2 gender & guild system - first part. Sorry, my cvs sytem is still broken, i will write a better doc to the list. Notice some other small fixes too.
Show difference between Revision 1.26 and 1.27
Revision 1.26gros 2001/11/11 03:39:54 +10 -2
Some bugfixes, new timer system, support for custom plugins commands, new plugin hooks - Gros 11/11/01
Show difference between Revision 1.25 and 1.26
Revision 1.25michtoen 2001/11/04 14:22:55 +261 -7
One Arch/one pic patch.

I use a modified map1cmd, called map2cmd
for it.

This is a first tryout implementation.
The code can more then only submit offset data
of multi arch, its also possible to include animation
tags for the faces - we have now more free flags.

The code is NOT optimized. Iam still unsure , what
the best way is to send all this data. Sort & parsing
cost time. At this stage, ill quick parse is by server,
use slightly more bandwitch and let do the client more
work. But thats perhaps not the best way.

But this code will allow to install the arches for this
one arch/one pic.

MT
Show difference between Revision 1.24 and 1.25
Revision 1.24michtoen 2001/10/29 20:30:20 +9 -9
Remove a bug, reset some modules
Show difference between Revision 1.23 and 1.24
Revision 1.23michtoen 2001/10/29 18:49:03 +10 -10
really SOME fixes - most casting
Show difference between Revision 1.22 and 1.23
Revision 1.22reeve 2001/08/29 10:50:28 +18 -15
Scott Barnes: Fixed some bugs in request.c that crashed the server.
Show difference between Revision 1.21 and 1.22
Revision 1.21smacfiggen 2001/07/22 13:48:47 +10 -1

Server side of the fog of war feature to the gtk client. Adds the
protocol command newmap and adds a call to MapNewmapCmd in enter_map()
in main.c. More additionals will need to be made, for example when
someone casts a teleport spell but teleports within the same map.
SMACFIGGEN
Show difference between Revision 1.20 and 1.21
Revision 1.20mwedel 2001/07/20 01:04:23 +5 -5
socket/request.c: Fix bug in map1 command which resulted in it sending
too much data with even maps. For example, if the client requested
a 16x16 map, the server would effectively send a 17x17 map to the client.
MSW 2001-07-19
Show difference between Revision 1.19 and 1.20
Revision 1.19mwedel 2001/07/15 23:38:15 +2 -2
Fix error in darkness handling for small mapsize - was doing
incorrect comparison. MSW 2001-07-15
Show difference between Revision 1.18 and 1.19
Revision 1.18mwedel 2001/07/13 23:12:01 +43 -20
Map tiling checkin.
socket/info.c: Modified to use new map structure/macros
socket/request.c: Modify draw_map_routines to use get_map_from_coord so
that it properly deals with tiled maps. Modified to deal
with potentially NULL face values. Modified update routine to
call update_position for spaces within player view which need an
update
MSW 2001-07-13
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2001/06/16 02:48:21 +57 -14
doc/Protocol: Add 'darkness' setup option documentation.
include/newserver.h: add darkness element to socket structure.
include/script.h,server/script.c: remove static declaration from script.h,
move it to script.c
socket/init.c: init darkness element in socket structure.
socket/request.c: Add support in setup command for client to set if it
wants darkness information or not. Modify map update functions such
that if the client does want darkness information, server does not
send it. Improve darkness handling so that if using the map1
protocol command, send darkness for first blocked space due to
darkness - this makes it possible for client to interpolate results
better.
MSW 2001-06-16
Show difference between Revision 1.16 and 1.17
Revision 1.16michtoen 2001/06/13 07:52:14 +8 -2
Modified Files:
player.c loader.l loader.c init.c request.c newserver.h
Log Message:
Removed 2 compiler warning from Scriptfire patch in loader.l/loader.c
and script.c.

added a new setup cmd: "newanim"
a client giving the newanim cmd, will enable the new animation system.

The interface is open and not server controlled at this moment.
First using is to enable the player moving in 8 direction. Giving this option to a
server without changed arch will invoke broken player animations.
This will be changed in the future.

MT 2001-06-13
Show difference between Revision 1.15 and 1.16
Revision 1.15mwedel 2001/06/11 23:29:44 +4 -11
common/item.c: Add boots and gloves to items which are not magical just
because they have resist physical. This bug resulted in most all boots
and gloves being shown as magical, even though they had no special
properties.
socket/request.c: remove some dead code. Memset entire map cell
to zero when scrolling and the map is cells is one that was not in
view. This fixes redraw problems when using large viewable maps.
MSW 2001-06-11
Show difference between Revision 1.14 and 1.15
Revision 1.14mwedel 2001/06/08 01:21:34 +9 -2
doc/Protocol: update information for the mapcmd, add map1cmd to
section of setup commands.
include/newserver.h,socket/init.c: add map1cmd element to socket structure that
determines which protocol (map,map1) will be used for sending the
map.
socket/request.c:add 'map1cmd' to list of setup options. when sending
the map, use the map1cmd element to determine what protocol command
to use to send it.
MSW 2001-06-07
Show difference between Revision 1.13 and 1.14
Revision 1.13mwedel 2001/06/04 01:41:02 +245 -47
Checkin of code that supports larger map sizes (configurable in
config.h).
common/los.c: update los code since it only handled 11x11 maps. Now
uses formulatic approach so any map size should be supported. This
does result in a few more spaces getting blocked around corners,
but it doesn't seem that bad - certainly not compared to the ability
to have larger viewable maps.
common/map.c, crossedit/CrEdit.c, crossedit/Edit.c, include/global.h,
include/map.h,random_maps/monster.c,random_maps/special.c,
random_maps/standalone.c, server/apply.c,server/c_misc.c,
server/spell_effect.c,socket/info.c:
change mapx,mapy to what they really point to,
as it prevented using those as variable/structure element names.
common/object.c: update_position - if faces for different layers are
duplicate, set the duplicates to be blank to increase client
update efficiency.
doc/Protocol: Add map1 command description, update setup command to
describe setting of mapsize.
include/config.h: add MAP_CLIENT_X/Y to set maximum map size we can
send to the client.
include/newserver.h: add mapx, mapy values to socket structure
include/player.h: Use MAP_CLIENT_X/Y for sizing arrays that hold
map related information in player structure.
server/player.c: As per player.h above, use appropriate sizing when
initializing player stucture.
server/shop.c: Update mapx,mapy like above, but re-do shop listings code as
it was doing a lot more work than necessarily (I think some changes
got put in for sorting, and the old object manipulation was never
removed when that got done)
socket/init.c: set default client map size to 11x11 in the socket.
socket/item.c: LookAt - change checks for position checking (such that
you can only look at things in bounds) use max viewable map size.
socket/request.c: Make setup commands a little more forgiving if there are
extra spaces. Add 'mapsize' command to setup command. Update
old map sending code to use socket map sizes (to support even
smaller than normal maps, or 13x13 or 15x15 maps). add draw_client_map1
command which implements the map1 protocol command.
MSW 2001-06-03
Show difference between Revision 1.12 and 1.13
Revision 1.12mwedel 2001/05/28 23:41:54 +82 -93
Make ALLOW_SKILLS standard part of game (remove #ifdef's for it)
Files affected: common/living.c common/object.c common/treasure.c
include/config.h include/player.h server/apply.c server/attack.c
server/c_move.c server/c_range.c server/c_wiz.c server/commands.c
server/init.c server/login.c server/monster.c server/player.c
server/rune.c server/skill_util.c server/spell_util.c
Make MULTIPLE_GODS standards part of game (remove #ifdefs for it)
Files affected: common/readable.c include/spellist.h include/config.h
server/attack.c server/gods.c server/skills.c server/spell_effect.c
server/spell_util.c
doc/Makefile.in, doc/Protocol: Add protocol description file here instead
of in the client distribution.
include/global.h: Move declaration of MAX_EXP_CAT near top of file
so it is set before player.h is included.
include/newclient.h: Add CS_STAT_SKILL* values for sending skill
experience information to client.
include/newserver.h: Add skillexp value to socket struct which determines
if client wants skill experience informatiion.
include/player.h: Add skill information tracking to player structure
so we can easily know when to send updates to client.
random_maps/expand2x.c: remove unused variable to prevent compiler warnings.
random_maps/square_spiral.c: Include prototype information on all systems,
not just win32 to prevent compiler warnings.
server/skill_util.c: Initialize skill pointers to make it easier to
find skill information when we want to update client.
socket/init.c: Init socket->skillexp to 0.
socket/loop.c: Fix indentation of table - whitespace change only
socket/metaserver.c: Minor fix to prevent compile warnings (on the sprintf
that composes the data to send to the metaserver)
socket/request.c: Redo SetUp function to be more compact and IMO simpler as
wll as easier to read (functionality remains the same).
VersionCmd modified to warn users of on dxclients (code on MT)
StatsCmd added to send skill information if client wants it.
The sending of skill experience is by MT, rest of the changes by me.
MSW 2001-05-28
Show difference between Revision 1.11 and 1.12
Revision 1.11mwedel 2001/04/09 01:59:46 +91 -125
Main thing this commit does:
Undo MT's last commit, which should not have been checked it at this time.
As that did not fix any bugs, it should wait until after 1.0 (at least
one file also fails to compile)
Fix minor bug in server/player.c which prevent keyring weight from
getting updated when keys are automatically used out of the rings.
move the GETTIMEOFDAY macro to include/global.h so it doesn't have to
be done in both arch.c and time.c
remove some ^M characters from porting.c
MSW 2001-04-08
Show difference between Revision 1.10 and 1.11
Revision 1.10michtoen 2001/04/08 19:57:04 +126 -92
Add skill exp / fix version warning msg
Show difference between Revision 1.9 and 1.10
Revision 1.9michtoen 2001/04/06 22:57:00 +84 -0
include setup cmd
Show difference between Revision 1.8 and 1.9
Revision 1.8michtoen 2001/04/06 14:08:18 +3 -3
win32: change // to /* */
Show difference between Revision 1.7 and 1.8
Revision 1.7michtoen 2001/04/05 19:44:04 +3 -1
*** empty log message ***
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2001/02/02 23:30:18 +9 -3
MSW 2001/02/02:
common/item.c: Don't have armour item types get returned as magical if they
have an armour value - that is to be expected. This eliminates the false
positives that you otherwise get on armor when you cast detect magic.
include/newserver/h: and checksum field to FaceInfo struct. Update
version_sc to 1026.
socket/init.c: calculate image checksums as we load the images.
socket/request.c: If client is at least version_Sc 1026, use face1 protocol
command that includes the checksum.
Show difference between Revision 1.5 and 1.6
Revision 1.5cvs 2000/12/03 18:40:06 +31 -3
Checking for partial resistance code. Various minor errors also fixed
(compiler warnings, unused variables, Makefile.in changes, etc).
PR code also includes support to send protections to the client.
Show difference between Revision 1.4 and 1.5
Revision 1.4cvs 2000/06/03 02:01:42 +40 -0
lib/crossfire.png: Some floors modified to no longer have transperencies.
include/newserver.h: Add Send_Face_Png made, also update versions of
the protocol
include/newclient.h: Add CF_FACE_PNG constant.
socket/request.c: Add support for receiving PNG facemode request,
ad final logic to send png images to the client.
Changes by Mark Wedel, 6/2/2000
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 2000/05/13 18:44:45 +6 -5
crossedit/xutil.c: Merge bitmap & pixmap load routine into one called
ReadImages, function modified to use above format.
crossedit/App.c: Call ReadImages to load images.
include/newserver.h: Change FaceInfo structure to have arrays of data
and datalength instead of explicity entries for pixmap vs bitmap data.
lib/adm/make_xpm_file.pl, lib/crossfire.cfb, lib/xbmtobdf.c: Removed -
either note needed or replaced by new naming scheme.
lib/adm/collect_images.pl: Replacement/improvement of make_xpm_file.pl
above - this handles all image formats (xbm, xpm, png). This is
also more intelligent in that it will not try to rebuild the image files
if there is not a valid arch directory.
lib/crossfire.png, lib/crossfire.xbm (new files): .png file is for png
images. xbm is to keep with the new standardized naming convention used
and is for the bitmaps.
lib/crossfire.xpm: New format used in file.
lib/Makefile.in: Modified to collect via new script as well as new
directives to collect (png files).
socket/init.c: Modified to load with the new format and data structures.
socket/request.c: Modified to send data with the new data structures
provided.
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 2000/05/08 23:08:10 +1 -0
socket/request.c: Add length checking to NewPlayerCmd so that if the client
sends us a really long command, we just truncate the end of it and not
overwrite our internal buffers causing crashes. MSW 5/8/2000
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:03 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:03 +0 -0
First CVS revsion: crossfire-0.95.3
Show difference between Revision 1.1 and 1.1.1.1
Revision 1.51.2.1mwedel 2004/02/01 19:47:42 +1 -4
commit fix fo extended map drawing to 1.5.0 branch.
MSW 2004-02-01
Show difference between Revision 1.51 and 1.51.2.1


File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:38