--- crossfire/socket ---


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

Filename: item.c
Revision 1.41akirschbaum 2006/06/01 15:55:54 +12 -2
Do not merge locked and unlocked items.
Show difference between Revision 1.40 and 1.41
Revision 1.40akirschbaum 2006/05/21 05:35:11 +8 -8
Make socket handling more robust.
Show difference between Revision 1.39 and 1.40
Revision 1.39ryo_saeba 2006/05/05 04:41:15 +4 -4
Second part of patch #1453869 courtesy Stefan Huehner (shuehner)
Show difference between Revision 1.38 and 1.39
Revision 1.38ryo_saeba 2006/03/18 09:05:37 +10 -9
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.37 and 1.38
Revision 1.37mwedel 2006/02/07 01:54:46 +119 -170
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.36 and 1.37
Revision 1.36akirschbaum 2005/09/04 11:58:13 +2 -2
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.35 and 1.36
Revision 1.35akirschbaum 2005/09/02 19:20:01 +6 -4
socket/item.c: Make selecting objects from ground view work again.
Show difference between Revision 1.34 and 1.35
Revision 1.34mwedel 2005/08/17 01:58:11 +98 -86
Add patch by Kevin Rudat for applyable but non
pickable objects to have item items.
doc/Dvelopers/objects: Update item types.
socket/item.c: Use the head of any objects we send. Should generally
only be an issue for objects on the ground, as currently there is no
large objects players can pick up. Also fix up some of the formatting/
indenting in this file.
MSW 2005-08-16
Show difference between Revision 1.33 and 1.34
Revision 1.33ryo_saeba 2005/08/12 08:47:00 +9 -5
Fields changed from char* to const char*, cleanup.
Show difference between Revision 1.32 and 1.33
Revision 1.32akirschbaum 2005/07/14 04:18:57 +2 -2
common/{button.c, treasure.c, utils.c}, server/{c_wiz.c, login.c, shop.c,
skill_util.c, spell_effect.c}, socket/{image.c, item.c}: Fix printf like
format specifiers. At least one of them fixes a means to crash the server.
Andreas Kirschbaum 2005-07-14
Show difference between Revision 1.31 and 1.32
Revision 1.31ryo_saeba 2005/04/30 10:39:33 +2 -2
Use const char* instead of char* when possible
Show difference between Revision 1.30 and 1.31
Revision 1.30mwedel 2005/03/19 03:14:57 +6 -6
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.29 and 1.30
Revision 1.29akirschbaum 2004/06/13 12:30:38 +8 -6
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.28 and 1.29
Revision 1.28mwedel 2004/02/11 02:09:29 +5 -5
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.27 and 1.28
Revision 1.27ryo_saeba 2003/12/02 12:51:44 +40 -19
Added & updated comments, now in doxygen-like style
Show difference between Revision 1.26 and 1.27
Revision 1.26mwedel 2003/09/13 00:02:14 +1 -4
Updated code for skill + spell code. skills and spells are now objects.
tuning these now means changing the archetypes. New spells can now
be added just by making a new archetype. Lots of code cleanup
also done.
MSW 2003-09-12
Show difference between Revision 1.25 and 1.26
Revision 1.25tchize 2003/09/03 08:42:19 +49 -17

Allow renaming items for users. Thanks to Nicolas Weeger (Ryo)
Show difference between Revision 1.24 and 1.25
Revision 1.24mwedel 2002/06/01 00:38:07 +8 -1
Fix bug in 'item2' command when sending large numbers of look objects -
the type wasn't being included for the see next/see previous entries.
MSW 2002-05-31
Show difference between Revision 1.23 and 1.24
Revision 1.23mwedel 2002/05/30 23:18:39 +65 -76
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.22 and 1.23
Revision 1.22mwedel 2002/04/19 00:28:13 +11 -4
socket/item.c: Add checks to esrv_move_object - before it just trusted
the client that the destination target to move items into was a container.
Now do valid checking that the object can be picked up, that the container
can hold it, etc. MSW 2002-04-18
Show difference between Revision 1.21 and 1.22
Revision 1.21mwedel 2001/12/23 02:17:36 +2 -27
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.20 and 1.21
Revision 1.20michtoen 2001/11/26 22:33:46 +30 -5
Arch type & subtype patch

Added type & subtype system with 2 subtypes.
Type & subtype will be send to client.

Adding new types:

FLOOR 71
WALL 77
LIGHT_SOURCE 78
MISC_OBJECT 79
MONSTER 80
SPAWN_GENERATOR 81

Added subtypes for armor & weapons.

new commands are:
sub_type <uint8>
sub_typ2 <uint16>

sub_type2 is for internal server use.

Added new command:
casting_speed <delay>

This will be included later.

I will use the sdl client as tester for this patch,
older clients will not be effected even when the
arches are updated.
Show difference between Revision 1.19 and 1.20
Revision 1.19michtoen 2001/10/29 18:49:03 +17 -17
really SOME fixes - most casting
Show difference between Revision 1.18 and 1.19
Revision 1.18mwedel 2001/08/29 02:14:16 +2 -2
include/define.h: Pickup type defines added.
include/player.h: Change mode (pickup mode) to 32 bits.
server/c_object.c: command_pickup function modified to support all
the new pickup options.
server/player.c: Fix for path_to_player to prevent crashes. Add check
in move_player_attack just in case. check_pick function modified to
support new pickup options. do_some_living modified to eat flesh
items if player is starving and they don't have any food.
server/spell_effect.c: cast_detection modified so that detect magic/curse
will not show objects beneath the floor. Change so that detect_monster
and detect_evil spells copy the face of what they detected - gives better
appearance on client.
socket/item.c: fix bug LookAt that ws checking blocked_los on wrong
offset.
MSW 2001-08-28
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2001/08/21 00:39:31 +13 -19
Enhancements to make monsters 'do the right thing' with relation
to tiled maps (ie, will detect players and attack them if on an adjoining
tiled maps). This involved a rewrite of path_to_player - I've tested this
out, and if anything, it seems that monsters may be more aggressive on
spellcasting.
++
common/map.c: blocked modify to make sure it is checking valid coordinate
value. blocked_link,blocked_two modified to translate for tiled maps.
Add load_and_link_tiled_map which loads a tiled map and links in all
pointers relative to adjoining maps. out_of_map modified to use
this function instead of doing the work itself. Add get_rangevector
function that returns offset, direction, and distance between two
objects, taking into account tiled maps. get_rangevector_from_mapcoord
added which is similar to get_rangevector, but takes a map and coordinates
instead of a second object. on_same_map function added which returns
true if the two objects are on the same logical (ie tiled) maps.
doc/crossfire.doc: Add note about what Int does for monsters.
include/map.h: Add some comments, and add structure for rangevector
function return values.
server/attack.c: add calls to on_same_map instead of doing op->map
comparisons.
server/monster.c: Many functions modified to properly handle tiled
maps properly.
server/pets.c: get_pet_enemy modified to know about tiled maps.
server/player.c: get_nearest_player modified to know about tiled maps.
path_to_player rewritten to know about tiled maps - I think some other
bugs were also fixed in return values. Split player_attack_door
from move_player attack to keep functions a more reasonable size.
move_player_attack, player_can_view modified to know about tiled
maps.
server/skills.c: can detect_enemy modified to take another parameter -
call in steal updated to pass this parameter.
server/spell_util.c: ok_to_put_more, can_see_monsterP modified to
handle tiled maps properly.
socket/item.c: look_at modified to return proper results when player
looks at something on an adjoining tiled map.
++ End of checkin
Show difference between Revision 1.16 and 1.17
Revision 1.16mwedel 2001/06/04 01:41:02 +3 -3
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.15 and 1.16
Revision 1.15mwedel 2001/05/22 23:22:39 +6 -2
socket/item.c: Don't raise player to top of stack when they look at
something. I think this may be causing server crashes in some
circumstances - plus its not really needed anyways.
socket/loop.c: block_until_new_connections: Add call to flush_old_maps
so maps are reset while waiting for a new player.
MSW 2001-05-22
Show difference between Revision 1.14 and 1.15
Revision 1.14mwedel 2001/05/02 02:26:51 +50 -45
socket/item.c: Modify look_at to not stop when it finds the first invisible
object. Not the changes look bigger than they actually were, as I
did a lot of formatting changes to make it easier to read.
server/monster.c: Modify monster_check_pickup to check to see if the
next object got destroyed. I'm not sure the exact way this happens,
but I've seen one crash where this did happen - I'm guess some
function further down in the monster_check_apply look may call
this or destroy the item.
MSW 2001-05-01
Show difference between Revision 1.13 and 1.14
Revision 1.13mwedel 2001/04/27 00:04:07 +6 -1
socket/item.c: Modify ApplyCmd so a removed player can not apply objects.
Fix crashes caused by players applying savebeds after they have
used the bed. MSW 2001-04-26
Show difference between Revision 1.12 and 1.13
Revision 1.12mwedel 2001/03/30 01:27:48 +41 -3
common/image.c, include/define.h, include/global.h: Add empty_face structure
and appropriate code to initialize it. This is used for the server side
look selection.
include/newserver.h: Add NUM_LOOK_OBJECTS to control number of look objects
to send at any one time. add look_position field to the newsocket
structure.
server/move.c: clear look position as player moves.
server/player.c: initalize look_position element in structure.
socket/item.c: modify esrv_draw_look to sne NUM_LOOK_OBJECTS at any one
time, and to also send pseudo objects that lets the player scroll up and down.
modify ApplyCmd so that if it detects the application of one pseudo objects
to adjust the look_position.
MSW 2001-03-29
Show difference between Revision 1.11 and 1.12
Revision 1.11mwedel 2001/03/29 01:46:49 +8 -1
configure, configure.in, include/autoconf.h, includes.h: add check for
time.h and include it if we find it.
socket/item.c: esrv_move_object - have it check to see if the object is
already on the ground before we try to re-drop it. Likewise, check
to see if it is already in players inventory before we try to pick
it up.
common/object.c: Don't send face updates to the client or make
the space as needing to be redrawn. Client now deals with animation
of the look window on its own.
MSW 2001/03/28
Show difference between Revision 1.10 and 1.11
Revision 1.10mwedel 2001/02/23 00:06:35 +2 -2
MSW 2001/02/22:
TODO: Add some items, remove some others, remove outline of future versions,
since it was out of date.
common/loader.l,loader.c: Declare msgbuf a static outside the lex_load function.
lex_load was otherwise clearing it each time it was called, which resulted
in empty messages for the random artifacts (since the call lex_load one
line at a time). Instead, we just zero this at start of load_object.
Original reason of this change was due to purify errors - as I look at the
code, it appears even before these changes that it was clearing the buffer
properly.
common/map.c: removing pending field from map objects.
common/re-cmp.c: Comment out some code which was resulting in too many
false compares.
include/config.h: increase default for MAX_OBJECTS. 6000 is a bit small
on current systems.
include/map.h: Remove pending field from map structure.
random_maps/treasure.c: Increase size of doorlist. Fixes crash, in that
if a random map could place 8 doors around the treasure, the list
was not terminated, so the problem would eventually try to read/dereference
random memory after the array.
server/c_misc.c: Remove pending field from maps, so remove functions
and other places that referred to it (like the maps command)
server/c_wiz.c: fix up wiz map reset command. Not really tested, but
old code had some definate problems just from visual inspection.
server/main.c: Further fix for unique exits - relative paths to unique maps
from non unique maps should now work.
server/monster.c: Various fixes - one is that should get more reliable distance
values for multipart monsters. Second, modify dist_att to calculate from
closest part of monster, and not the head of the monster.
server/pets.c: Remove code dealing with pending objects.
server/player.c: Don't remove invisible objects in players inventory when
playing with permadeath mode.
server/spell_util.c: If you try to cast denied spell, it no longer costs any
spellpoints.
socket/item.c: Fix bug where it was using 'item' protocol command instead of
'item1'
End of MSW 2001/02/22 checkin.
Show difference between Revision 1.9 and 1.10
Revision 1.9cvs 2000/11/14 01:35:06 +6 -8
metaserver update:
common/init.c: Add meta_ fields to settings structure initialization.
include/global.h: Add meta_ fields to settings structure.
include/sockproto.h: Updated for new meta_ functions.
lib/Makefile.in: Have it install settings file.
lib/settings: Default settings file with some metaserver default value.s
server/init.c: Add load_settings file. Add call to metaserver_init.
server/main.c: Add call to metaserver_update in do_specials.
socket/Makefile.in: Add metaserver.c to list of files.
socket/metaserver.c: File that deals with metaserver related data.
socket/item.c: Remove some unused variables. Unrelated to metaserver changes.
socket/loop.c: Add calls to metaserver_update in block_until_new)connection. Change
function so that if there are no active players, it still timeouts and
does metaserver update. Basically changed to do it the way the
WATCHDOG code did it.
End of metaserver update. MSW 2000-11-13
Show difference between Revision 1.8 and 1.9
Revision 1.8cvs 2000/11/08 01:19:37 +5 -9
MSW 2000-11-07
common/item.c: query_base_name was not return plural version of items
with 'of' in name. Also, much of the function was not using safe_strcat,
which could result in buffer overlow problems.

common/object.c: Change update_position so that we always generate
3 images per space. This fixes players standing on top of dragon transports,
but generally works for things like monsters standing on objects.
insert_ob_in_map: change 'return' statement to 'return NULL'. Also
remove unused map pointer.
decrease_ob_nr: Fix bug for client updates when player drops item that
is then consume. It was using op->above after object was removed to
find the player. Store above pointer before we remove the object.

socket/item.c: Don't terminate pointer as returned by query_base_name -
instead, terminator buffer after we copy it. For simple object,
query_base_name may directly return a pointer to the objects name
which is only long enough to hold the name itself.

socket/lowlevel.c: Abort if we are trying to send the client a packet
longer than supported by the protocol. Since that buffer is static,
overflowing it will just create memory corruption - easier to stop
then than try and debug it later.

End of MSW checkin 2000-11-7
Show difference between Revision 1.7 and 1.8
Revision 1.7jec 2000/11/06 17:06:48 +1 -3
* stop_item() / attack fix patch 2000-11-06
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2000/11/02 23:42:56 +5 -1
server/c_object.c, socket/item.c: Fixed for long item support. pick_up_object
in c_object was overwriting a fixed length string, causing server crashes.
item.c was not properly terminating plural version of object name, resulting
in corrupt packets being sent to the client. MSW 11/2/2000
Show difference between Revision 1.5 and 1.6
Revision 1.5cvs 2000/08/07 00:16:34 +90 -11
The following change basically does the following: When the server sends an
item name to the client, this item name is now two pieces - the first piece
of the name is its singular form, the second piece is the plural name. This
now makes items in the inventory appear more proper in terms of pluralization
and just normal English. I did notice that the server does not know how
to properly make 'torch' plural - it turns it into torchs. A matching
check in for the client has also been done.
include/newserver.h: Update VERSION_SC to 1024
common/item.c: Change query_base_name to take a second option on whether
we should generate a plural version of the name or not.
socket/item.c: Modify functions to use second argument on the query_base_name
function. Update item commands to send two part names (singular & plural).
Modify esrv_send_look to use item1 protocol command instead of item command.
server/c_object.c: Update item_matched_string to use second option to
query_base_name. Modify function to check against both singular and
plural versions of name.
server/shop.c: Modify shop_listing command usage in query_basename to use
second option. It will also generate the singular name, but that is only
used on sorting, so I don't think it will generally cause any problems.
include/libproto.h: rebuilt because query_base_name has an addition opt.
Mark Wedel 8/13/2000
Show difference between Revision 1.4 and 1.5
Revision 1.4jec 2000/05/26 04:50:53 +5 -3
* apply() cleanup patch 26/5/2000
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 2000/05/24 00:48:51 +5 -3
socket/item.c: Add MAXITEMLEN define at top of file and use that to determine
at what point item commands should be broken up. Prior hard coded value
was not always large enough. MSW 5/23/2000
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 2000/05/23 02:06:32 +55 -19
include/define.h: add safe_strcat inline/static function. Add
DESCRIBE_ABILITY_SAFE and DESCRIBE_PATH_SAFE which use the safe_strcat
to prevent buffer overuns.
common/item.c: Have query_name use HUGE_BUF for its buffer - query_short_name
uses that buffer size, and we call the same thing. have quer_name and
query_short_name use the safe_strcat function. Increase buffer size
in ring_desc to be a VERY_BIG_BUF and also use safe_strcat along with the
DESCRIBE_*_SAFE macros.
server/input.c: Modify examine.c to not get buffer overruns for very long/
complicated items. Modify long_desc to also handle long names/descriptions
without buffer overruns.
socket/item.c: Modify the functions that prepend the length to the name
of the object to handle very long (>255) object names properly - now we
just truncate it and only send the first 255 bytes. add function
add_stringlen_to_sockbuf to make this task easier.
With the above changes, very long named items/items with very long
descriptions works properly in both the server (no crashes) and the
client (no crashes/protocol errors) MSW 5/22/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.14.2.1mwedel 2001/05/22 23:27:53 +6 -2
Minor updates for patch/stable release:
socket/item.c: Don't raise player to top of stack when they look at
something. I think this may be causing server crashes in some
circumstances - plus its not really needed anyways.
socket/loop.c: block_until_new_connections: Add call to flush_old_maps
so maps are reset while waiting for a new player.
MSW 2001-05-22

configure.in, configure: Fix png and Xpm library detection. Suggested
patch by Yann Chackhoff, applied by MSW 2001-05-20

material.h - change name from iron to metal.
Show difference between Revision 1.14 and 1.14.2.1


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