--- crossfire/common ---


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

Filename: loader.c
Revision 1.89ryo_saeba 2006/08/26 12:56:20 +2292 -2753
Remove obsolete event system.
Show difference between Revision 1.88 and 1.89
Revision 1.88ryo_saeba 2006/06/06 17:16:24 +4 -2
Fix Win32 compilation
Show difference between Revision 1.87 and 1.88
Revision 1.87mwedel 2006/06/05 01:28:56 +4 -12
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.86 and 1.87
Revision 1.86mwedel 2006/05/30 02:16:23 +1576 -1549
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.85 and 1.86
Revision 1.85akirschbaum 2006/05/21 07:37:11 +3 -3
Properly declare prototype for yval().
Show difference between Revision 1.84 and 1.85
Revision 1.84ryo_saeba 2006/05/20 05:30:43 +4 -2
Add missing #ifdef
Show difference between Revision 1.83 and 1.84
Revision 1.83mwedel 2006/05/18 00:27:43 +2259 -2443
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.82 and 1.83
Revision 1.82tchize 2006/04/06 16:18:34 +35 -83

finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other
Show difference between Revision 1.81 and 1.82
Revision 1.81ryo_saeba 2006/03/18 11:15:24 +1 -1
Use const when possible. Patch courtesy Stefan Huehner.
Show difference between Revision 1.80 and 1.81
Revision 1.80ryo_saeba 2006/03/18 09:05:31 +82 -34
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.79 and 1.80
Revision 1.79akirschbaum 2006/02/27 14:12:44 +14 -14
common/loader.c: Rebuilt.
Show difference between Revision 1.78 and 1.79
Revision 1.78akirschbaum 2006/02/17 15:37:41 +808 -594
common/loader.c: Rebuilt.
Show difference between Revision 1.77 and 1.78
Revision 1.77mwedel 2006/02/07 01:54:45 +285 -284
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.76 and 1.77
Revision 1.76mwedel 2006/02/05 03:10:51 +5 -1
Fix bug in previous commit (using string names for move_ values). Forgot
about the case where move_ was 0 - just save that as an int.
MSW 2006-02-05
Show difference between Revision 1.75 and 1.76
Revision 1.75mwedel 2006/02/04 23:27:07 +2571 -2675
movement type changes. Add move_allow field to explicitly allow certain
movement types on spaces. Add suppport for using string names instead
of numeric values to specify the MOVE_ values. Add code so when saving
data out, use string names instead of numeric value.
---
common/loader.l: Remove save_double(), as it isn't used by any code.
Add set_move() to set movement types from strings.
Add get_string_move_type, which takes integer movement type and
returns a string. Update load and save code to use these functions
respectively.
common/map.c: Change blocked_link() so that we only examine all the objects
on a space if there is something alive on the space or space is otherwise
blocked. There is no reason to examine all the objects on the space if
the object in question can move onto it.
Modify update_position() to use the move_allow field to clear bits
in the move_block field.
common/object.c: Add check in CAN_MERGE for move_allow. Add check for
move_allow in update_object to see if we should update the space or
not.
doc/Developers/objects: Update Movement code section to note use of using
strings to set movement types. Add note about move_allow. Section
about Transports added, but code isn't there yet.
include/object.h: Add move_allow to object structure.
MSW 2006-02-04
Show difference between Revision 1.74 and 1.75
Revision 1.74akirschbaum 2005/12/05 17:01:30 +1087 -871
common/loader.c: Rebuilt.
Show difference between Revision 1.73 and 1.74
Revision 1.73mwedel 2005/11/16 02:16:00 +2040 -1964
Commit for new blocking code. Not going to dictate all the changes -
but will outline the broad points. Note also that the
doc/Developers/objects is updated and goes into more details also.
- check for P_WALL no longer used - instead, need to use GET_MAP_MOVE_BLCOK
and check against movement type of objects.
- arch_blocked() changed to ob_blocked(), now takes object. Needed because
just looking at archetype move_ values is no longer sufficient.
- find_first_free_spot() changed to take object, since it just calls
arch_blocked()
- FLAG_FLYING removed, now in move type.
- walk_on/walk_off/fly_on/fly_off removed - now based on move_on and
move_off fields.
- Map space structure extended to hold the move_on/move_off, etc
values so that we can shortcut some processing by not having to
check every object on the space when something enters it if
move_on isn't set.
- archetypes recollected - boulders needed move_walk to properly trigger
buttons.
- Note that the new plugin code has to be fixed up for the new movement
code. Look for FIXME in plugins/cfpython/cfpython_object.c
MSW 2005-11-15
Show difference between Revision 1.72 and 1.73
Revision 1.72mwedel 2005/09/13 01:46:35 +593 -807
This change is mostly cosmetic and a preparation for the new movement
type code. Basically, it just changes the old object movement_type
field to attack_movement. This makes sense because that is what that
field is called in saved and loaded objects/archetypes, and thus
frees up that name for the new movement code.
--
common/button.c: field name change
common/loader.{cl}: field name change
doc/Developers/objects: Add section on new movement types, update old
documentation to note it is attack_movement and not movement_type
field that is important.
include/object.h: field name change.
server/attack.c: field name change.
server/monster.c: field name change
server/pets.c: field name change
server/skills.c: field name change.
server/spell_attack.c: field name change
server/spell_effect.c: field name change
MSW 2005-09-12
Show difference between Revision 1.71 and 1.72
Revision 1.71akirschbaum 2005/09/09 16:09:40 +168 -166
Allow a DM to cast spells and prayers in no-magic/no-prayer areas. Add new
command "wizcast" to toggle this setting.
Show difference between Revision 1.70 and 1.71
Revision 1.70tchize 2005/08/31 15:07:21 +1093 -870

Accelerated map loading (a lot) and map saving (a bit) codes to improve map transition
experience.
Show difference between Revision 1.69 and 1.70
Revision 1.69akirschbaum 2005/08/29 15:18:06 +2 -19
Fix bug #1059537 (Chainmail mutations):
common/loader.l: Remove code that "fixes" broken item names by removing a
leading material name. This effectively renames "mithril chainmails" into
"chainmails".
common/loader.c: Rebuilt.
Show difference between Revision 1.68 and 1.69
Revision 1.68mwedel 2005/08/23 00:42:57 +2509 -2622
Apply patch 1200555 - addition of key/value lists which allows arbitrary
storing of data in objects - see doc/Developers/key-value for more
information
---
loader.l, loader.c: Add add_key_value() function which parses the unknown
line in the object/archetype. Update get_ob_diff() to make differences
for the key/value lists.
common/object.c: Add functions for properly comparing the key/value lists,
setting and getting the vaues, clearing values upon freeing of object,
etc.
doc/Developers/Makefile.am: Add key-value file.
doc/Developers/key-value: Documentation of this feature.
include/libproto.h: Rebuilt
include/object.h: Addition of key_value struct, addition of key_values
field to object.
MSW 2005-08-22
Show difference between Revision 1.67 and 1.68
Revision 1.67gros 2005/07/15 12:25:00 +804 -591

Correcting end-of-line issue within Makefile.in
Show difference between Revision 1.66 and 1.67
Revision 1.66ryo_saeba 2005/03/13 09:48:17 +14 -8
Apply patch #1119762 (salathar): afk command
Show difference between Revision 1.65 and 1.66
Revision 1.65majorwoo 2005/02/27 12:05:40 +6 -10
Applied patch 1144782 - Fix town portal to maps that have reset
Show difference between Revision 1.64 and 1.65
Revision 1.64akirschbaum 2004/11/15 11:55:26 +3 -3
common/loader.l: Fix passed size in FAST_SAVE_LONG() - was one too long,
causing truncated diffs after "dam_modifier" entry.
Show difference between Revision 1.63 and 1.64
Revision 1.63mwedel 2004/10/15 02:09:35 +275 -262
common/living.c: Fix exp functions to use the player objects expmul
value when determining level gains, and not the skills. Also,
fix bug where players last hp/sp/grace gain I think was being
re-rolled when player gained level in skill.
common/loader.l, loader.c: Add better recording of non existant objects
(no archetype for them) in maps. Also, handle such objects in
players inventories properly (which is to just discard them)
common/map.c: Add better logging about discarded archetypes. Since the
loader now deals with objects without archs in inventories, that
code doesn't need to be in the server.
common/object.c: copy_object() was not properly nulling out the
next field in the event object, pointer to event list was also
incorrect, causing events to not be copied properly.
doc/spoiler-html/spoiler.html: Rebuilt.
server/apply.c: Apply patch by MT that fixes problem of entire inventory
not being copied properly. Fix problem that objects in creatures
were not having any sub treasure created (eg, put a pyro_book in
a monster on the map, and the pyro_book wouldn't have a spell in
it) - now we make sure we process inventory objects as well as map
objects, creating treasure as needed.
server/monster.c: Reverse order of cast_spell() and drain_rod() in
monster_use_range() - drain_rod() should go first, because
case_spell() can in rare cases destroy the rod.
MSW 2004-10-14
Show difference between Revision 1.62 and 1.63
Revision 1.62mwedel 2004/08/18 01:29:23 +5876 -5868
common/loader.l, loader.c: in check_loaded_object() - don't give spell
objects inventory if we are in the arch_init phase. When loading objects
in common loader routine, if object doesn't have arch, set the object
name to the arch name so that it is more meaningful than 'singularity'.
common/map.c: If object has inventory, check to make sure the inventory
objects have an archetype set - if not, remove and free the object -
objects without archetypes causes crashes.
MSW 2004-08-17
Show difference between Revision 1.61 and 1.62
Revision 1.61ryo_saeba 2004/07/03 04:16:57 +5868 -5866
Win32 fixes
Show difference between Revision 1.60 and 1.61
Revision 1.60mwedel 2004/06/11 02:23:37 +3 -5
common/item.c: describe_monster() - if the creature/player is stealthy,
mention it when the object is described.
common/loader.l, loader.c: Fix passed in size to get_ob_diff() - was one
to long, causing string corruption.
server/spell_attack.c: mood_change() - fix get_map_ob call - wasn't using
correct coordinate variables, resulting in crash.
MSW 2004-06-10
Show difference between Revision 1.59 and 1.60
Revision 1.59ryo_saeba 2004/04/08 02:23:06 +4 -2
Win32 fix
Show difference between Revision 1.58 and 1.59
Revision 1.58mwedel 2004/04/06 02:05:06 +586 -804
common/potion.c: Fix up change_abil() to more properly deal with potions -
characters could get 0 stat values. Also, messages were not being properly
displayed. Patch is slightly modified from one sent in by Bernd Edler.
MSW 2004-04-05
Show difference between Revision 1.57 and 1.58
Revision 1.57ryo_saeba 2004/03/26 15:59:26 +9 -1
Win32 fixes
Show difference between Revision 1.56 and 1.57
Revision 1.56tchize 2004/01/18 04:51:03 +2275 -2045


Rebuilded Makefile.in using autogen.sh because of recent add of a file in server/
Also rebuilded loader.c for linux because loader.l was modified by a windows developper.
Show difference between Revision 1.55 and 1.56
Revision 1.55mwedel 2003/11/11 01:58:30 +280 -277
common/loader.l, loader.c: Fix firewalls so that their spell is properly
initialized - uses 'dam' and not sp for those objects
MSW 2003-11-11
Show difference between Revision 1.54 and 1.55
Revision 1.54mwedel 2003/10/27 01:24:13 +3 -3
Various bug fixes:
common/arch.c: Fix item_matched_string() so that it only passes in the length
of the pssed in name in the strncasecmp(), and not the shorter of the
passed in string or item name. Otherwise, if player does a 'drop wand of',
unidentified wands (name just wand) would match. Similarly, if a player
did 'drop ringmail', unidentified rings would match, etc.
common/living.c: Fix fix_player() to always process the praying skill with
respect to resistances and whatnot. This is necessary because the
god give abilities are put in this skill, and those shouldn't go away
depending on if the skill is in use or not. Also fix bug in add_exp
routines which wasn't multiplying permanent exp by PERM_EXP_GAIN_RATIO
common/object.c: Fix find_obj_by_type_subtype() - had extraneous semicolon
after the for loop, so the if code that was supposed to be for each object
was never called and instead would crash as it would get called with tmp
was null.
server/attack.c: Fix problem with kill_object() not finding proper skill -
it would use the skill object instead of the skill. Fix problem of
poisoning not setting up proper skill name in poisoning object.
server/c_range.c: If player is invoking a spell, don't update their
range_magic value.
server/skill_util.c: Fix divide by zero problem if improperly passed
skill object.
MSW 2003-10-26
Show difference between Revision 1.53 and 1.54
Revision 1.53ryo_saeba 2003/10/12 03:48:09 +3 -3
'subtype ' is 8 chars long, not 2! May break some things...
Show difference between Revision 1.52 and 1.53
Revision 1.52mwedel 2003/09/23 02:13:34 +28 -29
Fix problem with it truncating 64 bit exp values to 32 bit on
saves. Also fix problem where it wasn't using proper macros for
new fields added as part of spell/skill additions.

Note: The exp fixes should get back ported to rel-1-5-0-patch, as that
problem does exist there also.
MSW 2003-09-22
Show difference between Revision 1.51 and 1.52
Revision 1.51mwedel 2003/09/23 00:21:26 +1 -1
Add conditional compilation to the stop level Makefile.am so that it
only tries to compile crossedit if we have X libraries. Also, rebuild
the files with older version of aclocal/autoheader/automake, so it
shouldn't have as many troubles with some peoples systems.
MSW 2003-09-22
Show difference between Revision 1.50 and 1.51
Revision 1.50mwedel 2003/09/13 00:01:28 +2879 -2719
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.49 and 1.50
Revision 1.49tchize 2003/09/03 08:42:17 +1881 -1860

Allow renaming items for users. Thanks to Nicolas Weeger (Ryo)
Show difference between Revision 1.48 and 1.49
Revision 1.48tchize 2003/09/03 07:25:05 +1832 -1808

generator may now use their inventory as a basis to generated items
instead of the other_arch field. Will allow more fine tuned generators
Show difference between Revision 1.47 and 1.48
Revision 1.47tchize 2003/08/08 12:49:30 +9 -122

Comments cleanup in the FASTCAT saving code (long waited by mwedel i
suppose :P) and in the smoothing map1function
Show difference between Revision 1.46 and 1.47
Revision 1.46tchize 2003/07/07 13:49:21 +2 -2

Fixed bug in new get_ob_diff code. The resist_save array needed to get the trailing space
or you would endup with "resist_electricty30" instead of "resist_electricity 30". Moreover
the maxgrace stat was saved as maxgra. Fixed both and regenerated loader.c
Show difference between Revision 1.45 and 1.46
Revision 1.45tchize 2003/07/02 10:13:54 +3 -2

Corrects a bug un loader.l preventing from compiling with some compilers:
static int eol_size=strlen("\n");
which some compilers consider as non constant replaced by
static int eol_size=sizeof("\n")-1;
Sorry for convenience Todd
Show difference between Revision 1.44 and 1.45
Revision 1.44tchize 2003/06/30 14:14:13 +312 -136


Various code optimisations to help preventing peeks at maploads. Includes:
* rewritten saving of objects, removed needs for sprintf calls and most strlen calls
* modified map structures for saving of a very small amount of additionnal precalculated datas for weather
* added FAST_xxx macros for fast string manipulations
Show difference between Revision 1.43 and 1.44
Revision 1.43gros 2003/06/30 06:21:29 +24 -28
Corrected improper comparaison algorithm for event structures inside objects - Gros 30/06/03
Show difference between Revision 1.42 and 1.43
Revision 1.42gros 2003/06/26 06:27:43 +1632 -2079
Re-implemented the event hooks in objects as a dynamically linked list,
instead of a static table.
Show difference between Revision 1.41 and 1.42
Revision 1.41tchize 2003/06/19 05:59:26 +2351 -2119

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.40 and 1.41
Revision 1.40mwedel 2003/04/04 23:39:46 +1728 -1712
acinclude.m4: Update path to find python includes, since aclocal.m4 gets
derived from this file.
configure.ac, configure: Add utils/scores.pl to list of files to substitute on.
common/loader.l, loader.c: Add subtype for objects - will be used in future work.
common/object.c: Add subtype diff check in CAN_MERGE()
common/porting.c: Have it use SAVE_DIR_MODE when doing the mkdir, and not have
hardcoded 777 permissions.
doc/Makefile.in, doc/Makefile.am, doc/Developers/Makefile.am,
doc/Developers/Makefile.in: Move some of the spell docs around and merge
them together
doc/Developers/objects: Add notes about subtype.
doc/Developers/spells: New file, contains preliminary work on spell objects.
include/config.h: Remove command about DM_MAIL and LIBDIR from file, as they
are options no longer present. Update comment about SAVE_MODE, and add
SAVE_DIR_MODE
include/object.h: Add subtype field to object.
server/login.c: Have it use SAVE_DIR_MODE when doing the mkdir, and not have
hardcoded 6700 permissions.
utils/Makefile.in: Updated to know about scores.pl
utils/scores.pl.in: New file - reads player file to generate HTML score
file.
MSW 2003-04-04
Show difference between Revision 1.39 and 1.40
Revision 1.39mwedel 2003/03/07 23:35:32 +31 -43
Patch for 64 bit experience total, as well as flexible number of levels.
Basically, max level is now dynamic, set in exp_table file. Experience
is now a 64 bit value, so much higher totals now allowed. To
allow for flexible levels, add new function - did_make_save() which is used
for players/monsters to see if they make their saving throw - this is
necessary because the savethrow[] array may not be as large as max level -
did_make_save takes this into account.
NOTE: If your updating a server, you will need to copy over/set up a
new exp_table file that has max_levels defined and at least one of the
tables uncommented. There are no longer any compiled in defaults
--
configure, configure.ac: Add AC_CHECK_SIZEOF calls for long and long long
so we can know which one to use for 64 bit support (other checks
may need to be added)
common/exp.c: Remove levels table, replace it with a 64 bit pointer.
Change init_experience to allocate appropriately sized table, have it
read max_level value from exp_table file. Replace atoi calls with
atoll to get 64 bit value. Update dump_experience to properly
print 64 bit values.
common/info.c: Update dump routines that dump exp to properly print
64 bit values.
common/init.c: Add initializing for settings.max_level value.
common/item.c: Update sprintf's to handle 64 bit output of exp (speed)
value in objects.
common/living.c: change MAX_EXP define, update MAX_EXP_IN_OBJ define,
add MAX_SAVE_LEVEL which corresponds to how large the savethrow
table is. Change MAXLEVEL to settings.max_level. Change level_exp()
to return 64 bit value, other updates in functions to use 64 bit
values. Add did_make_save() function.
common/loader.l, common/loader.c: Update load/save routins of exp to
deal with 64 bit values.
common/map.c: Update calculate_difficulty to use 64 bit values when
storing exp - unlikely to make a difference, since unlikely any map
will get to a point where it has that much exp on it.
common/porting.c: Remove dead code from save_long(), add save_long_long()
to save 64 bit values.
include/autoconf.h.in: SIZEOF_LONG and SIZEOF_LONG_LONG values added.
include/global.h: Add code to typedef sint64/uint64 types based on what
type gives us those values. Add max_level to settings array.
include/libproto.h: rebuilt.
include/living.h: Replace exp field with 64 bit value.
include/player.h: Update party kill log exp tracking to have 64 bit
values.
lib/exp_table: Udpate comments about max_level, uncomment what
was the default table so new installs have working table.
Add 5 levels to all the tables.
random_maps/monster.c: Update place_monsters to use 64 bit when storing
exp total for map/per square.
server/apply.c: Replace MAXLEVEL with settings.max_level, add
did_make_save calls where appropriate
server/c_misc.c: have statistics command properly print 64 bit
exp value.
server/c_wiz.c: Have stats command properly display 64 bit value.
server/hiscore.c: Replace exp values with 64 bit values, update to
properly load/display them.
server/player.c: replace savethrow[] reference with did_make_save()
server/skill_util.c: Update skills command to properly show 64 bit exp values.
server/spell_effect.c: replace savethrow[] reference with did_make_save(),
allow players to cast directors right beneath themselves, but other
walls must be on empty space.
MSW 2003-03-07
Show difference between Revision 1.38 and 1.39
Revision 1.38garbled 2003/02/13 23:54:13 +1586 -1560
Regen loader.c, add changes to changelog.
Show difference between Revision 1.37 and 1.38
Revision 1.37mwedel 2003/02/12 00:30:24 +2096 -2055
Add lore/endlore to object structure to hold general information about objects:
common/loader.c, common/loader.l: Add loading and saving of lore field.
common/object.c: handle lore field for copy/free/other object operations.
Also, update CAN_MERGE to look at materialname also.
doc/Developers/objects: Add notes about lore.
include/object.h: add lore field to object.
MSW 2003-02-11
Show difference between Revision 1.36 and 1.37
Revision 1.36garbled 2003/02/07 00:58:25 +297 -279
regen from loader.l
Show difference between Revision 1.35 and 1.36
Revision 1.35garbled 2003/01/29 18:07:07 +1751 -1723
New materialtype system for crossfire. Based in concept on my original
design, but rewritten from scratch to make it easily extensible.

In a nutshell:

Each of the old materialtypes (metal, glass, stone, wood) are now a class
of materials. When an item in the game is created, if it does not have a
specific materialname of it's own, a materialname is generated randomly
from the matching entries in the "lib/materials" file. This file
contains all of the saving throws, and other material specific
modifications for each of the expanded materials.

Materials can be manually specified in the arch with the "materialname"
directive. Such as the gold coins, which are specified to be made of,
you guessed it, gold.

Saving throws have been slightly rewritten to use the new materialtypes,
and a few other minor details associated with materialtypes have been
patched up.

Adding a new type of stone or wood, is as simple as adding a new entry in
the lib/materials file. The game will automatically start distributing
them around randomly.
Show difference between Revision 1.34 and 1.35
Revision 1.34garbled 2003/01/09 17:50:25 +1655 -1630
Change the collect program to put editor_folder in the collected arches,
just like the java editor wants. Change loader.l to ignore this string.
Show difference between Revision 1.33 and 1.34
Revision 1.33mwedel 2003/01/03 18:28:50 +282 -276
TODO - add notes about item damage - clear it out of my mailbox.
common/loader.l, loader.c: Add check at load time to see if monsters
hp is higher than its maxhp and print a debug message if so.
devel/Makefile: Remove - makefiles shouldn't be in CVS, only .in versions.
server/attack.c: Fix calculation of max_damage in kill_object - this
was being done incorrectly, resulting in fired spell objects causing
incorrect amounts of damage, resulint in some monsters ending up with
a lot of hp. Fix call to kill_object to pass in correct damage value.
server/monster.c: Put in check so that monster won't regen to more hp
than they should have.
server/spell_util.c: Removed unused variable from move_missile.
server/weather.c: fix bug that causes crash if empty space is encountered
on map.
MSW 2003-01-03
Show difference between Revision 1.32 and 1.33
Revision 1.32mwedel 2002/11/29 22:17:40 +1676 -1655
TODO: Updated with dm 'follow' command.
common/loader.l: Rebuilt.
common/map.c: Fix up some formatting - no code change.
include/player.h, server/apply.c, server/player.c, socket/info.c: Remove
chosen_item_spell field - isn't needed anymore as that information
is determined each time player fires wand/rod/horn. This fixes
those items firing magic bullets if they were equipped when player
saved and rejoined. Some additional cleanup done in rangetostring() -
mostly formatting changes, but minor code changes.
MSW 2002-11-29
Show difference between Revision 1.31 and 1.32
Revision 1.31mwedel 2002/09/28 02:19:39 +2 -2
Mostly bugfixes, but the addition of a wiz 'hide' command which makes the
wiz out of sight so to speak.
--
common/loader.l, common/loader.c: Fix bug where flag values were being saved
with actual value of the flag (eg, 32768, 16, etc) instead of 1/0 value -
Code effectively worked the same, just was a bit odd looking at save files.
include/player.h: Add hidden element to player structure.
include/sproto.h: Add command_hide(), update proto for players_on_map()
lib/Makefile.am, lib/Makefile.in: add wizhelp/hide file.
server/apply.c: Add error checking to converts so it doesn't crash if the
converter doesn't have a proper other_arch. Modify shopmats so that they
don't transport spell effects, like fireballs an burning hands.
server/attack.c: Modify code so players can drain other players exp.
server/c_misc.c: Modify various functions to not show info on hidden DM.
server/c_wiz.c: Add command_hide(), clean up command_invisible() a bit.
server/commands.c: Add hide command to dispatch table.
server/main.c: Add code to not update players on map for hidden dm.
server/player.c: Give hidden dm perpetual invisiblity.
server/skills.c: Only get exp if you actually stole an item - fixes abuse
whereby players who couldn't carry item could continually 'steal' it from
monster and just gain exp.
server/swap.c: modify players_on_map() to take addition arg to determine if
real players on map should be shown, or if we shouldn't count hidden dms.
socket/info.c: Modify code so that oldsockets don't get reports on high verbose
messages.
socket/metaserver.c: Modify metaserver update to not include hidden dms.
utils/Makefile.in: update datestmp.
MSW 2002-09-27
Show difference between Revision 1.30 and 1.31
Revision 1.30mwedel 2002/09/18 01:17:19 +1644 -1614
Various updates:
NOTE - You need to install the updated archetypes (included below)
if you run this code without the updated archs, you will likely find
many things do not work.
acinclude.m4 aclocal.m4 configure: more refinements for libpython detection.
common/button.c: Two push_button() changes - have it check for ACTIVATE_ON_
PUSH/RELEASE to determine if the object should get activated. Also,
change behaviour of TIMED_GATE so that multipart timed gates work.
common/loader.l, loader.c: Update with acttivate_on_push/release
doc/Developers/objects: Add notes about how to add flags to objects.
include/define.h: add new FLAG_ values
include/win32.h: update by pstolarc so it compiles on Win32.
lib/archetypes: rebuilt
MSW 2002-09-17
Show difference between Revision 1.29 and 1.30
Revision 1.29mwedel 2002/09/07 00:55:18 +254 -253
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.28 and 1.29
Revision 1.28mwedel 2002/07/30 01:37:19 +2 -2
Various fixes:
INSTALL: Update with note about --with-includes configure option.
common/loader.c, common/loader.l: Add comment about flag_invis_undead
include/define.h: Add FLAG_INVIS_UNDEAD
lib/adm/map_info: Modify to not follow symbolic links.
server/monster.c: Modify can_detect_enemy to be a bit more straightforward
in its logic. Also, modify detection of invisible creatures - don't
reduce duration, just return that the monster can detect the player.
There were also spurious messages about the player being seen.
Modify can_see_enemy to check FLAG_INVIS_UNDEAD, also fix broken
comparison
server/player.c: Clear FLAG_INVIS_UNDEAD when invisibility ends. Fix
action_makes_visible() - had reverse logic on FLAG_MAKE_INVIS check,
and a typo in the printed message.
server/spell_effect.c: cast_invisible() to use FLAG_INVIS_UNDEAD -
also check for maximum duration, and only search active objects when
clearing enemy.
server/weather.c: Fix off by one on comparision when intializing maps
darkness when loading map from disk. In dawn_to_dusk, don't do
further processing if the light hasn't changed.
MSW 2002-07-29
Show difference between Revision 1.27 and 1.28
Revision 1.27mwedel 2002/07/17 23:41:14 +272 -271
If in the editor, don't calculate item power for items - better
to leave the default of zero so it is obvious on maps that no value
has been set.
MSW 2002-07-17
Show difference between Revision 1.26 and 1.27
Revision 1.26mwedel 2002/07/14 23:57:11 +2137 -2110
-- 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/06/09 02:59:30 +277 -269
More minor changes, including a fix for the disappearing object bug -
this was caused by the flag_links not getting updated the last
time new flags were added. Problem probably only showed up now
because loader.c wasn't rebuilt until recent changes.
--
common/loader.c, common/loader.l: add extern to arch_init, when
loading and get an object from a file, complain and ignore it if
arch_init is not set (only time we should get object (vs arch) for
names is when we load the archetypes file). Add missing entries
to flag_links array.
common/treasure.c: Fix code so that proper plural names are generated
for custom items (potions, flesh items, etc).
include/define.h: Add note about updating flag_links when NUM_FLAGS is
increased.
server/skills.c: don't let players steal from players with FLAG_WIZ set.
MSW 2002-06-09
Show difference between Revision 1.24 and 1.25
Revision 1.24mwedel 2002/06/07 02:00:39 +266 -267
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.23 and 1.24
Revision 1.23mwedel 2002/05/30 23:18:32 +1912 -1887
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.22garbled 2002/01/03 16:02:34 +1501 -1472
Allow the loader to save objects marked for save on overlay.
Show difference between Revision 1.21 and 1.22
Revision 1.21mwedel 2001/12/23 02:17:36 +1523 -1544
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.20mwedel 2001/12/03 01:51:39 +1788 -1739
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.19 and 1.20
Revision 1.19michtoen 2001/11/26 22:33:46 +1544 -1506
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.18 and 1.19
Revision 1.18michtoen 2001/11/26 11:52:25 +1704 -1699
Attack Patch 25.11.01

Detailed information in the dev list.
The changes are to many to explain here.
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2001/11/13 02:14:25 +1412 -1367
Various minor bugfixes -
common/loader.c: rebuilt
include/map.h: Change width,height,enter_x,enter_y to be 16 bit instead
of 8 bits.
lib/treasures: change skull treasure to tooth instead of skull_tooth since
the later is not currently in the distributed archetypes file
server/monster.c: Optimize some code, remove some other that is not used.
server/plugins.c: Fix un initialized value in initPlugins that would
cause crash at startup if plugin directory does not exist.
MSW 2001-11-13
Show difference between Revision 1.16 and 1.17
Revision 1.16garbled 2001/10/31 01:09:30 +1622 -1592
regen
garbled 2001-10-31
Show difference between Revision 1.15 and 1.16
Revision 1.15gros 2001/10/14 02:57:14 +2483 -1996
Major changes: Added dynamic plugin support, removed old Guile support.
- Gros 10/14/01
Show difference between Revision 1.14 and 1.15
Revision 1.14michtoen 2001/06/13 07:52:20 +235 -233
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.13 and 1.14
Revision 1.13michtoen 2001/06/13 05:48:43 +2092 -1449
Modified Files:
aclocal.m4 configure. configure.in Makefile.in
crossfire32.dsw crossfire32.dsp INSTALL_WIN32.txt
common: arch.c loader.c treasure.c loader.l
crossedit: Attr.c
doc: README_EXTENSIONS README_SCRIPT
include: autoconf.h define.h global.h includes.h loader.h
object.h script.h spellist.h spells.h sproto.h
version.h
server: Makefile.in apply.c attack.c c_object.c gods.c init.c
main.c monster.c player.c script.c script_spells.c
script_types.c skills.c spell_effect.c spell_util.c
time.c
Log Message:
Adding Scriptfire 0b11 to Crossfire.
Massive changes. The facts are in the doc files.

MT 2001-06-13
Show difference between Revision 1.12 and 1.13
Revision 1.12mwedel 2001/04/09 01:59:46 +184 -183
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.11 and 1.12
Revision 1.11mwedel 2001/03/16 23:03:08 +206 -202
MSW 2001/03/16:
Change code so that if player dies and loading the players savebed map does
not work, return player to EMERGENCY_MAPPATH instead. New function added
to server/main.c called enter_player_savebed which does the work,
Files changed: include/sproto.h server/main.c server/player.c
server/spell_effect.c (comment added)
Unrelated change: Remove messages about multiple resist types set.
Files changed: common/loader.l common/loader.c
Show difference between Revision 1.10 and 1.11
Revision 1.10mwedel 2001/02/23 00:06:35 +15 -13
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 2001/02/11 03:12:12 +9 -9
MSW 2001/01/11:
Other than various general cleanups, the main change this code does is
that style maps (for random maps) get loaded special now - they objects
they contain are not put on the active list, and they use a private map
list so they do not appear in the output of the 'maps command.
common/arch.c, common/treasure.c,server/login.c: Update calls to load_object
common/loaderl.l,loader.c: Update lex_load to take an optional flags option.
This is currently only used so that the loader can decide if it should
call update_ob_speedto put objects on the active list or not.
Calls to lex_load updated. load_object modified to take another option
common.map.c: remove PROCESS_WHILE_LOADING and CHECK_ACTIVE_MAPS ifdefs.
update calls to load_object. Remove some dead code.
include/config.h: Remove CHECK_ACTIVE_MAPS and PROCESS_WHILE_LOADING flags.
Those options did not work, and in all likelihood, this would be done
via threading now days and not what code was there.
include/libproto.h, sproto.h: updated or various function changes.
include/map.h: Add MAP_STYLE flag.
random_maps/exit.c: Call set_map_timeout after we load the final map
so it will get swapped out.
random_maps/standalone.c: Add dummy set_map_timeout function so it compiles.
random_maps/style.c: Add load_style_map function which does the job of
actually checking to see if a style map is in memory, and if not,
loads it up. Updates the pointers so it appears on a map style map list
and not the general map list.
server/main.c: create set_map_timeout function that deals with setting the
map timeouts. Fix bug so server doesn't crash if two players kill each
other on hall of selection.
server/monster.c remove dead code.
socket/loop.c: If realloc fails, catch it and exit with meaningful
error message.
End of MSW 2001/02/11 checkin.
Show difference between Revision 1.8 and 1.9
Revision 1.8cvs 2001/01/23 23:01:36 +202 -201
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.7 and 1.8
Revision 1.7peterm 2000/12/19 00:54:51 +3 -3
Re-inserted the Spell of Conflict
fixed a bug in attack.c
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2000/12/03 18:40:03 +1514 -1220
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.5 and 1.6
Revision 1.5cvs 2000/06/16 01:06:33 +184 -171
Modified how firewalls worked. Can now trigger them with handles.
Show difference between Revision 1.4 and 1.5
Revision 1.4cvs 2000/04/27 02:04:18 +86 -35
common/arch.c, common/loader.l (loader.c): Modify the load routines
to strip off trailing whitespace in object names and other_arch fields -
I believe this is why altars to Sorig did not generally work, and while
generally that white space should not exist, doing a little extra checking
for it is not a bad idea - MSW 4/26/2000
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 1999/07/12 23:47:59 +27 -59
Sync with my automatically generated copy - msw.
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 1999/05/08 17:52:41 +60 -28
stat depletion on death fixed. Previously, it didn't actually
remove a stat. --PeterM
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.49.2.1mwedel 2003/10/02 01:40:52 +591 -807
Backport 64 bit exp fix.
MSW 2003-10-01
Show difference between Revision 1.49 and 1.49.2.1


File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:11