--- crossfire/socket ---


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

Filename: init.c
Revision 1.52mwedel 2006/06/05 01:28:57 +3 -3
Clean up some compiler warnings. Most of the changes are related to replaced
%lld with FMT64 defines so that the format will be correct, no matter if
the 64 bit type is a long, long long, or if this is windows. #if 0 out a
bunch of code that isn't used.
--
common/exp.c: Replaced lld with FMT64
common/holy.c: #if 0 out baptize_altar(). Add banner copyright at top of file.
common/info.c, common/item.c, common/loader.l, common/loader.c, common/map.c:
common/porting.c Replaced lld with FMT64
common/time.c: Replace a bunch of variables declared as longs to be uint32.
Update various sprintf appropriately.
include/global.h: Add FMT64 and FMT64U as appropriate for different systems.
Change max_time to be a uint32
include/sockproto.h, include/sproto.h: rebuilt
server/apply.c: #if 0 out monster_apply_special
server/c_range.c: Add != 0 in assignment if statement - same meaning, clearer
on intention and avoids compiler warning.
server/c_wiz.c: Update command_kick() to take const char. Update command_speed()
to operate properly based on max_time being a uint32. Update various lld
to FMT64. Clarify ambiguous if/if/else statement in command_insert_into()
server/commands.c: Add cast to command_kick for new function prototype. #if
0 out find_command(), parse_string(), parse_command()
server/disease.c: #if 0 out find_disease(), reduce_symptoms()
server/egoitem.c: #if 0 out create_artifact(). Add copyright at top of file.
server/gods.c: #if 0 out get_god()
server/hiscore.c: Replace lld with FMT64
server/login.c: #if 0 out create_savedir_if_needed()
server/resurrection.c: Replace lld with FMT64. #if 0 out dead_character() and
dead_player_exists()
server/server.c: Remove info_keys() - hasn't been used in a long time. #if 0
out process_active_maps()
server/skill_util.c: Replace lld with FMT64
server/spell_util.c: #if 0 out check_spell_effect()
server/weather.c: #if 0 out feather_map(). Fix what I suspect is an error
in worldmap_to_weathermap() to skip over starting slashes.
socket/image.c: Add a fair number of char * casts to suppress warnings.
socket/init.c: Change buflen in init_connection() to socklen_t to match
function prototype. Add some char * casts.
socket/loop.c: Add some char * casts.
--
MSW 2006-06-04
Show difference between Revision 1.51 and 1.52
Revision 1.51akirschbaum 2006/05/21 05:35:11 +3 -3
Make socket handling more robust.
Show difference between Revision 1.50 and 1.51
Revision 1.50ryo_saeba 2006/05/20 07:36:48 +2 -1
Add a bot flag, to not count in metaserver information
Show difference between Revision 1.49 and 1.50
Revision 1.49mwedel 2006/05/18 00:27:44 +4 -1
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.48 and 1.49
Revision 1.48ryo_saeba 2006/03/18 09:05:37 +9 -9
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.47 and 1.48
Revision 1.47ryo_saeba 2006/03/14 11:12:28 +2 -1
Fix memory leak and uninitialized variable
Show difference between Revision 1.46 and 1.47
Revision 1.46cavesomething 2006/01/30 11:00:34 +2 -1
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.45 and 1.46
Revision 1.45cavesomething 2006/01/09 13:35:13 +2 -1
spell listing support
Show difference between Revision 1.44 and 1.45
Revision 1.44akirschbaum 2006/01/08 15:02:05 +1 -3
include/newserver.h, socket/{init.c,request.c}: Remove unused fields ext2 and
ext_title_flag from NewSocket structure.
Show difference between Revision 1.43 and 1.44
Revision 1.43akirschbaum 2005/12/07 12:25:56 +3 -5
Apply modified patch #1293774 (Kick banned hosts at once) by Thomas Equeter:
disconnect new connection for banned host right after connecting. Also add
support for user name in ban files.
Show difference between Revision 1.42 and 1.43
Revision 1.42akirschbaum 2005/12/05 17:34:04 +3 -3
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style
function declarations and prototypes to proper Ansi C syntax. This patch
allows the compiler to check function arguments and also removes some warnings
when compiling with -Wstrict-prototypes.
Show difference between Revision 1.41 and 1.42
Revision 1.41akirschbaum 2005/10/28 13:19:53 +2 -3
Fixes my previous commit. Should now properly allocate/deallocate the
faces_sent array.
Show difference between Revision 1.40 and 1.41
Revision 1.40akirschbaum 2005/10/24 17:51:03 +4 -2
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.39 and 1.40
Revision 1.39akirschbaum 2005/09/04 11:58:13 +7 -13
common/{anim.c, image.c, los.c, map.c, porting.c, treasure.c},
include/define.h, random_maps/treasure.c,
server/{apply.c, c_misc.c, c_object.c, c_wiz.c, commands.c, daemon.c,
hiscore.c, init.c, login.c, player.c, plugins.c, resurrection.c, weather.c},
socket/{init.c, item.c, loop.c, lowlevel.c}: Use LOG() for error messages and
debug output instead of stdout/stderr. Include filename in error messages.
server/resurrection.c: Fix error message in read_player().
Show difference between Revision 1.38 and 1.39
Revision 1.38akirschbaum 2005/08/27 17:10:14 +2 -2
socket/init.c: Make setsockopt(REUSEADDR) work if using gcc in Ansi C mode on
Linux.
Show difference between Revision 1.37 and 1.38
Revision 1.37ryo_saeba 2005/07/22 15:41:25 +2 -1
Initialising values works better :)
Show difference between Revision 1.36 and 1.37
Revision 1.36tchize 2005/05/06 16:10:26 +2 -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.35 and 1.36
Revision 1.35mwedel 2005/04/27 01:40:07 +5 -3
Apply patch 1190107 so server compiles on HURD.
common/porting.c: Add define for MAXPATHLEN
socket/init.c: Add check for __GNU__ for setsockopt()
MSW 2005-04-27
Show difference between Revision 1.34 and 1.35
Revision 1.34mwedel 2005/03/19 03:14:57 +2 -2
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.33 and 1.34
Revision 1.33ryo_saeba 2003/12/18 14:40:44 +5 -3
GCC 3.3 infinite loop fixes
Show difference between Revision 1.32 and 1.33
Revision 1.32ryo_saeba 2003/12/14 10:28:47 +5 -1
Compilation warning cleaning
Show difference between Revision 1.31 and 1.32
Revision 1.31ryo_saeba 2003/12/02 12:51:44 +16 -6
Added & updated comments, now in doxygen-like style
Show difference between Revision 1.30 and 1.31
Revision 1.30mwedel 2003/09/13 00:02:14 +2 -2
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.29 and 1.30
Revision 1.29tchize 2003/06/19 05:59:33 +3 -1

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.28 and 1.29
Revision 1.28mwedel 2003/03/19 02:04:51 +1 -2
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.27 and 1.28
Revision 1.27mwedel 2002/08/26 02:14:11 +2 -2
Various bugfixes:
common/map.c: Change so that same logic is used to determine pclose/fclose
that is used to determine popen/fopen - otherwise, compressed map
files probably don't work properly.
common/treasure.c: Do a memset to make sure entire treasureslist is
set to sane values.
lib/archetypes: Fix 'slaying' field (which determines spell name) in
god_spelldirect_face_of_death and god_spelldirect_finger_of_death
server/apply.c: Fix infinite loop if the player had cursed items
that needed to be unapplied to apply an item - setting up next
item iteration was inside if check when it shouldn't be. Also,
print message to player if this is the case.
server/monster.c: Better format some of the code for improved readability.
Fix indentation of can_see_enemy. Clean up invisiblity check - may
have fixed a bug - old code should have worked, but wasn't very
readable.
server/move.c: Fix some bad code from last checkin - didn't fix
the crash on no floor for door type, and instead removed
check type from next line by accident.
server/player.c: Remove call for init_beforeplay - this is already
properly called, and re-calling it resulted in some things being
redone when they shouldn't be.
server/skills.c: Add message if there is nothing to steal form the monster.
server/spell_effect.c: Improve message when invisiblity duration is
maximized.
socket/init.c: change O_NDELAY to O_NONBLOCK of fcntl.
MSW 2002-08-25
Show difference between Revision 1.26 and 1.27
Revision 1.26mwedel 2002/07/14 23:57:13 +1 -3
-- 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.25 and 1.26
Revision 1.25mwedel 2002/05/30 23:18:39 +2 -1
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.24 and 1.25
Revision 1.24mwedel 2002/05/18 22:55:48 +4 -6
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.23 and 1.24
Revision 1.23mwedel 2001/12/31 02:36:04 +6 -112
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.22 and 1.23
Revision 1.22mwedel 2001/12/03 01:51:46 +3 -3
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.21 and 1.22
Revision 1.21michtoen 2001/11/17 15:25:21 +6 -2
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.20 and 1.21
Revision 1.20michtoen 2001/11/04 14:22:55 +2 -1
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.19 and 1.20
Revision 1.19mwedel 2001/07/31 01:33:23 +7 -1
common/map.c free_map Set in_memory status to MAP_SWAPPED - fixed bugs of maps
not getting reset properly
common/object.c: insert_ob_in_map - was passing wrong value to check_walk_on,
resulting in some things not working as expected.
doc/Protocol: Clarify how the sending of the version command works.
server/move.c: move_ob redone. It should hopefully be more efficient (only'
remove objects after verifying they can in fact move). IMO, code is
also simpler, and hopefully has fewer bugs.
socket/init.c: InitConnection - modified to set faces_sent[0] to one
so that we will never send any information about face 0 to the client.
facecode 0 is sent in the map1 command to clear spaces/layers.
MSW 2001-07-30
Show difference between Revision 1.18 and 1.19
Revision 1.18smacfiggen 2001/07/22 13:48:47 +2 -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.17 and 1.18
Revision 1.17mwedel 2001/06/16 02:48:21 +3 -2
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 +2 -1
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/08 01:21:34 +2 -1
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.14 and 1.15
Revision 1.14mwedel 2001/06/04 01:41:02 +3 -1
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.13 and 1.14
Revision 1.13mwedel 2001/05/28 23:41:54 +2 -1
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.12 and 1.13
Revision 1.12mwedel 2001/05/09 01:58:12 +6 -7
Various improvements to make finding memory leaks easier.
common/anim.c: Add free_all_anim function
common/arch.c: Modify free_all_arch to free more data
common/init.c: If running under MEMORY_DEBUG, don't pre-allocate objects.
common/map.c: Add free_all_maps functiion.
common/object.c: Modify object allocations if using MEMORY_DEBUG to only
malloc one object at a time, and not pre-allocate objects.
common/readable.c: Fix memory leak.
common/shstr.c: Include autoconf.h so it can pull in dmalloc.h file.
include/config.h: Remove notes of what was removed a long time ago.
Add MEMORY_DEBUG option.
include/libproto.h, include/sockproto.h, include/sproto.h: automatic rebuild
server/c_misc.c: Fix 'malloc info command so it reports right memory total
for maps. Add command_style_map_info which sums up memory used by
style maps.
server/commands.c: Add style_info wiz command which dumps memory usage
for style maps.
server/init.c: Have sighup handler call cleanup function.
server/main.c: Fix clean_tmp_files which could result in crash if one
of the maps in memory has 0 reset time. Modify cleanup function
to free more data.
server/player.c: op_on_battleground: Fix compile warning about unuused variable.
socket/init.c: Change name of free_all_ericserver to free_all_newserver,
have it free all face data.
MSW 2001-05-08
Show difference between Revision 1.11 and 1.12
Revision 1.11mwedel 2001/04/09 01:59:46 +0 -1
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:09 +2 -1
Add skill exp
Show difference between Revision 1.9 and 1.10
Revision 1.9michtoen 2001/04/06 14:07:59 +19 -19
win32: change // to /* */
Show difference between Revision 1.8 and 1.9
Revision 1.8michtoen 2001/04/05 19:43:12 +41 -6
*** empty log message ***
Show difference between Revision 1.7 and 1.8
Revision 1.7cvs 2001/02/02 23:30:18 +10 -4
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.6 and 1.7
Revision 1.6cvs 2001/01/23 23:01:37 +6 -1
MSW 2001/01/23:
Various cleanups/fixes as detected by purify:
common/anim.c: animation[0] was given a null pointer as the name, but
bsearch/or comparison function will try to de-reference it.
Give it a unique name.
common/loader.l: msgbuf was being used initialized in the main loading
function. loader.c also regenerated.
common/object.c: find_free functions were not checking to see if the
spaces they were examining were out of the map. Added checks
to do so.
server/apply.c: buf was being used initialized in the function.
socket/init.c: input buffer needs to be initialized as we do a
strncasecmp against the buffer which may not have any data in it.
Show difference between Revision 1.5 and 1.6
Revision 1.5mids 2000/11/24 15:18:02 +3 -2
Added defined(__FreeBSD__) || defined(__OpenBSD__) so setsockopt can use
REUSEADDR on these operating systems
Show difference between Revision 1.4 and 1.5
Revision 1.4cvs 2000/05/17 22:01:41 +2 -2
socket/init.c: Fix incorrect check on return value from fread when
loading xpm images. MSW 5/17/2000
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 2000/05/13 18:44:45 +65 -97
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 1999/07/13 01:03:06 +0 -0

Global commit for 0.95.4 - most files have no changes but just have
differing headers between my local RCS and the CVS versions and need to
get synced up.
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


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