--- crossfire/common ---


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

Filename: map.c
Revision 1.116ryo_saeba 2006/08/25 13:45:04 +5 -2
Static buffers cause strange issues.
Show difference between Revision 1.115 and 1.116
Revision 1.115ryo_saeba 2006/08/19 15:22:21 +5 -31
Fix for bug #1460251 (Big monsters generated by generators broken). Tweaks to object dumping.
Show difference between Revision 1.114 and 1.115
Revision 1.114qal21 2006/08/12 14:38:22 +9 -1
Impliment cfpython map invalidation. Change behavoir of EVENT_MAP*
Show difference between Revision 1.113 and 1.114
Revision 1.113gros 2006/08/12 09:52:15 +11 -1

Added a field in the map structure to store the timestamp of the last original map loading, and
modified the Town Portal spell so that it now cannot lead to a map that was marked before a reset, after a reset.
This is a fix for bug #1539155
gros, 2006-08-12
Show difference between Revision 1.112 and 1.113
Revision 1.112gros 2006/07/19 04:58:58 +2 -2
Corrected a typo preventing the code to compile properly.
Show difference between Revision 1.111 and 1.112
Revision 1.111qal21 2006/07/18 17:53:23 +12 -5
Add check to block_linked() to make sure things never block themself.
Show difference between Revision 1.110 and 1.111
Revision 1.110qal21 2006/07/17 13:57:50 +2 -2
minor correction of a typo in a comment
Show difference between Revision 1.109 and 1.110
Revision 1.109mwedel 2006/06/05 01:28:56 +4 -9
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.108 and 1.109
Revision 1.108mwedel 2006/05/30 02:16:23 +35 -6
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.107 and 1.108
Revision 1.107mwedel 2006/05/18 00:27:43 +101 -113
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.106 and 1.107
Revision 1.106ryo_saeba 2006/03/18 11:15:24 +2 -2
Use const when possible. Patch courtesy Stefan Huehner.
Show difference between Revision 1.105 and 1.106
Revision 1.105akirschbaum 2006/02/19 08:29:14 +20 -2
Prevent crossedit from stripping out 'maplore' map header field.
Show difference between Revision 1.104 and 1.105
Revision 1.104akirschbaum 2006/02/17 15:29:47 +4 -4
Apply patch #1433271 (code-cleanup) by Stefan Huehner: Add const and static.
Show difference between Revision 1.103 and 1.104
Revision 1.103mwedel 2006/02/17 02:04:43 +8 -2
common/map.c: Modify ob_blocked() to properly handly objects with a 0
ob->move_type. Fixes infinite loop from random map code when trying
to place exits.
MSW 2006-02-16
Show difference between Revision 1.102 and 1.103
Revision 1.102akirschbaum 2006/02/09 15:25:45 +116 -119
Apply modified patch by Pippijn van Steenhoven to fix get_rangevector
functions on tiled maps.
Show difference between Revision 1.101 and 1.102
Revision 1.101akirschbaum 2006/02/08 18:48:36 +3 -3
Apply patch #1427979 (code-cleanup: add const, fix warnings) by Stefan
Huehner.
Show difference between Revision 1.100 and 1.101
Revision 1.100mwedel 2006/02/04 23:27:07 +12 -3
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.99 and 1.100
Revision 1.99akirschbaum 2006/01/07 12:05:07 +33 -5
Change meaning of "items are on same map": for tiled maps now two objects are
also considered to be on the same map if they are on diagonally adjacent maps.
This solves the issue that a pet can be only one tile away from the owner but
still considered not to be on the same map.
Show difference between Revision 1.98 and 1.99
Revision 1.98qal21 2006/01/07 00:33:07 +3 -9
Actually, reletive paths should work from unique maps too; my thoughts on why they woudln't be for are flawed.
Show difference between Revision 1.97 and 1.98
Revision 1.97qal21 2006/01/06 12:55:35 +4 -2
Allow map tiling paths to be reletive unless tiling from a unique map.
Show difference between Revision 1.96 and 1.97
Revision 1.96akirschbaum 2005/12/31 13:56:27 +2 -1
Apply modified patch #1391648 (FIX: new movement code and generators) by Lalo
Martins. This fixes bugs #1383398, #1383392, #1375643, #1372035, #1370409; all
bugs are related to objects stacking which should not stack.
Show difference between Revision 1.95 and 1.96
Revision 1.95akirschbaum 2005/12/11 12:06:08 +4 -2
Prevent the map loader from crashing when loading maps with incorrect headers.
Show difference between Revision 1.94 and 1.95
Revision 1.94akirschbaum 2005/12/11 05:56:17 +29 -12
Prevent the map loader from crashing when loading maps with incorrect headers.
Changes are based on patch #1275563 by Kevin Rudat.
Show difference between Revision 1.93 and 1.94
Revision 1.93akirschbaum 2005/12/10 17:32:53 +36 -38
Apply modified second part of patch #1275563 (Crossedit: fix map attributes
window) by Kevin Rudat: let crossedit save/load tiling paths as the mapmaker
entered them, rather than saving the normalized version.
Show difference between Revision 1.92 and 1.93
Revision 1.92akirschbaum 2005/12/05 17:34:03 +4 -4
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style
function declarations and prototypes to proper Ansi C syntax. This patch
allows the compiler to check function arguments and also removes some warnings
when compiling with -Wstrict-prototypes.
Show difference between Revision 1.91 and 1.92
Revision 1.91mwedel 2005/11/30 01:58:47 +3 -3
common/map.c: Replace code with OB_TYPE_MOVE_BLOCK - effectively same as what
it was.
include/define.h: Update OB_TYPE_MOVE_BLOCK so that spaces that don't block
any type of movement doesn't block objects that also don't have movement.
This fixes cases of gates not pushing objects off them.
MSW 2005-11-29
Show difference between Revision 1.90 and 1.91
Revision 1.90mwedel 2005/11/16 02:16:00 +48 -19
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.89 and 1.90
Revision 1.89akirschbaum 2005/10/28 14:08:53 +14 -5
Fix compiler warnings. Most changes do not change the program (remove unused
variables, convert "if(x = y)" into "x = y; if(x)"); a few actually fix
(possible) problems (fix uninitialized variables, fix printf format
specifiers, fix mismatches between signed and unsigned variables, add missing
return and default statements).
Show difference between Revision 1.88 and 1.89
Revision 1.88qal21 2005/10/16 17:51:21 +26 -6
Add support for random template maps (still need to document, and still need to add support for template maps created from non-random templates)
Show difference between Revision 1.87 and 1.88
Revision 1.87ryo_saeba 2005/10/15 03:40:22 +2 -2
print_shop_string can safely be void
Show difference between Revision 1.86 and 1.87
Revision 1.86cavesomething 2005/10/04 00:06:18 +3 -3
fix output names in new_save_map.
Show difference between Revision 1.85 and 1.86
Revision 1.85cavesomething 2005/10/03 20:39:36 +8 -9
fix segfault in shops code, for real this time.
Show difference between Revision 1.84 and 1.85
Revision 1.84cavesomething 2005/10/03 20:00:04 +3 -2
fix segfault in shops code
Show difference between Revision 1.83 and 1.84
Revision 1.83cavesomething 2005/10/03 10:47:31 +2 -2
using < instead of > could prove helpful
Show difference between Revision 1.82 and 1.83
Revision 1.82cavesomething 2005/10/02 22:29:41 +116 -2
add support for specialised shops
Show difference between Revision 1.81 and 1.82
Revision 1.81ryo_saeba 2005/09/25 04:47:22 +2 -2
Fix some compilation warnings.
Show difference between Revision 1.80 and 1.81
Revision 1.80akirschbaum 2005/09/04 11:58:12 +4 -6
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.79 and 1.80
Revision 1.79tchize 2005/09/04 10:44:44 +2 -12

Fixed a bug in map loading (doors and fireplacs could have disappear)
Show difference between Revision 1.78 and 1.79
Revision 1.78tchize 2005/08/31 15:07:22 +17 -6

Accelerated map loading (a lot) and map saving (a bit) codes to improve map transition
experience.
Show difference between Revision 1.77 and 1.78
Revision 1.77akirschbaum 2005/08/27 16:42:06 +12 -9
common/map.c: Change default values for reset_timeout, enter_x, and enter_y
map headers to zero. In set_map_reset_time() use MAP_DEFAULTRESET if
reset_timeout is zero. This change prevents crossedit from adding these
headers by just loading and saving a map.
include/config.h: Add MAP_DEFAULTRESET.
Show difference between Revision 1.76 and 1.77
Revision 1.76ryo_saeba 2005/07/17 06:00:03 +3 -3
Use const char* instead of char* when possible. Removed unused variables from weather code.
Show difference between Revision 1.75 and 1.76
Revision 1.75akirschbaum 2005/07/16 16:10:37 +2 -2
Fix spelling errors in string constants.
Show difference between Revision 1.74 and 1.75
Revision 1.74ryo_saeba 2005/07/15 08:51:49 +8 -8
Glue cleaning. New plugin function.
Show difference between Revision 1.73 and 1.74
Revision 1.73ryo_saeba 2005/04/14 14:15:27 +7 -7
Fix a few things, use const char* instead of char* when possible
Show difference between Revision 1.72 and 1.73
Revision 1.72mwedel 2005/03/19 02:35:08 +19 -5
common/map.c: Clean up if statement ins blocked_link() which caused warning
messages - broke it apart to make it a little clear. Add check for
premature end of map header - make code more resilent in case of truncated
saved maps. Fix saving of region name in new_save_map() - saving the
pointer to the region isn't what the loader is expecting, and is highly
non portable even if it was.
MSW 2005-03-18
Show difference between Revision 1.71 and 1.72
Revision 1.71ryo_saeba 2005/03/15 15:06:19 +4 -1
Apply patch #1145089 by cavesomething for region support
Show difference between Revision 1.70 and 1.71
Revision 1.70akirschbaum 2005/03/06 14:38:52 +2 -2
common/{map.c, readable.c, treasure.c}, crossedit/Attr.c, server/{apply.c,
attack.c, c_wiz.c, init.c, monster.c, pets.c, shop.c, skill_util.c, skills.c,
spell_attack.c, spell_effect.c, time.c}, socket/{info.c, request.c}: Add
missing newline character to LOG() messages.
Show difference between Revision 1.69 and 1.70
Revision 1.69ryo_saeba 2004/12/25 12:09:29 +3 -2
Patches #1086095 and 1088385, party password length tweak
Show difference between Revision 1.68 and 1.69
Revision 1.68mwedel 2004/10/18 01:54:35 +4 -1
Fix some bugs I introduced in my last commit.
common/map.c: Add back in call to sum_weight that got removed when removing
the object checking code.
common/treasure.c: Have fix_generated_item() blank out the randomitems
field after it has created treasure.
server/apply.c: Only clear randomitems after create_treasure() - don't
presume it should get blanked out for other reasons - with change
to treasure.c above, this should be more reliable and fix starting
skill issue, as randomitems was getting blanked out for CLASS object.
server/main.c: Change processing of players a little - found crash where
autosave was called for a removed player (map had got swapped out) -
don't do autosave logic if player is removed. Move the autosave code
to after the players action, so that can just have a single check of
removed status.
MSW 2004-10-17
Show difference between Revision 1.67 and 1.68
Revision 1.67mwedel 2004/10/15 02:09:39 +3 -19
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.66 and 1.67
Revision 1.66mwedel 2004/08/24 01:37:41 +4 -4
common/map.c: Add extra check to make sure variable is set before calling
strcmp - this can happen if the map file that is being loaded is
0 bytes - without this, the server would crash.
MSW 2004-08-23
Show difference between Revision 1.65 and 1.66
Revision 1.65mwedel 2004/08/18 01:29:24 +17 -2
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.64 and 1.65
Revision 1.64mwedel 2004/04/16 01:23:41 +15 -11
common/map.c: Change blocked_link() to take a map parameter. Also, change code
in blocked_link() to assume that the caller has set up appropriate map and
coordinates related to tiling (in all functions that currently call
blocked_link, this is the case)
include/libproto.h: Rebuilt.
server/move.c, server/player.c: update call to blocked_link to include the map.
MSW 2004-04-15
Show difference between Revision 1.63 and 1.64
Revision 1.63ryo_saeba 2004/02/28 04:40:56 +5 -2
Warning cleaning
Show difference between Revision 1.62 and 1.63
Revision 1.62ryo_saeba 2004/02/27 17:00:26 +2 -2
Some warnings cleaning.
Show difference between Revision 1.61 and 1.62
Revision 1.61mwedel 2004/02/15 23:10:41 +3 -2
Add check for null path name in load_and_link_tiled_map() - it's possible
that maps like assymetrically.
MSW 2004-02-15
Show difference between Revision 1.60 and 1.61
Revision 1.60mwedel 2004/02/11 02:09:22 +4 -3
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.59 and 1.60
Revision 1.59tchize 2004/01/20 08:52:52 +4 -1

Slight modification to smoothing code.

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

nosmooth 1

in map header. Some mapmaker asked for a 'special arch' which would
disable smoothing on a whole region of map. I think disabling for a whole
map is easier. Maps don't look crappy because of the special arch visibility
(think about no_spell). So no special arch, just about 4 additionnal lines
of code :P. No changes to protocol, so no change to client!
Show difference between Revision 1.58 and 1.59
Revision 1.58mwedel 2003/09/12 23:12:17 +4 -63
Some code cleanup, but mostly a bug in get_rangevector code which
would return incorrect results. This would result monsters attacking
the player, even though the player wasn't next to them.
MSW 2003-09-12
Show difference between Revision 1.57 and 1.58
Revision 1.57temitchell 2003/08/23 11:17:19 +2 -2
- fix this as per authors request (Nicolas Weeger).
Show difference between Revision 1.56 and 1.57
Revision 1.56tchize 2003/08/02 11:25:23 +4 -4

WIN32 bugfixes, (mappath fix and uint64 fix)
thanks to Nicolas Wegeer for submit.
Partial Transcript from mail:
...
The first, global.patch, fixes bad u/sint46 for Win32 in
include/global.h
There was no SIZEOF_LONG defined, so it would error...
Also, the Python includes define SIZEOF_LONG_LONG as 8, so it's better
to have some coherence somewhere :-)

The second is for common/map.c
It fixes broken check_path which would simply ignore the prepend_dir
argument, resulting in broken map links in big maps... (would try to
find map in world/world_xxx_xxx instead of
share/maps/world/world_xxx_xxx).

I think they don't change anything for other platforms.
...
Show difference between Revision 1.55 and 1.56
Revision 1.55tchize 2003/06/30 14:14:13 +4 -1


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.54 and 1.55
Revision 1.54mwedel 2003/05/26 18:58:47 +3 -3
common/map.c: Fix bug causing unnecessary crashes - ok for the map
to match if the object has been removed.
socket/loop.c: Only make call to draw_client_map() if we have a valid
map to draw.
MSW 2003-05-26
Show difference between Revision 1.53 and 1.54
Revision 1.53mwedel 2003/03/07 23:35:32 +2 -2
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.52 and 1.53
Revision 1.52mwedel 2003/03/02 23:13:08 +14 -1
Various bug fixes.
Makefile.am, Makefile.in: Put crossedit as the last directory, so any build
errors for crossedit doesn't effect anything else.
README: Update ftp site listing.
TODO: More things aded.
aclocal.m4, configure: Add missing / when checking in /usr/local for
python headers.
common/map.c: Add some debugging in free_all_objects that checks to make sure
there are not objects remaining that belong to the map just freed -
only active if MANY_CORES is set.
random_maps/random_map.c: Increase minimum random map size to 10x10 - this
is need for square spirals to work properly I think.
server/spell_effect.c: Have perceive self tell dragon players what they are
currently focused on. Fix town portal to remove force objects from
players if destination is no longer available.
server/swap.c: Reset maps reset_time when loading them in in read_map_log() -
this is only used if recycle temp maps is on. Also, do sanity checking
on reset_time value - bogus values were observed on metalforge.
socket/request.c: Update map timeout in draw_client_map() - in this way,
we don't swap out a map within a players view only to swap it back
in.
MSW 2003-03-01
Show difference between Revision 1.51 and 1.52
Revision 1.51mwedel 2003/01/14 01:29:25 +2 -2
Fix blocked_link - was passing wrong coordinates if coordinates
were outside the map the object was on in a tiled map.
MSW 2003-01-13
Show difference between Revision 1.50 and 1.51
Revision 1.50mwedel 2003/01/08 02:39:17 +62 -133
Bulk of this commit is to improve code for tiled maps - replace
wall/blocks_magic/blocks_cleric, etc with get_map_flags which
also does map tiling translation as needed. This should fix a lot
of the bugs related to map tiling (there are sure to be more out
there - all the get_map_ob still need to be checked).
Other changes - many spells stopped progressing on spaces that
blocked view - that is now removed - didn't make a lot of sense.
Other fixes - some cleric spells (eg, word of recall) checked to
see if magic was prohibited, didn't check to see if cleric
was prohibited.
Clean up some bugs in the lighting code that would cause erroneous
results. Also, allow players to see immediately around them on
outdoor maps no matter how dark the map really is - behaviour
on indoor maps is the same.
Lots of code reformatted, and lots of obsoleted/dead code removed.
Add max range to dimension door.
Fix magic map - got broken when the layer stuff was redone - was
not showing proper colors. IT also works sensibly on tiled maps
now - rather than display based on the map, it gives the player a
50x50 area centered on where the player is.
Change fire_bow - move special player fire modes into own function -
makes code much cleaner.
Hopefully this fixes more bugs than it introduces.
common/los.c, common/map.c, common/object.c, crossedit/Edit.c,
include/libproto.h, include/sockproto.h, include/map.h,
include/spellist.h, include/sproto.h, random_maps/treasure.c,
random_maps/wall.c, server/attack.c, server/c_misc.c,
server/c_wiz.c, server/disease.c, server/main.c, server/monster.c,
server/pets.c, server/player.c, server/rune.c, server/shop.c,
server/skill_util.c, server/skills.c, server/spell_effect.c,
server/spell_util.c, server/time.c, socket/info.c: See note above
server/apply.c: Limit number of times weapon can be enchanted so
that it won't overflow item_power. Modify enchant armor
to enchant as normal armor is enchanted, also only allows one
item to be enchanted.
MSW 2002-01-07
Show difference between Revision 1.49 and 1.50
Revision 1.49mwedel 2002/11/29 22:17:41 +21 -21
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.48 and 1.49
Revision 1.48garbled 2002/11/26 02:57:55 +1 -7
Nuke #ifdef MAP_RESET
Show difference between Revision 1.47 and 1.48
Revision 1.47garbled 2002/11/08 02:50:44 +3 -1
Add glue for weather_effect from server/weather.c
Make decay_objects stop destroying all my snow and puddles. Lower the
ferocity of this function a bit as well.
in ready_map_name, we call weather_effect, so that as a player enters a
worldmap tile, he will immediately see the current weather conditions.
Show difference between Revision 1.46 and 1.47
Revision 1.46garbled 2002/11/06 03:47:23 +3 -2
Better handling for snow. Now when snowing on cobblestones, we use a
see-through image, so we don't obscure the paths. Provide handling for
upgrading and downgrading snow. Actually melt glaciers. Create a new
flag, FLAG_FLOOR_OVERLAY. When set in an overlay map, this item is
loaded INS_ABOVE_FLOOR_ONLY, so we can load the see-through-snow over
cobblestones without obscuring things like signs and walls.
Show difference between Revision 1.45 and 1.46
Revision 1.45garbled 2002/10/29 15:26:36 +6 -2
When loading an overlay, if the object we load off the overlay is a floor
tile, load it INS_ABOVE_FLOOR_ONLY, rather than INS_ON_TOP, so we don't
obscure things that would normally sit on the floor.
Show difference between Revision 1.44 and 1.45
Revision 1.44garbled 2002/10/28 01:14:17 +6 -5
Don't save tiling data in the map_header on overlay maps. It makes the
overlay load really verbose.
Show difference between Revision 1.43 and 1.44
Revision 1.43mwedel 2002/10/14 02:03:17 +6 -1
Minor bugfixes:
common/living.c: Fix it so that if you die, you won't _gain_ exp in any
skills - could happen if new table is harder - 3 level loss could still
mean having higher exp total.
common/map.c: Fix on_same_map so check to see if either object has null
map value - prevents crashes.
MSW 2002-10-13
Show difference between Revision 1.42 and 1.43
Revision 1.42mwedel 2002/09/15 23:07:42 +5 -5
common/map.c: Fix problem with ordering in check_linked() - checking
for NO_PASS was before checks for inventory checkers, resulting in
inventory checkers that require the player to have an item not working.
MSW 2002-09-15
Show difference between Revision 1.41 and 1.42
Revision 1.41mwedel 2002/09/07 00:55:18 +36 -28
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.40 and 1.41
Revision 1.40mwedel 2002/09/01 01:32:30 +2 -2
This change mostly deals with improving behaviour of pet monstes.
Most of the code is from K. Reinert - however, I did some code cleanup/
fixes related to pet monsters, so it is difficult to note where
each piece of code came from. One thing this does fix is handling of
multipart pets - these now work properly.
common/map.c: Update comment for get_rangevector() - no code change.
common/object.c: Add get_search_arr() which is used in pet monster code.
This returns a semi random scrambling of the freearr array.
doc/Developers/protocol: Update documentation about map1a protocol command.
include/libproto.h, include/sproto.h: rebuilt.
server/attack.c: Have drain attacks return 1 damage so that it is clear
that you are actually hitting your opponent. Otherwise, you would
get messages that 'you missed xyz', even though you are draining it.
This extra point of damage shouldn't change balance in any significant
way.
server/monster.c: Update hnadling of enemies for pet monsters. It should
more intelligently choose the monsters and not switch/clear the
enemy field for no reason anymore. Change find_nearest_living_creature to
use the get_search_arr() to more randomly choose direction of target -
before, there was a proclivity to always look in the north direction.
Modify can_hit() to look for closes part of enemy - otherwise, monsters
may not attack opponents even if they were right next to them because
they couldn't get to the enemies head. Remove move_object from
this function - merged with move_ob in move.c
server/move.c: Fix move_ob to use 'cleaner' code of move_object, but
also have specific features that move_ob had (player handling).
Before move_ob didn't handle multipart objects correctly, and the
two functions were largely the same. Now move_object() just calls
move_ob - the only difference in the functions is that move_ob()
takes 3 parameters instead of 2 of move_object() (added
parameter is originator). I think this should now mean multipart
player objects may now work.
server/pets.c: get_pet_enemy enhanced to be much smarter about
selecting/finding things for the pet to attack.
server/player.c: Remove commented out line of init_beforeplay
MSW 2002-08-31
Show difference between Revision 1.39 and 1.40
Revision 1.39mwedel 2002/08/26 02:14:10 +2 -2
Various bugfixes:
common/map.c: Change so that same logic is used to determine pclose/fclose
that is used to determine popen/fopen - otherwise, compressed map
files probably don't work properly.
common/treasure.c: Do a memset to make sure entire treasureslist is
set to sane values.
lib/archetypes: Fix 'slaying' field (which determines spell name) in
god_spelldirect_face_of_death and god_spelldirect_finger_of_death
server/apply.c: Fix infinite loop if the player had cursed items
that needed to be unapplied to apply an item - setting up next
item iteration was inside if check when it shouldn't be. Also,
print message to player if this is the case.
server/monster.c: Better format some of the code for improved readability.
Fix indentation of can_see_enemy. Clean up invisiblity check - may
have fixed a bug - old code should have worked, but wasn't very
readable.
server/move.c: Fix some bad code from last checkin - didn't fix
the crash on no floor for door type, and instead removed
check type from next line by accident.
server/player.c: Remove call for init_beforeplay - this is already
properly called, and re-calling it resulted in some things being
redone when they shouldn't be.
server/skills.c: Add message if there is nothing to steal form the monster.
server/spell_effect.c: Improve message when invisiblity duration is
maximized.
socket/init.c: change O_NDELAY to O_NONBLOCK of fcntl.
MSW 2002-08-25
Show difference between Revision 1.38 and 1.39
Revision 1.38mwedel 2002/07/25 01:57:14 +26 -22
Various bug fixes, add glyph spell:
TODO: Updated
common/map.c: Fix change_map_light() - if darkness was reduced to zero,
it wouldn't properly notify the players or update the maps they are
on. Also, make it more robust to handle changes by more than one.
include/define.h: Increase NROFREALSPELLS
include/spellist.h: Add glyph spell.
include/spells.h: Add SP_GLYPH entry.
server/attack.c: Fix up kill_object() - it has had some many various
additions that it was difficult to follow the logic. It should also now
do better check on skill objects when awarding experience.
server/player.c: Add some checks/addition to properly deal with freeing the
name_pl in the player object. Fix it so that if you are braced, you
still won't attack friendly creatures.
server/rune.c: Add cast_generic_rune() to handle the glyph and rune spell.
server/spell_effect.c: Fix up some pointers in cast_cause_disease() -
needed so that it works properly when embedded in a glyph. Have it
return 1 even if no one caught anything - you still cast the spell, so
you should lose the grace for it.
server/spell_util.c: Fix some formatting. Break out the code dealing
with rune into cast_generic_rune()
socket/loop.c: Add flag to player command mapping, and update structure -
if flag is set, command can only be issued when player is in play,
and not when waiting at the quit or login prompt - fixes crashes where
players could wait for the map to get swapped out (after quitting), and
then looking at a space.
socket/request.c: Fix map2cmd so that invisible players are drawn.
MSW 2002-07-24
Show difference between Revision 1.37 and 1.38
Revision 1.37mwedel 2002/06/07 02:00:41 +11 -1
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.36 and 1.37
Revision 1.36mwedel 2002/02/05 23:54:46 +8 -2
common/map.c: load_map_header: If the map message is empty, don't copy
uninitialized data as the message. This fixes various crashes.
lib/Makefile.in: Remove the adm/*xpm* utilities, as they are no longer
needed or distributed.
server/apply.c: set the player speed to zero after they use a savebed.
Fixes crashes with players that have constant image animation (fireborns)
when they apply the savebed and the map then gets swapped out.
server/plugins.c: Fix some serious memory leaks. Some still remain, with
my comments included.
server/skills.c: Removed unused variable.
MSW 2002-02-05
Show difference between Revision 1.35 and 1.36
Revision 1.35garbled 2002/01/03 15:32:56 +14 -4
Fix a few bugs in the overlay saves and loads. Add a new DM command
overlay_save to force caving/creation of an overlay.
Show difference between Revision 1.34 and 1.35
Revision 1.34garbled 2002/01/02 23:40:21 +6 -3
Never load an overlay map on top of a temp map. In addition, never load
an overlay, when ready_map is called with the MAP_OVERLAY flag (meaning, load
only the overlay). This prevents ready_map from stacking multiple overlays
on top of one another.
Show difference between Revision 1.33 and 1.34
Revision 1.33garbled 2002/01/02 12:22:26 +1 -7
Fix problem loading unique player maps noted by mids. Sorry about the
chaos this caused.
Show difference between Revision 1.32 and 1.33
Revision 1.32garbled 2002/01/01 17:37:54 +97 -13
Add the concept of overlay maps to the code. An overlay map is a map which
is loaded on top of another map, replacing values in the header, and placing
objects on top of other objects. This is the fundamental part of the new
weather code, but also can be used to allow dynamic editing of the worldmaps
by DM's eventually.
garbled 2002-01-01

Phase II of the new weather system is done. Please let me know immediately
if this causes any bizzare effects.
Show difference between Revision 1.31 and 1.32
Revision 1.31garbled 2001/12/19 02:53:58 +13 -1
Load the new values from map.h if they exist in a given map header. They
don't yet, but just in case. Again, no functional change here.
Show difference between Revision 1.30 and 1.31
Revision 1.30garbled 2001/12/18 03:11:26 +7 -19
Oops.. somehow I accidentally backed out mark's changes here. Odd that
it didn't give me a merge bogon.
Show difference between Revision 1.29 and 1.30
Revision 1.29garbled 2001/12/18 02:58:03 +22 -8
Lots of changes here. Basically implement a night and day system, as
well as tracking of game time. A clockdata file is now created and
updated by the server to increment time. Time increases by 1 hour,
approximately every 2 minutes of real time. Right now this code has
virtually no effect, but as maps are updated with outdoor settings,
nightfall will occur automatically. The time command has been modified
to show the current game time, and the clock objects have been changed to
show the game time as well.
garbled 2001-12-18
Show difference between Revision 1.28 and 1.29
Revision 1.28mwedel 2001/12/16 22:15:20 +7 -19
common/map.c: Fix some bugs relating to map tiling. MSW 2001-12-16
Show difference between Revision 1.27 and 1.28
Revision 1.27mwedel 2001/12/03 01:51:40 +4 -1
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.26 and 1.27
Revision 1.26mwedel 2001/11/05 02:21:05 +2 -2
common/map.c: Fix bug in get_rangevector which was causing reverse
of documented procedure. This also resulted in monsters not attacking
adjacent creatures with physical attacks. MSW 2001-11-03
Show difference between Revision 1.25 and 1.26
Revision 1.25michtoen 2001/11/04 14:22:55 +32 -10
One Arch/one pic patch.

I use a modified map1cmd, called map2cmd
for it.

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

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

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

MT
Show difference between Revision 1.24 and 1.25
Revision 1.24mwedel 2001/10/07 01:45:39 +10 -6

common/map.c: Add INS_ON_TOP flag to insert_ob_in_map calls to preserve
stacking order. Modify update_position to generate map spaces with
more proper order.
common/object.c: Modify insert_ob_in_map so that it preserves stacking
if INS_ON_TOP is set.
crossedit/CrEdit.c: Add missing code that would draw third face on a space.
include/object.h: Add INS_ON_TOP flag/define.
random_maps/exit.c: Modify code so that if the random maps leading to
a special map are reset, they will properly link in with an already loaded
final map (and update exit from final map back up) as needed. Also fix
bug in that if the final map has been reset, a new one will now be properly
loaded.
random_maps/random_map.c:Update minimum size to be 7 (up from 6) - fixes
bug which caused crashes when square_spiral maps of 6x6 would fail to
generate.
random_maps/random_map.h,random_maps/room_gen_onion.c: move OPT_values from
room_gen_onion to random_map.h since the square_spiral code uses them.
random_maps/square_spiral.c: Update call to map_gen_onion to use
OPT_.. values instead of constant integer.
random_maps/treasure.c: Add some casts to sprintf statements to eliminate
some compiler warnings.
server/main.c: Modify enter_exit code such that a random map has
reset, we generate a new random map. This can happen when the random_map
resets before the map that leads to them resets.
MSW 2001-10-06
Show difference between Revision 1.23 and 1.24
Revision 1.23avogl 2001/09/18 16:24:54 +5 -1
Patch for check_inv by Maurice Massar.
Due to a bug in map.c, inventory checkers with
"no_pass 1" set were *always* unpassable.
That is corrected now.
Show difference between Revision 1.22 and 1.23
Revision 1.22mwedel 2001/08/21 00:39:30 +193 -16
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.21 and 1.22
Revision 1.21mwedel 2001/08/05 00:07:20 +27 -20
common/map.c: modify link_multipart_objects to preserve name and title of
head when making the more parts. modify update_position so that it should
never show an invisible face to the player.
common/object.c: fix check_walk_on so that spells will now properly get
affected by spinners and directories.
include/sockproto.h: Rebuilt to include MapNewmapCmd
server/hiscore.c: Fix crash if player savebeds map on map which does not
have a name. Use the path instead.
server/move.c: modify teleporter function to send MapNewmapCmd to client
if player got teleported. Needed for fog of war code.
server/time.c: modify move_teleporter so that it will not teleport walls.
socket/Makefile.in: Modified to use cproto to generate proto files.
MSW 2001-08-04
Show difference between Revision 1.20 and 1.21
Revision 1.20mwedel 2001/07/31 01:33:23 +2 -1
common/map.c free_map Set in_memory status to MAP_SWAPPED - fixed bugs of maps
not getting reset properly
common/object.c: insert_ob_in_map - was passing wrong value to check_walk_on,
resulting in some things not working as expected.
doc/Protocol: Clarify how the sending of the version command works.
server/move.c: move_ob redone. It should hopefully be more efficient (only'
remove objects after verifying they can in fact move). IMO, code is
also simpler, and hopefully has fewer bugs.
socket/init.c: InitConnection - modified to set faces_sent[0] to one
so that we will never send any information about face 0 to the client.
facecode 0 is sent in the map1 command to clear spaces/layers.
MSW 2001-07-30
Show difference between Revision 1.19 and 1.20
Revision 1.19mwedel 2001/07/13 23:04:53 +912 -816
common/Makefile.in: Remove ltostr.c and sqrt.c from list of files
common/ltostr.c, common/sqrt.c: Moved into porting.c
common/anim.c, common/button.c, common/item.c: Update calls to update_object
common/living.c: have fix_player calculate light value for player/monster.
common/logger.c: Remove code that has server exit if too many LOG messages
happen too quickly. This was not a reliable mechanism, and it should
really be up to the functions doing the logging to know if they can
continue or not.
common/los.c: Changes on how it deals with lighting on maps - get light
value from map space array instead of using the linked list. Functions
that managed the light list have been removed. Change logic of
line of sight function to be more efficient (before, we may examine
the same space multiple times). rename update_all_los to
update_all_map_los, and change update_all_los to take coordinates
so that we only have clients within view of the change recalculate
los. Also, have update_all_los check for tiled maps that may have
clients that need to get updated.
common/map.c: remove refresh_map - this used to be used to try to recover
from map errors if many_cores was not set - IMO better to core and
just restart and really fix the error than try to deal with possible
corruption that may otherwise result.
Move open_and_uncompress and close_and_delete functions to porting.c -
they are 'common' functions that are not related to the map code.
Remove some lighting related code, as that is no longer done with
a list. Many modifications because of new map structure. And
logic to load and save the new map structure format. Modify
many of the functions to take map tiling into account. Change
way multipart objects are saved, and add logic to relink objects
when maps are loaded up. Remove some functions that are only
used by the editor into the editor. Move update_position from
object.c to map.c as it is better placed in map.c. Modify
function to figure out light for a space. Make out_of_map a
function that knows about map tiling. New function - get_map_from_coord
which knows about map tiling and does coordinate and map translation.
common/object.c: Have update_object take another parameter which tells
update object what has changed about the object. This lets the function
know if it should call update_position right away or if it can just
mark the space as needing an update at a later time. move update_position
to map.c.
insert_ob_in_map: now takes another parameter that describes actions not
to do. modified to know about map tiling and do appropriate translation.
Does some object sorting so it should handle spell objects more
efficiently.
insert_ob_in_map_simple is now replaced by
using appropriate flag to this changed version of insert_ob_in_map.
Clean up remove_ob - seemed to have done things in a more complicated
fashion that is no longer necessary. Modify check_walk_on to look
at all objects on space, not those below the object - with changes to
insert_ob_in_map, new object won't always be on top.
common/porting.c: functions from ltostr.c, sqrt.c, as open_and_uncompress
close_and_delete, make_path_to_file from map.c
common/treasure.c: Modified to use updated insert_ob_in_map
MSW 2001-07-13
Show difference between Revision 1.18 and 1.19
Revision 1.18mwedel 2001/06/04 01:41:02 +51 -51
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.17 and 1.18
Revision 1.17mwedel 2001/05/13 14:22:19 +3 -14
Fix link error with crossedit. MSW 2001-05-13
Show difference between Revision 1.16 and 1.17
Revision 1.16mwedel 2001/05/12 18:55:24 +23 -2
anim.c, map.c, object.c: various enhancements for memory debugging/leak
detection.
doc/programming_guide: some updates on comments and indentation style.
MSW 2001-05-12
Show difference between Revision 1.15 and 1.16
Revision 1.15mwedel 2001/05/09 01:58:12 +5 -1
Various improvements to make finding memory leaks easier.
common/anim.c: Add free_all_anim function
common/arch.c: Modify free_all_arch to free more data
common/init.c: If running under MEMORY_DEBUG, don't pre-allocate objects.
common/map.c: Add free_all_maps functiion.
common/object.c: Modify object allocations if using MEMORY_DEBUG to only
malloc one object at a time, and not pre-allocate objects.
common/readable.c: Fix memory leak.
common/shstr.c: Include autoconf.h so it can pull in dmalloc.h file.
include/config.h: Remove notes of what was removed a long time ago.
Add MEMORY_DEBUG option.
include/libproto.h, include/sockproto.h, include/sproto.h: automatic rebuild
server/c_misc.c: Fix 'malloc info command so it reports right memory total
for maps. Add command_style_map_info which sums up memory used by
style maps.
server/commands.c: Add style_info wiz command which dumps memory usage
for style maps.
server/init.c: Have sighup handler call cleanup function.
server/main.c: Fix clean_tmp_files which could result in crash if one
of the maps in memory has 0 reset time. Modify cleanup function
to free more data.
server/player.c: op_on_battleground: Fix compile warning about unuused variable.
socket/init.c: Change name of free_all_ericserver to free_all_newserver,
have it free all face data.
MSW 2001-05-08
Show difference between Revision 1.14 and 1.15
Revision 1.14mwedel 2001/04/17 00:13:52 +7 -2
common/map.c: set status flag on maps to MAP_SAVING so remove_ob does
not do extra work when we are deleting a map (ie, immediate reset)
from emory.
server/skills.c: If someone is stolen from a player, send an esrv_delete_item
to the client so the clients inventory remains correct.
MSW 2001-04-16
Show difference between Revision 1.13 and 1.14
Revision 1.13michtoen 2001/04/06 14:07:37 +4 -4
win32: change // to /* */
Show difference between Revision 1.12 and 1.13
Revision 1.12michtoen 2001/04/05 19:44:33 +7 -2
*** empty log message ***
Show difference between Revision 1.11 and 1.12
Revision 1.11mwedel 2001/02/23 00:06:35 +1 -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.10 and 1.11
Revision 1.10cvs 2001/02/11 03:12:12 +12 -84
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.9 and 1.10
Revision 1.9peterm 2000/10/12 12:17:04 +4 -1
Fixes for RECYCLE_TMP_MAPS + random maps crashing interaction.
--PeterM
Show difference between Revision 1.8 and 1.9
Revision 1.8cvs 2000/04/27 02:34:56 +3 -1
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

Add HOLY_ALTAR type, and use that for praying over for gods and the
like.
doc/crossfire.doc: Add description of HOLY_ALTAR type and meaning
of fields.
common/map.c: Disable consecration code for altars.
include/define.h: Add type for HOLY_ALTAR
include/sproto.h: Update for change of some functions below.
server/c_wiz.c: Modify setgod command to call become_follower with
proper second arg.
server/gods.c: Change become_follower to take object pointer to god instead
of name, since the holy_altar has the pointer in its other_arch.
Modify pray_at_altar to use the new fields, as well as fixed
what seemed to be numerous bugs in that function.
sever/skills.c: Change check from ALTAR to HOLY_ALTAR, also change
check to see if HOLY_ALTAR is consecrated by looking at the
other_arch field.
server/spell_effect.c: Update consecrate so that caster must be
higher effective level than the altar, also update for
differing fields.
maps/thomas/sisters/shrine0, map/thomas/sisters/tower0: Remove
title from altars on these maps - these were the only two maps
using old style altars consecrated to a god. Since it appears the
real purpose of the altars on these maps was to trigger something
else, they were kept as old style altars.
arch/gods/altars (relocated from arch/indoors, as I think the new
location makes more logical sense): Update for new fields/format.
This also affects lib/archetypes, lib/bmaps.paths, lib/crossfire.xpm,
lib/crossfire.cfb
lib/adm/archsearch.pl: Modified to hunt out old archetypes - some of the
changes could be useful in general cases.
MSW 4/26/2000
Show difference between Revision 1.7 and 1.8
Revision 1.7jec 2000/04/17 09:18:13 +11 -3
See CHANGES file.
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2000/03/29 01:46:48 +7 -7
common/map.c: Change calls in file to use insert_ob_in_map simple.
This fixes bugs with buttons not being applied correctly when the map
is loaded - the cause is that push_button is getting called for the
button before all the objects the button is linked to have been loaded.
Then when the map finishes loading, the call to update_button is called
and they are not in sync. This change should make loading slightly faster,
mostly because it does not call check_walk_on during the loading, so that
buttons don't get pushed/changed around. Mark Wedel 3/28/2000
Show difference between Revision 1.5 and 1.6
Revision 1.5cvs 2000/03/27 00:23:38 +2 -2
Fix typo in previous checkin - code is the same, but now it actually
compiles - msw 3/26/2000
Show difference between Revision 1.4 and 1.5
Revision 1.4cvs 2000/03/27 00:19:32 +5 -3
common/map.c: Code fix by Kurt Fitzner so that unique maps will get
compressed if so needed. Fixes problem of unique maps not being
able to get reloaded as they are saved with the compress suffix but
not in compressed form. Code checked in by Mark Wedel, 3/26/2000
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 1999/08/22 19:26:12 +6 -7
Change compress method definitions from being determined by checks
on system type to having autoconf find the utilities for us. Also, add
bzip2 support. Files affected: Makefile.in configure.in common/map.c
server/init.c server/login.c include/config.h include/define.h
include/autoconf.h.in - msw
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 1999/07/13 01:02:42 +0 -0

Global commit for 0.95.4 - most files have no changes but just have
differing headers between my local RCS and the CVS versions and need to
get synced up.
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:03 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:03 +0 -0
First CVS revsion: crossfire-0.95.3
Show difference between Revision 1.1 and 1.1.1.1


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