--- crossfire/common ---


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

Filename: los.c
Revision 1.18akirschbaum 2006/02/17 15:29:47 +7 -5
Apply patch #1433271 (code-cleanup) by Stefan Huehner: Add const and static.
Show difference between Revision 1.17 and 1.18
Revision 1.17akirschbaum 2006/02/08 18:48:36 +5 -5
Apply patch #1427979 (code-cleanup: add const, fix warnings) by Stefan
Huehner.
Show difference between Revision 1.16 and 1.17
Revision 1.16akirschbaum 2005/12/05 17:34:03 +2 -2
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.15 and 1.16
Revision 1.15akirschbaum 2005/09/04 11:58:12 +5 -5
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.14 and 1.15
Revision 1.14akirschbaum 2005/08/17 02:44:45 +5 -5
The following fix code that basically does "for(x = pos-5; x < pos+5; x++)".
This is not correct because it includes "pos-5" but not "pos+5".
common/los.c: Make lighted distance equal in all directions.
server/disease.c: Make infection distance equal in all directions.
server/monster.c: Make lighted distance equal in all directions.
Show difference between Revision 1.13 and 1.14
Revision 1.13ryo_saeba 2005/07/15 08:51:49 +3 -3
Glue cleaning. New plugin function.
Show difference between Revision 1.12 and 1.13
Revision 1.12mwedel 2005/04/16 23:25:53 +3 -2
Various minor bugfixes.
common/los.c: Patch to fix negative lighting. Use isqrt instead of sqrt,
so we only want integer values anyways.
include/libproto.h, include/sproto.h: Rebuilt as there were some improperly
matching prototypes.
random_maps/rogue_layout.c: Replace sqrt with isqrt calls.
server/c_misc.c: Make name_cmp() a static declaration so it won't be put
in the sproto.h file.
server/init.c: Remove /* within comment string.
server/monster.c: Change sqrt to isqrt
MSW 2005-04-16
Show difference between Revision 1.11 and 1.12
Revision 1.11mwedel 2005/04/16 00:30:47 +13 -14
Commit patch that makes lighting illuminate in a circular instead of
square radius. Patch by Rednaxela - patch 1171646
MSW 2005-04-15
Show difference between Revision 1.10 and 1.11
Revision 1.10mwedel 2003/04/02 02:12:53 +3 -3
TODO: Various updates
aclocal.m4,configure: Update path to find python (fix again)
common/image.c: Minor update to a ocmment in the code.
common/los.c: Add missing P_OUT_OF_MAP checks that resulted in some incorrect
LOS calcuations.
include/funcpoint.h: Remove draw_func function pointer.
lib/Makefile.am, in: Remove bmaps.paths to from being installed or being part
of distribution - bmaps.paths is only needed when collecting the image
lib/*: Rebuilt
server/c_object.c: Patch by Bernd Edler to have the apply functions take into
acount if the item is equipped or not when looking for good matched items.
server/commands.c: Move printlos to normal commands. I don't think it reveals
any information that is in any way harmful. And since it dumps the
output to the players screen, no concern of it filling up log files.
Also, when doing LOS debugging, it is pointless to have it as a DM command
because LOS is ignored for DM's.
server/disease.c: Modify remove_symptoms to remove all symptoms the player
may have a disease. Modify infect_object() to not allow a creature to
have more than one instance of the same disease.
socket/info.c: remove draw() - instead, draw_client_map() can be used,
as that is most the only thing draw() did anyways.
socket/loop.c: Update draw() calls to draw_client_map()
socket/request.c: Remove special handling for darkness==4 cases (first
space that is in full darkness) - this is extra complications and causes
display problems. Update draw_client_map() to include the little bit
of logic that draw() had that this function did not have.
MSW 2003-04-01
Show difference between Revision 1.9 and 1.10
Revision 1.9mwedel 2003/01/08 02:39:17 +48 -43
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.8 and 1.9
Revision 1.8mwedel 2002/07/14 23:25:39 +3 -5
Update banner copyright with proper contact information.
MSW 2002-07-14
Show difference between Revision 1.7 and 1.8
Revision 1.7michtoen 2001/10/29 20:30:19 +1 -1
Remove a bug, reset some modules
Show difference between Revision 1.6 and 1.7
Revision 1.6michtoen 2001/10/29 18:49:02 +2 -2
really SOME fixes - most casting
Show difference between Revision 1.5 and 1.6
Revision 1.5mwedel 2001/07/13 23:04:53 +209 -288
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.4 and 1.5
Revision 1.4mwedel 2001/06/13 01:16:53 +3 -2
Fix bug in darkness code when client is using non rectangular maps.
Player was not being properly illuminated. MSW 2001-06-12
Show difference between Revision 1.3 and 1.4
Revision 1.3mwedel 2001/06/04 01:41:02 +442 -427
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.2 and 1.3
Revision 1.2cvs 1999/07/13 01:02:41 +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:12